gotenberg: null-safe hardening, probes and resources
Retrofit of #99 for a chart that already carries a values.schema.json, plus the schema type change that goes with it. An override written without children is YAML null. Where the chart defines a default, Helm's coalescing deletes the default before schema validation runs, so the schema never sees the null and cannot reject it: the container rendered "securityContext: null" - unhardened, healthy, silent. Where the chart defines no default (resources.limits), the null survives into validation and a strict "object" type aborted the render. The defaultedDict helper from #96 handles the first case; widening the types of exactly these blocks to ["object", "null"] handles the second. All other keys stay strict, additionalProperties: false is untouched. The probes address the container port by name, so a rebuilt default probe needs no further context. Rendering with normal values is byte-identical to 5.0.0.
This commit is contained in:
5 files changed
+175
-17
No files matched your search
@@ -17,7 +17,7 @@ spec:
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
securityContext:
|
||||
{{- toYaml .Values.gotenberg.securityContext.pod | nindent 8 }}
|
||||
{{- include "gotenberg.podSecurityContext" .Values.gotenberg.securityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||
image: "gotenberg/gotenberg:{{ .Chart.AppVersion }}"
|
||||
@@ -46,7 +46,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.gotenberg.securityContext.container | nindent 12 }}
|
||||
{{- include "gotenberg.containerSecurityContext" .Values.gotenberg.securityContext | nindent 12 }}
|
||||
volumeMounts:
|
||||
# Gotenberg (and the Chromium/LibreOffice it drives) needs writable
|
||||
# /tmp and home directories; with a read-only root filesystem these
|
||||
@@ -60,13 +60,13 @@ spec:
|
||||
protocol: TCP
|
||||
name: gotenberg-port
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.gotenberg.livenessProbe | nindent 12 }}
|
||||
{{- include "gotenberg.livenessProbe" .Values.gotenberg.livenessProbe | nindent 12 }}
|
||||
readinessProbe:
|
||||
{{- toYaml .Values.gotenberg.readinessProbe | nindent 12 }}
|
||||
{{- include "gotenberg.readinessProbe" .Values.gotenberg.readinessProbe | nindent 12 }}
|
||||
startupProbe:
|
||||
{{- toYaml .Values.gotenberg.startupProbe | nindent 12 }}
|
||||
{{- include "gotenberg.startupProbe" .Values.gotenberg.startupProbe | nindent 12 }}
|
||||
resources:
|
||||
{{- include "gotenberg.resources" .Values.gotenberg.resources | nindent 12 }}
|
||||
{{- include "gotenberg.effectiveResources" .Values.gotenberg.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
|
||||
Reference in new issue
Block a user