Skip to content

Commit e25a752

Browse files
Merge pull request #400 from raynay-r/set-security-context-for-init-containers
2 parents 36118d0 + bf6f73f commit e25a752

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 5.0.2
3+
version: 5.1.0
44
appVersion: 29.0.3
55
description: A file sharing server that puts the control and security of your own data back into your hands.
66
keywords:

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.mariaDbInitContainer.securityContext }}
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.postgreSqlInitContainer.securityContext }}
319+
securityContext:
320+
{{- toYaml . | nindent 12 }}
321+
{{- end }}
314322
env:
315323
- name: POSTGRES_USER
316324
valueFrom:

charts/nextcloud/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,17 @@ nextcloud:
220220
# runAsNonRoot: true
221221
# readOnlyRootFilesystem: false
222222

223+
# Settings for the MariaDB init container
224+
mariaDbInitContainer:
225+
# Set mariadb initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
226+
securityContext: {}
227+
228+
# Settings for the PostgreSQL init container
229+
postgreSqlInitContainer:
230+
# Set postgresql initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
231+
securityContext: {}
232+
233+
223234
nginx:
224235
## You need to set an fpm version of the image for nextcloud if you want to use nginx!
225236
enabled: false

0 commit comments

Comments
 (0)