From 01c726962b287ee2e912bfabd3e6abaaa96fdb76 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:53:03 +0300 Subject: [PATCH] NAS-123887 / 24.04 / use the upstream suggested cron style (#1503) * use the upstream suggested cron style * bump --- library/ix-dev/charts/nextcloud/Chart.yaml | 2 +- .../charts/nextcloud/templates/cronjob.yaml | 39 ++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/library/ix-dev/charts/nextcloud/Chart.yaml b/library/ix-dev/charts/nextcloud/Chart.yaml index 4348c59433..1cf80aaaba 100644 --- a/library/ix-dev/charts/nextcloud/Chart.yaml +++ b/library/ix-dev/charts/nextcloud/Chart.yaml @@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow annotations: title: Nextcloud type: application -version: 1.6.44 +version: 1.6.45 apiVersion: v2 appVersion: 27.0.2 kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/charts/nextcloud/templates/cronjob.yaml b/library/ix-dev/charts/nextcloud/templates/cronjob.yaml index 2d3b650700..f509518b7c 100644 --- a/library/ix-dev/charts/nextcloud/templates/cronjob.yaml +++ b/library/ix-dev/charts/nextcloud/templates/cronjob.yaml @@ -37,13 +37,42 @@ spec: {{- include "common.labels.selectorLabels" $cronjob_values | nindent 12 }} spec: restartPolicy: Never + securityContext: + runAsUser: 33 + runAsGroup: 0 + fsGroup: 33 containers: - name: {{ .Chart.Name }}-cronjob image: "{{.Values.image.repository }}:{{.Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.certificate }} - command: [ "curl" ,"-k" , "https://{{ $hostName }}:{{.Values.service.nodePort}}/cron.php"] - {{- else }} - command: [ "curl" , "http://{{ $hostName }}:{{.Values.service.nodePort}}/cron.php"] - {{- end }} + command: + - php + - -f + - /var/www/html/cron.php + volumeMounts: + - name: nextcloud-data + mountPath: /var/www/ + subPath: "root" + - name: nextcloud-data + mountPath: /var/www/html + subPath: "html" + - name: nextcloud-data + mountPath: {{ .Values.nextcloud.datadir }} + subPath: "data" + - name: nextcloud-data + mountPath: /var/www/html/config + subPath: "config" + - name: nextcloud-data + mountPath: /var/www/html/custom_apps + subPath: "custom_apps" + - name: nextcloud-data + mountPath: /var/www/tmp + subPath: "tmp" + - name: nextcloud-data + mountPath: /var/www/html/themes + subPath: "themes" + volumes: + {{ if .Values.appVolumeMounts }} + {{- include "common.storage.configureAppVolumes" .Values | nindent 12 }} + {{ end }} {{ end }}