diff --git a/charts/authelia/Chart.yaml b/charts/authelia/Chart.yaml index 08493e7..45c82ef 100644 --- a/charts/authelia/Chart.yaml +++ b/charts/authelia/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: authelia -version: 0.9.11 +version: 0.9.12 kubeVersion: ">= 1.13.0-0" description: Authelia is a Single Sign-On Multi-Factor portal for web apps type: application diff --git a/charts/authelia/README.md b/charts/authelia/README.md index b5a4213..e56a3e6 100644 --- a/charts/authelia/README.md +++ b/charts/authelia/README.md @@ -94,6 +94,7 @@ This documents the parameters in the chart values. As the chart values are quite | pod.kind | Configures the kind of pod: StatefulSet, Deployment, DaemonSet | DaemonSet | | pod.annotations | Adds annotations specifically to the pod | {} | | pod.labels | Adds labels specifically to the pod | {} | +| pod.initContainers | Adds additional init containers specifically to the pod | [] | | pod.replicas | Configures the replicas for Deployment's/statefulSet's | 1 | | pod.revisionHistoryLimit | Configures the revisionHistoryLimit | 1 | | pod.strategy.type | Configures the pods strategy/updateStrategy type | RollingUpdate | diff --git a/charts/authelia/templates/_helpers.tpl b/charts/authelia/templates/_helpers.tpl index 02cd68a..6e423f9 100644 --- a/charts/authelia/templates/_helpers.tpl +++ b/charts/authelia/templates/_helpers.tpl @@ -476,6 +476,19 @@ Renders a probe {{- end -}} {{- end -}} +{{/* +Renders a value that contains template. +Usage: +{{ include "authelia.snippets.render" ( dict "value" .Values.path.to.the.Value "context" $) }} +*/}} +{{- define "authelia.snippets.render" -}} + {{- if typeIs "string" .value }} + {{- tpl .value .context }} + {{- else }} + {{- tpl (.value | toYaml) .context }} + {{- end }} +{{- end -}} + {{/* Returns the service port. */}} diff --git a/charts/authelia/templates/deployment.yaml b/charts/authelia/templates/deployment.yaml index e37e309..6527266 100644 --- a/charts/authelia/templates/deployment.yaml +++ b/charts/authelia/templates/deployment.yaml @@ -82,6 +82,9 @@ spec: serviceAccountName: {{ default (include "authelia.name" .) .Values.rbac.serviceAccountName }} {{- end }} enableServiceLinks: {{ .Values.pod.enableServiceLinks | default false }} + {{- if .Values.pod.initContainers }} + initContainers: {{- include "authelia.snippets.render" (dict "value" .Values.pod.initContainers "context" $) | nindent 8 }} + {{- end }} containers: - name: authelia image: {{ include "authelia.image" . }} diff --git a/charts/authelia/values.local.yaml b/charts/authelia/values.local.yaml index e98cc91..4cd168b 100644 --- a/charts/authelia/values.local.yaml +++ b/charts/authelia/values.local.yaml @@ -238,6 +238,12 @@ pod: # Modifies the args for the command. Useful for debugging. args: [] + initContainers: [] + # initContainers: + # - name: myapp-init + # image: busybox:1.36 + # command: ['sh', '-c', 'echo The app is starting! && sleep 5'] + replicas: 1 revisionHistoryLimit: 5 priorityClassName: '' diff --git a/charts/authelia/values.yaml b/charts/authelia/values.yaml index 5b9748d..b59b041 100644 --- a/charts/authelia/values.yaml +++ b/charts/authelia/values.yaml @@ -233,6 +233,12 @@ pod: # Modifies the args for the command. Useful for debugging. args: [] + initContainers: [] + # initContainers: + # - name: myapp-init + # image: busybox:1.36 + # command: ['sh', '-c', 'echo The app is starting! && sleep 5'] + replicas: 1 revisionHistoryLimit: 5 priorityClassName: ''