Skip to content

Commit 3a66aa7

Browse files
feat: add support for custom initContainers (#273)
Signed-off-by: uid54289 <[email protected]> Co-authored-by: uid54289 <[email protected]>
1 parent 2314c0d commit 3a66aa7

File tree

6 files changed

+30
-1
lines changed

6 files changed

+30
-1
lines changed

charts/authelia/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: authelia
3-
version: 0.9.11
3+
version: 0.9.12
44
kubeVersion: ">= 1.13.0-0"
55
description: Authelia is a Single Sign-On Multi-Factor portal for web apps
66
type: application

charts/authelia/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ This documents the parameters in the chart values. As the chart values are quite
9494
| pod.kind | Configures the kind of pod: StatefulSet, Deployment, DaemonSet | DaemonSet |
9595
| pod.annotations | Adds annotations specifically to the pod | {} |
9696
| pod.labels | Adds labels specifically to the pod | {} |
97+
| pod.initContainers | Adds additional init containers specifically to the pod | [] |
9798
| pod.replicas | Configures the replicas for Deployment's/statefulSet's | 1 |
9899
| pod.revisionHistoryLimit | Configures the revisionHistoryLimit | 1 |
99100
| pod.strategy.type | Configures the pods strategy/updateStrategy type | RollingUpdate |

charts/authelia/templates/_helpers.tpl

+13
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,19 @@ Renders a probe
476476
{{- end -}}
477477
{{- end -}}
478478

479+
{{/*
480+
Renders a value that contains template.
481+
Usage:
482+
{{ include "authelia.snippets.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
483+
*/}}
484+
{{- define "authelia.snippets.render" -}}
485+
{{- if typeIs "string" .value }}
486+
{{- tpl .value .context }}
487+
{{- else }}
488+
{{- tpl (.value | toYaml) .context }}
489+
{{- end }}
490+
{{- end -}}
491+
479492
{{/*
480493
Returns the service port.
481494
*/}}

charts/authelia/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ spec:
8282
serviceAccountName: {{ default (include "authelia.name" .) .Values.rbac.serviceAccountName }}
8383
{{- end }}
8484
enableServiceLinks: {{ .Values.pod.enableServiceLinks | default false }}
85+
{{- if .Values.pod.initContainers }}
86+
initContainers: {{- include "authelia.snippets.render" (dict "value" .Values.pod.initContainers "context" $) | nindent 8 }}
87+
{{- end }}
8588
containers:
8689
- name: authelia
8790
image: {{ include "authelia.image" . }}

charts/authelia/values.local.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ pod:
238238
# Modifies the args for the command. Useful for debugging.
239239
args: []
240240

241+
initContainers: []
242+
# initContainers:
243+
# - name: myapp-init
244+
# image: busybox:1.36
245+
# command: ['sh', '-c', 'echo The app is starting! && sleep 5']
246+
241247
replicas: 1
242248
revisionHistoryLimit: 5
243249
priorityClassName: ''

charts/authelia/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ pod:
233233
# Modifies the args for the command. Useful for debugging.
234234
args: []
235235

236+
initContainers: []
237+
# initContainers:
238+
# - name: myapp-init
239+
# image: busybox:1.36
240+
# command: ['sh', '-c', 'echo The app is starting! && sleep 5']
241+
236242
replicas: 1
237243
revisionHistoryLimit: 5
238244
priorityClassName: ''

0 commit comments

Comments
 (0)