Every chart was installed twice in a throwaway k3d cluster (origin/main vs this branch) with real Postgres/Redis/dex instances and observed for readiness ordering, stability and dependency-outage behavior. Findings: - voucher-vault: Django only accepts Hosts 127.0.0.1 and the configured DOMAIN; the default probe Host (pod IP) always got 400. Probes now send 'Host: 127.0.0.1'. - zipline: /api/healthcheck includes the database, so liveness now uses '/' (readiness/startup keep /api/healthcheck). Verified live: on a Postgres outage the pod turns NotReady within 30s and is never restarted by the kubelet. - outline: '/' also returns 500 when the database is down, so there is no dependency-free endpoint; all three probes use /_health.
178 lines
4.7 KiB
YAML
178 lines
4.7 KiB
YAML
secrets:
|
|
voucherVaultSecretRef: null
|
|
oidcSecretRef: null
|
|
databaseSecretRef: null
|
|
|
|
voucherVault:
|
|
resources:
|
|
requests:
|
|
cpu: 0.1
|
|
memory: 256Mi
|
|
ephemeral-storage: 10Mi
|
|
limits:
|
|
cpu: 1
|
|
memory: 384Mi
|
|
ephemeral-storage: 100Mi
|
|
# "/" answers with a redirect for anonymous users, which httpGet treats as
|
|
# success. The Host header must be set to 127.0.0.1 because Django's
|
|
# ALLOWED_HOSTS only accepts 127.0.0.1 and the configured DOMAIN — probing
|
|
# with the default Host (the pod IP) would always return 400.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: 127.0.0.1
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: 127.0.0.1
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
# The startup probe gates liveness/readiness. Startup budget = 5s * 30 = 150s.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: 127.0.0.1
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
failureThreshold: 30
|
|
securityContext:
|
|
pod:
|
|
runAsNonRoot: true
|
|
runAsUser: 33
|
|
runAsGroup: 33
|
|
fsGroup: 33
|
|
fsGroupChangePolicy: Always
|
|
container:
|
|
allowPrivilegeEscalation: false
|
|
runAsNonRoot: true
|
|
ports:
|
|
- containerPort: 8000
|
|
protocol: TCP
|
|
name: http
|
|
env:
|
|
- name: DOMAIN
|
|
value: "{{ .Values.ingress.domain }}"
|
|
- name: SECURE_COOKIES
|
|
value: "True"
|
|
- name: SESSION_COOKIE_AGE
|
|
value: "30"
|
|
- name: SESSION_EXPIRE_AT_BROWSER_CLOSE
|
|
value: "True"
|
|
- name: EXPIRY_THRESHOLD_DAYS
|
|
value: "90"
|
|
- name: EXPIRY_LAST_NOTIFICATION_DAYS
|
|
value: "7"
|
|
- name: TZ
|
|
value: "UTC"
|
|
- name: PORT
|
|
value: "8000"
|
|
- name: SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-secret"
|
|
key: "secretKey"
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-secret"
|
|
key: "redis-url"
|
|
- name: CELERY_WORKER_CONCURRENCY
|
|
value: "1"
|
|
- name: CELERY_WORKER_PREFETCH_MULTIPLIER
|
|
value: "1"
|
|
- name: OIDC_ENABLED
|
|
value: "True"
|
|
- name: OIDC_AUTOLOGIN
|
|
value: "True"
|
|
- name: OIDC_CREATE_USER
|
|
value: "True"
|
|
- name: OIDC_RP_SIGN_ALGO
|
|
value: "RS256"
|
|
- name: OIDC_OP_JWKS_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "oidc-jwks-endpoint"
|
|
- name: OIDC_RP_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "client-id"
|
|
- name: OIDC_RP_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "client-secret"
|
|
- name: OIDC_OP_AUTHORIZATION_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "authorization-endpoint"
|
|
- name: OIDC_OP_TOKEN_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "token-endpoint"
|
|
- name: OIDC_OP_USER_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-oidc-secret"
|
|
key: "user-endpoint"
|
|
- name: DB_ENGINE
|
|
value: "postgres"
|
|
- name: POSTGRES_HOST
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "host"
|
|
- name: POSTGRES_PORT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "port"
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "user"
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "password"
|
|
- name: POSTGRES_DB
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-db-secret"
|
|
key: "database"
|
|
storage:
|
|
volumes:
|
|
- name: voucher-vault-data
|
|
persistentVolumeClaim:
|
|
claimName: "{{ .Release.Name }}-{{ .Chart.Name }}-pvc"
|
|
volumeMounts:
|
|
- name: voucher-vault-data
|
|
mountPath: /opt/app/database
|
|
subPath: voucher-vault-data
|
|
|
|
storage:
|
|
amount: 10Gi
|
|
storageClass: null
|
|
|
|
ingress:
|
|
enabled: true
|
|
clusterIssuer: null
|
|
domain: null |