From bf6f73f4e7166af6f1ac13f453388bfe3f35cba7 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 30 Jun 2024 11:48:29 +0200 Subject: [PATCH] apply code review suggestion Signed-off-by: rene --- charts/nextcloud/templates/deployment.yaml | 4 ++-- charts/nextcloud/values.yaml | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index aa8ec8bc..51a79d67 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -293,7 +293,7 @@ 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 }} + {{- with .Values.nextcloud.mariaDbInitContainer.securityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} @@ -315,7 +315,7 @@ 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 }} + {{- with .Values.nextcloud.postgreSqlInitContainer.securityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index de0ff0ba..0bfa4187 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -213,12 +213,6 @@ 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 @@ -226,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