Gonçalo Rodrigues f5c08d6f02 fix: add git.homelab.local registry prefix and imagePullSecrets to all app deployments
auth/gateway, auth/users, and test/example-service were referencing
images without a registry prefix, causing k8s to fall back to Docker Hub
(which doesn't have these images).

Also generalises the gitea-registry imagePullSecret to all app namespaces
(auth, finance, home, test) via a for_each in Terraform.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:01:55 +01:00

64 lines
1.6 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-service
namespace: test
labels:
app: example-service
spec:
replicas: 1
selector:
matchLabels:
app: example-service
template:
metadata:
labels:
app: example-service
spec:
imagePullSecrets:
- name: gitea-registry
containers:
- name: example-service
image: git.homelab.local/homelab/example-service:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
envFrom:
- secretRef:
name: mongodb-shared-config
env:
- name: PORT
value: "8080"
- name: LOG_LEVEL
value: "debug"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "jaeger.monitoring.svc:4317"
# Liveness: is the process alive?
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 10
# Readiness: is it ready to serve traffic?
readinessProbe:
httpGet:
path: /readyz
port: http
initialDelaySeconds: 3
periodSeconds: 5
resources:
requests:
cpu: "50m"
memory: "32Mi"
limits:
cpu: "200m"
memory: "128Mi"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]