Adds Traefik Helm release (kube-system) with ACME HTTP-01 challenge configured for Let's Encrypt, replacing the k3s-disabled bundled Traefik. Migrates all hostnames from *.homelab.local to *.gugagr.xyz and upgrades all ingresses to HTTPS with certresolver=letsencrypt annotations. Adds var.domain (default homelab.local) to Terraform so the domain is a single config point for monitoring and Gitea ingresses. Gateway reads DOMAIN env var at runtime — falls back to homelab.local so local k3d dev continues to work without changes. Co-authored-by: Gonçalo Rodrigues <guga@Goncalos-MacBook-Pro.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
69 lines
1.7 KiB
YAML
69 lines
1.7 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: homelab/finance-api
|
|
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.gugagr.xyz"
|
|
- name: ADMIN_EMAIL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: finance-api-secrets
|
|
key: ADMIN_EMAIL
|
|
optional: true
|
|
- name: ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: finance-api-secrets
|
|
key: ADMIN_PASSWORD
|
|
optional: true
|
|
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"
|