Files
helm-charts/voucher-vault/values.yaml
T
jklein 6779e49355 Add per-workload replicas values and a chart-global scaleDown flag
Every Deployment/StatefulSet now takes its replica count from a replicas
value (default 1, explicit 0 allowed) via a new per-chart <chart>.replicas
helper; the helper uses a kindIs "invalid" nil check so an explicit 0 is
not swallowed by Helm's default function. A chart-global scaleDown flag
(default false) takes precedence: it renders every workload with
replicas: 0 and suspends the paperless-ngx consume CronJob, stopping the
app without uninstalling it (PVCs, Secrets, Services and Ingress remain).

Defaults leave the rendered manifests byte-identical to main, so all
published charts get a minor version bump; the template-chart carries the
reference helper implementation and stays unversioned.

Fixes #25
2026-08-22 08:12:40 +02:00

188 lines
5.3 KiB
YAML

# Scale the whole chart down without uninstalling it: scaleDown: true renders
# every Deployment/StatefulSet with replicas: 0 (and suspends CronJobs) and
# takes precedence over any per-workload replicas value. PVCs, Secrets and
# Services stay in place; scaleDown: false brings the workloads back up.
scaleDown: false
secrets:
voucherVaultSecretRef: null
oidcSecretRef: null
databaseSecretRef: null
voucherVault:
# Replica count for this workload; 0 is allowed and scales it down.
# The chart-global scaleDown flag takes precedence.
replicas: 1
resources:
# Limits are optional: memory and ephemeral-storage limits default to
# limitFactor x the request, an explicitly set limit always wins, and a
# CPU limit is only set when configured explicitly under "limits".
limitFactor: 3
requests:
cpu: 0.1
memory: 256Mi
ephemeral-storage: 10Mi
# "/" 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