Skip to content

Commit

Permalink
make security context configurable for mariadb and postgresql init co…
Browse files Browse the repository at this point in the history
…ntainers

commit 5cde3a4
Merge: b5171ad 6f1f075
Author: rene <[email protected]>
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 <[email protected]>
Date:   Sun Jun 9 09:31:22 2024 +0200

    Merge branch 'main' into set-security-context-for-init-containers

    Signed-off-by: JesseBot <[email protected]>

commit 8ebadd7
Author: JesseBot <[email protected]>
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 <[email protected]>

commit 6ae83c6
Merge: 1d2244a 1ae7421
Author: raynay-r <[email protected]>
Date:   Tue May 28 12:38:27 2024 +0200

    Merge branch 'main' into set-security-context-for-init-containers

    Signed-off-by: raynay-r <[email protected]>

commit 1d2244a
Author: rene <[email protected]>
Date:   Sat May 25 11:58:47 2024 +0200

    increment minor version - new version 4.7.0

commit b5171ad
Author: rene <[email protected]>
Date:   Sat May 25 11:52:23 2024 +0200

    increment to next minor version

commit bf511ec
Merge: 0982a00 30c69c1
Author: JesseBot <[email protected]>
Date:   Tue Apr 30 17:04:38 2024 +0200

    Merge branch 'main' into set-security-context-for-init-containers

commit 0982a00
Author: rene <[email protected]>
Date:   Tue Apr 16 11:30:14 2024 +0200

    fix indentation of security context blocks in init container definitions

    Signed-off-by: rene <[email protected]>

commit 6918ded
Author: rene <[email protected]>
Date:   Tue Apr 16 11:17:25 2024 +0200

    fix issues from rebase

    Signed-off-by: rene <[email protected]>

commit 4df8b17
Author: rene <[email protected]>
Date:   Tue Apr 16 10:23:37 2024 +0200

    add new parameters for init containers security context

    Signed-off-by: rene <[email protected]>

Signed-off-by: rene <[email protected]>
  • Loading branch information
raynay-r committed Jun 29, 2024
1 parent 36118d0 commit 11f6601
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ spec:
{{- if .Values.mariadb.enabled }}
- name: mariadb-isalive
image: {{ .Values.mariadb.image.registry | default "docker.io" }}/{{ .Values.mariadb.image.repository }}:{{ .Values.mariadb.image.tag }}
{{- with .Values.nextcloud.mariadbInitContainerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: MYSQL_USER
valueFrom:
Expand All @@ -311,6 +315,10 @@ spec:
{{- else if .Values.postgresql.enabled }}
- name: postgresql-isready
image: {{ .Values.postgresql.image.registry | default "docker.io" }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}
{{- with .Values.nextcloud.postgresqlInitContainerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: POSTGRES_USER
valueFrom:
Expand Down
6 changes: 6 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ nextcloud:
# runAsNonRoot: true
# readOnlyRootFilesystem: false

# Set mariadb initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
mariadbInitContainerSecurityContext: {}

# Set postgresql initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
postgresqlInitContainerSecurityContext: {}

# Set securityContext parameters for the entire pod. For example, you may need to define runAsNonRoot directive
podSecurityContext: {}
# runAsUser: 33
Expand Down

0 comments on commit 11f6601

Please sign in to comment.