homelab/apps/finance/services/api/k8s/deployment.yaml
Gonçalo Rodrigues ac073acad9 feat(finance): Layer 2 — property equity integrated into Net Worth (#30)
* feat(finance): Layer 2 — property equity flows into Net Worth

- NetWorthData gains PropertyValueCents, LoanBalanceCents, PropertyEquityCents
- NetWorth handler fetches properties + loans; adds equity to current snapshot
  and uses amortisation formula to compute historical loan balances per month,
  so the chart reflects how equity grew as loans were paid down
- Dashboard NetWorthCents now includes property equity
- loanBalanceAt() helper: B_n = P*(1+r)^n - (M/r)*((1+r)^n - 1)
- networth.html: inline breakdown row in hero card (cash / portfolio / equity),
  new "Property equity" breakdown card (value − loans), chart gains a dashed
  red "Loans outstanding" line when properties are present

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(property): resolve template, image pull, and build issues

- Fix parseTmpl missing base.html causing "base.html is undefined" error
- Change imagePullPolicy to IfNotPresent for local k3d dev workflow
- Add SERVICE_NAME to Makefile so make build-deploy uses correct image name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Gonçalo Rodrigues <guga@Goncalos-MacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 23:01:55 +01:00

57 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: api
namespace: finance
labels:
app: api
spec:
replicas: 1
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
imagePullSecrets:
- name: gitea-registry
containers:
- name: api
image: git.homelab.local/admin/finance-api:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
env:
- name: PORT
value: "8080"
- name: LOG_LEVEL
value: "info"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "jaeger.monitoring.svc:4317"
- name: BASE_URL
value: "https://finance.homelab.local"
envFrom:
- secretRef:
name: mongodb-shared-config
- secretRef:
name: finance-api-secrets
optional: true
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /readyz
port: http
resources:
requests:
cpu: "50m"
memory: "32Mi"
limits:
cpu: "200m"
memory: "128Mi"