voucher-vault: strict values.schema.json and null-safe hardening
No ingress gate: this chart already gates its Ingress correctly. Two changes plus one guard that the existing gate turned out to need. 1. values.schema.json (#68): additionalProperties: false on every chart-owned object level. Lists that go verbatim into the pod spec (ports, storage.volumes, storage.volumeMounts) stay open. 2. Null-safety for hardening, probes and resources (#99). Two specifics of this chart: - The probes were wrapped in "if" guards, so an erased probe block did not render "livenessProbe: null" - it removed the probe entirely and silently. The guards are gone; an empty block now means chart defaults, so the workload keeps its probes. - The rebuilt probes keep the Host: 127.0.0.1 header. Django's ALLOWED_HOSTS only accepts 127.0.0.1 and the configured DOMAIN, so a probe without it would get 400 and the pod would never be ready. 3. ingress.domain is required() where it is read. The dependency lives in values.yaml, not in a template: the DOMAIN env entry is a tpl string feeding Django's ALLOWED_HOSTS. With the existing gate and no domain the app rendered DOMAIN: "" and answered 400 to every real request - silently, and already before this change. It now fails loudly. Apart from an added comment, the rendered manifest is unchanged.
This commit is contained in:
5 files changed
+390
-15
No files matched your search
@@ -86,8 +86,12 @@ voucherVault:
|
||||
protocol: TCP
|
||||
name: http
|
||||
env:
|
||||
# ingress.domain is not a pure Ingress value: Django's ALLOWED_HOSTS only
|
||||
# accepts 127.0.0.1 and this DOMAIN, so an empty value makes the app answer
|
||||
# 400 to every real request. It therefore stays required even when the
|
||||
# Ingress is switched off via ingress.enabled.
|
||||
- name: DOMAIN
|
||||
value: "{{ .Values.ingress.domain }}"
|
||||
value: '{{ required "A Domain/Host must be provided (ingress.domain)" .Values.ingress.domain }}'
|
||||
- name: SECURE_COOKIES
|
||||
value: "True"
|
||||
- name: SESSION_COOKIE_AGE
|
||||
@@ -196,6 +200,9 @@ storage:
|
||||
storageClass: null
|
||||
|
||||
ingress:
|
||||
# Set to false to omit the Ingress entirely. Note that ingress.domain stays
|
||||
# required even then: it is also Django's ALLOWED_HOSTS entry (the DOMAIN env
|
||||
# above), not just the Ingress host. Only clusterIssuer becomes unnecessary.
|
||||
enabled: true
|
||||
clusterIssuer: null
|
||||
domain: null
|
||||
|
||||
Reference in new issue
Block a user