Skip to content

Commit

Permalink
Merge pull request #400 from raynay-r/set-security-context-for-init-c…
Browse files Browse the repository at this point in the history
…ontainers
  • Loading branch information
provokateurin authored Jun 30, 2024
2 parents 36118d0 + bf6f73f commit e25a752
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 5.0.2
version: 5.1.0
appVersion: 29.0.3
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
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.mariaDbInitContainer.securityContext }}
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.postgreSqlInitContainer.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: POSTGRES_USER
valueFrom:
Expand Down
11 changes: 11 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ nextcloud:
# runAsNonRoot: true
# readOnlyRootFilesystem: false

# Settings for the MariaDB init container
mariaDbInitContainer:
# Set mariadb initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
securityContext: {}

# Settings for the PostgreSQL init container
postgreSqlInitContainer:
# Set postgresql initContainer securityContext parameters. For example, you may need to define runAsNonRoot directive
securityContext: {}


nginx:
## You need to set an fpm version of the image for nextcloud if you want to use nginx!
enabled: false
Expand Down

0 comments on commit e25a752

Please sign in to comment.