Skip to content

Commit 11f6601

Browse files
committed
make security context configurable for mariadb and postgresql init containers
commit 5cde3a4 Merge: b5171ad 6f1f075 Author: rene <rene.raab@gmx.net> Date: Fri Jun 28 23:05:44 2024 +0200 Merge branch 'set-security-context-for-init-containers' of https://github.com/raynay-r/nextcloud-helm into set-security-context-for-init-containers commit 6f1f075 Merge: 8ebadd7 f8cf007 Author: JesseBot <jessebot@linux.com> Date: Sun Jun 9 09:31:22 2024 +0200 Merge branch 'main' into set-security-context-for-init-containers Signed-off-by: JesseBot <jessebot@linux.com> commit 8ebadd7 Author: JesseBot <jessebot@linux.com> Date: Sun Jun 9 09:30:33 2024 +0200 Apply suggestions from code review - switch to one with instead of if + with Signed-off-by: JesseBot <jessebot@linux.com> commit 6ae83c6 Merge: 1d2244a 1ae7421 Author: raynay-r <16634069+raynay-r@users.noreply.github.com> Date: Tue May 28 12:38:27 2024 +0200 Merge branch 'main' into set-security-context-for-init-containers Signed-off-by: raynay-r <16634069+raynay-r@users.noreply.github.com> commit 1d2244a Author: rene <rene.raab@gmx.net> Date: Sat May 25 11:58:47 2024 +0200 increment minor version - new version 4.7.0 commit b5171ad Author: rene <rene.raab@gmx.net> Date: Sat May 25 11:52:23 2024 +0200 increment to next minor version commit bf511ec Merge: 0982a00 30c69c1 Author: JesseBot <jessebot@linux.com> Date: Tue Apr 30 17:04:38 2024 +0200 Merge branch 'main' into set-security-context-for-init-containers commit 0982a00 Author: rene <rene.raab@gmx.net> Date: Tue Apr 16 11:30:14 2024 +0200 fix indentation of security context blocks in init container definitions Signed-off-by: rene <rene.raab@gmx.net> commit 6918ded Author: rene <rene.raab@gmx.net> Date: Tue Apr 16 11:17:25 2024 +0200 fix issues from rebase Signed-off-by: rene <rene.raab@gmx.net> commit 4df8b17 Author: rene <rene.raab@gmx.net> Date: Tue Apr 16 10:23:37 2024 +0200 add new parameters for init containers security context Signed-off-by: rene <rene.raab@gmx.net> Signed-off-by: rene <rene.raab@gmx.net>
1 parent 36118d0 commit 11f6601

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

charts/nextcloud/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ spec:
293293
{{- if .Values.mariadb.enabled }}
294294
- name: mariadb-isalive
295295
image: {{ .Values.mariadb.image.registry | default "docker.io" }}/{{ .Values.mariadb.image.repository }}:{{ .Values.mariadb.image.tag }}
296+
{{- with .Values.nextcloud.mariadbInitContainerSecurityContext }}
297+
securityContext:
298+
{{- toYaml . | nindent 12 }}
299+
{{- end }}
296300
env:
297301
- name: MYSQL_USER
298302
valueFrom:
@@ -311,6 +315,10 @@ spec:
311315
{{- else if .Values.postgresql.enabled }}
312316
- name: postgresql-isready
313317
image: {{ .Values.postgresql.image.registry | default "docker.io" }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}
318+
{{- with .Values.nextcloud.postgresqlInitContainerSecurityContext }}
319+
securityContext:
320+
{{- toYaml . | nindent 12 }}
321+
{{- end }}
314322
env:
315323
- name: POSTGRES_USER
316324
valueFrom:

charts/nextcloud/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ nextcloud:
213213
# runAsNonRoot: true
214214
# readOnlyRootFilesystem: false
215215

216+
# Set mariadb initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
217+
mariadbInitContainerSecurityContext: {}
218+
219+
# Set postgresql initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
220+
postgresqlInitContainerSecurityContext: {}
221+
216222
# Set securityContext parameters for the entire pod. For example, you may need to define runAsNonRoot directive
217223
podSecurityContext: {}
218224
# runAsUser: 33

0 commit comments

Comments
 (0)