diff --git a/charts/nextcloud/1.5.2/.helmignore b/charts/nextcloud/1.6.0/.helmignore similarity index 100% rename from charts/nextcloud/1.5.2/.helmignore rename to charts/nextcloud/1.6.0/.helmignore diff --git a/charts/nextcloud/1.5.2/Chart.lock b/charts/nextcloud/1.6.0/Chart.lock similarity index 100% rename from charts/nextcloud/1.5.2/Chart.lock rename to charts/nextcloud/1.6.0/Chart.lock diff --git a/charts/nextcloud/1.5.2/Chart.yaml b/charts/nextcloud/1.6.0/Chart.yaml similarity index 97% rename from charts/nextcloud/1.5.2/Chart.yaml rename to charts/nextcloud/1.6.0/Chart.yaml index 987401af49..15697e850b 100644 --- a/charts/nextcloud/1.5.2/Chart.yaml +++ b/charts/nextcloud/1.6.0/Chart.yaml @@ -19,4 +19,4 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm upstream_version: 2.3.2 -version: 1.5.2 +version: 1.6.0 diff --git a/charts/nextcloud/1.5.2/README.md b/charts/nextcloud/1.6.0/README.md similarity index 100% rename from charts/nextcloud/1.5.2/README.md rename to charts/nextcloud/1.6.0/README.md diff --git a/charts/nextcloud/1.5.2/app-readme.md b/charts/nextcloud/1.6.0/app-readme.md similarity index 100% rename from charts/nextcloud/1.5.2/app-readme.md rename to charts/nextcloud/1.6.0/app-readme.md diff --git a/charts/nextcloud/1.5.2/charts/common-2112.0.0.tgz b/charts/nextcloud/1.6.0/charts/common-2112.0.0.tgz similarity index 100% rename from charts/nextcloud/1.5.2/charts/common-2112.0.0.tgz rename to charts/nextcloud/1.6.0/charts/common-2112.0.0.tgz diff --git a/charts/nextcloud/1.5.2/ix_values.yaml b/charts/nextcloud/1.6.0/ix_values.yaml similarity index 100% rename from charts/nextcloud/1.5.2/ix_values.yaml rename to charts/nextcloud/1.6.0/ix_values.yaml diff --git a/charts/nextcloud/1.5.2/migrations/migrate_from_1.1.0 b/charts/nextcloud/1.6.0/migrations/migrate_from_1.1.0 similarity index 100% rename from charts/nextcloud/1.5.2/migrations/migrate_from_1.1.0 rename to charts/nextcloud/1.6.0/migrations/migrate_from_1.1.0 diff --git a/test/nextcloud/1.5.2/questions.yaml b/charts/nextcloud/1.6.0/questions.yaml similarity index 92% rename from test/nextcloud/1.5.2/questions.yaml rename to charts/nextcloud/1.6.0/questions.yaml index b6670f2472..d2394b42b4 100644 --- a/test/nextcloud/1.5.2/questions.yaml +++ b/charts/nextcloud/1.6.0/questions.yaml @@ -9,6 +9,8 @@ groups: description: "Configure nextcloud container parameters" - name: "Postgresql Configuration" description: "Configure Postgresql for nextcloud" + - name: "CronJob configuration" + description: "Configure CronJob for nextcloud" - name: "Scaling/Upgrade Policy" description: "Configure how pods are replaced when configuration is upgraded" - name: "Advanced DNS Settings" @@ -100,6 +102,27 @@ questions: default: "/var/www/html/data" required: true + - variable: cronjob + description: "Setup cronjob for nextcloud" + label: "Setup cronjob for nextcloud" + group: "CronJob configuration" + schema: + type: dict + attrs: + - variable: enabled + label: "Enable cronjobs for nextcloud" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: schedule + label: Schedule + schema: + type: string + default: "1 */24 * * *" + empty: false + # Update strategy - variable: updateStrategy description: "Upgrade Policy" diff --git a/charts/nextcloud/1.5.2/requirements.lock b/charts/nextcloud/1.6.0/requirements.lock similarity index 100% rename from charts/nextcloud/1.5.2/requirements.lock rename to charts/nextcloud/1.6.0/requirements.lock diff --git a/charts/nextcloud/1.5.2/templates/NOTES.txt b/charts/nextcloud/1.6.0/templates/NOTES.txt similarity index 100% rename from charts/nextcloud/1.5.2/templates/NOTES.txt rename to charts/nextcloud/1.6.0/templates/NOTES.txt diff --git a/charts/nextcloud/1.5.2/templates/_nginx.tpl b/charts/nextcloud/1.6.0/templates/_nginx.tpl similarity index 100% rename from charts/nextcloud/1.5.2/templates/_nginx.tpl rename to charts/nextcloud/1.6.0/templates/_nginx.tpl diff --git a/charts/nextcloud/1.5.2/templates/_postgres.tpl b/charts/nextcloud/1.6.0/templates/_postgres.tpl similarity index 100% rename from charts/nextcloud/1.5.2/templates/_postgres.tpl rename to charts/nextcloud/1.6.0/templates/_postgres.tpl diff --git a/charts/nextcloud/1.5.2/templates/backup-postgres-config.yaml b/charts/nextcloud/1.6.0/templates/backup-postgres-config.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/backup-postgres-config.yaml rename to charts/nextcloud/1.6.0/templates/backup-postgres-config.yaml diff --git a/charts/nextcloud/1.5.2/templates/backup-postgres-hook.yaml b/charts/nextcloud/1.6.0/templates/backup-postgres-hook.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/backup-postgres-hook.yaml rename to charts/nextcloud/1.6.0/templates/backup-postgres-hook.yaml diff --git a/charts/nextcloud/1.6.0/templates/cronjob.yaml b/charts/nextcloud/1.6.0/templates/cronjob.yaml new file mode 100644 index 0000000000..2d3b650700 --- /dev/null +++ b/charts/nextcloud/1.6.0/templates/cronjob.yaml @@ -0,0 +1,49 @@ +{{ $cronjob_values := (. | mustDeepCopy) }} +{{ $_ := set $cronjob_values "common" (dict "nameSuffix" "cronjob") }} + +{{ $hostName := .Values.nextcloud.host }} +{{ if .Values.useServiceNameForHost }} +{{ $hostName = (include "common.names.fullname" .) }} +{{ end }} + +{{if .Values.cronjob.enabled }} +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ template "common.names.fullname" $cronjob_values }} + labels: + app: {{ template "common.names.name" $cronjob_values }} + chart: {{ template "common.names.chart" $cronjob_values }} + release: {{ .Release.Name }} + annotations: + rollme: {{ randAlphaNum 5 | quote }} +spec: + schedule: "{{ .Values.cronjob.schedule }}" + concurrencyPolicy: Forbid + failedJobsHistoryLimit: 2 + successfulJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + app: {{ template "common.names.name" $cronjob_values }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" $cronjob_values | nindent 8 }} + spec: + template: + metadata: + labels: + app: {{ template "common.names.name" $cronjob_values }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" $cronjob_values | nindent 12 }} + spec: + restartPolicy: Never + 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 }} +{{ end }} diff --git a/charts/nextcloud/1.5.2/templates/deployment.yaml b/charts/nextcloud/1.6.0/templates/deployment.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/deployment.yaml rename to charts/nextcloud/1.6.0/templates/deployment.yaml diff --git a/charts/nextcloud/1.5.2/templates/nginx-configmap.yaml b/charts/nextcloud/1.6.0/templates/nginx-configmap.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/nginx-configmap.yaml rename to charts/nextcloud/1.6.0/templates/nginx-configmap.yaml diff --git a/charts/nextcloud/1.5.2/templates/nginx-secret.yaml b/charts/nextcloud/1.6.0/templates/nginx-secret.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/nginx-secret.yaml rename to charts/nextcloud/1.6.0/templates/nginx-secret.yaml diff --git a/charts/nextcloud/1.5.2/templates/nuke-deployments-hook.yaml b/charts/nextcloud/1.6.0/templates/nuke-deployments-hook.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/nuke-deployments-hook.yaml rename to charts/nextcloud/1.6.0/templates/nuke-deployments-hook.yaml diff --git a/charts/nextcloud/1.5.2/templates/postgres-deployment.yaml b/charts/nextcloud/1.6.0/templates/postgres-deployment.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/postgres-deployment.yaml rename to charts/nextcloud/1.6.0/templates/postgres-deployment.yaml diff --git a/charts/nextcloud/1.5.2/templates/postgres-secret.yaml b/charts/nextcloud/1.6.0/templates/postgres-secret.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/postgres-secret.yaml rename to charts/nextcloud/1.6.0/templates/postgres-secret.yaml diff --git a/charts/nextcloud/1.5.2/templates/postgres-service.yaml b/charts/nextcloud/1.6.0/templates/postgres-service.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/postgres-service.yaml rename to charts/nextcloud/1.6.0/templates/postgres-service.yaml diff --git a/charts/nextcloud/1.5.2/templates/secrets.yaml b/charts/nextcloud/1.6.0/templates/secrets.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/secrets.yaml rename to charts/nextcloud/1.6.0/templates/secrets.yaml diff --git a/charts/nextcloud/1.5.2/templates/service.yaml b/charts/nextcloud/1.6.0/templates/service.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/service.yaml rename to charts/nextcloud/1.6.0/templates/service.yaml diff --git a/charts/nextcloud/1.5.2/templates/serviceaccount.yaml b/charts/nextcloud/1.6.0/templates/serviceaccount.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/serviceaccount.yaml rename to charts/nextcloud/1.6.0/templates/serviceaccount.yaml diff --git a/charts/nextcloud/1.5.2/templates/tests/deployment-check.yaml b/charts/nextcloud/1.6.0/templates/tests/deployment-check.yaml similarity index 100% rename from charts/nextcloud/1.5.2/templates/tests/deployment-check.yaml rename to charts/nextcloud/1.6.0/templates/tests/deployment-check.yaml diff --git a/test/nextcloud/1.5.2/test_values.yaml b/charts/nextcloud/1.6.0/test_values.yaml similarity index 94% rename from test/nextcloud/1.5.2/test_values.yaml rename to charts/nextcloud/1.6.0/test_values.yaml index db9a984dff..b908cdd9db 100644 --- a/test/nextcloud/1.5.2/test_values.yaml +++ b/charts/nextcloud/1.6.0/test_values.yaml @@ -39,3 +39,6 @@ service: nodePort: 31000 updateStrategy: Recreate useServiceNameForHost: true +cronjob: + enabled: false + schedule: "1 */24 * * *" diff --git a/test/nextcloud/1.5.2/.helmignore b/test/nextcloud/1.6.0/.helmignore similarity index 100% rename from test/nextcloud/1.5.2/.helmignore rename to test/nextcloud/1.6.0/.helmignore diff --git a/test/nextcloud/1.5.2/Chart.lock b/test/nextcloud/1.6.0/Chart.lock similarity index 100% rename from test/nextcloud/1.5.2/Chart.lock rename to test/nextcloud/1.6.0/Chart.lock diff --git a/test/nextcloud/1.5.2/Chart.yaml b/test/nextcloud/1.6.0/Chart.yaml similarity index 97% rename from test/nextcloud/1.5.2/Chart.yaml rename to test/nextcloud/1.6.0/Chart.yaml index 987401af49..15697e850b 100644 --- a/test/nextcloud/1.5.2/Chart.yaml +++ b/test/nextcloud/1.6.0/Chart.yaml @@ -19,4 +19,4 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm upstream_version: 2.3.2 -version: 1.5.2 +version: 1.6.0 diff --git a/test/nextcloud/1.5.2/README.md b/test/nextcloud/1.6.0/README.md similarity index 100% rename from test/nextcloud/1.5.2/README.md rename to test/nextcloud/1.6.0/README.md diff --git a/test/nextcloud/1.5.2/app-readme.md b/test/nextcloud/1.6.0/app-readme.md similarity index 100% rename from test/nextcloud/1.5.2/app-readme.md rename to test/nextcloud/1.6.0/app-readme.md diff --git a/test/nextcloud/1.5.2/charts/common-2112.0.0.tgz b/test/nextcloud/1.6.0/charts/common-2112.0.0.tgz similarity index 100% rename from test/nextcloud/1.5.2/charts/common-2112.0.0.tgz rename to test/nextcloud/1.6.0/charts/common-2112.0.0.tgz diff --git a/test/nextcloud/1.5.2/ix_values.yaml b/test/nextcloud/1.6.0/ix_values.yaml similarity index 100% rename from test/nextcloud/1.5.2/ix_values.yaml rename to test/nextcloud/1.6.0/ix_values.yaml diff --git a/test/nextcloud/1.5.2/migrations/migrate_from_1.1.0 b/test/nextcloud/1.6.0/migrations/migrate_from_1.1.0 similarity index 100% rename from test/nextcloud/1.5.2/migrations/migrate_from_1.1.0 rename to test/nextcloud/1.6.0/migrations/migrate_from_1.1.0 diff --git a/charts/nextcloud/1.5.2/questions.yaml b/test/nextcloud/1.6.0/questions.yaml similarity index 92% rename from charts/nextcloud/1.5.2/questions.yaml rename to test/nextcloud/1.6.0/questions.yaml index b6670f2472..d2394b42b4 100644 --- a/charts/nextcloud/1.5.2/questions.yaml +++ b/test/nextcloud/1.6.0/questions.yaml @@ -9,6 +9,8 @@ groups: description: "Configure nextcloud container parameters" - name: "Postgresql Configuration" description: "Configure Postgresql for nextcloud" + - name: "CronJob configuration" + description: "Configure CronJob for nextcloud" - name: "Scaling/Upgrade Policy" description: "Configure how pods are replaced when configuration is upgraded" - name: "Advanced DNS Settings" @@ -100,6 +102,27 @@ questions: default: "/var/www/html/data" required: true + - variable: cronjob + description: "Setup cronjob for nextcloud" + label: "Setup cronjob for nextcloud" + group: "CronJob configuration" + schema: + type: dict + attrs: + - variable: enabled + label: "Enable cronjobs for nextcloud" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: schedule + label: Schedule + schema: + type: string + default: "1 */24 * * *" + empty: false + # Update strategy - variable: updateStrategy description: "Upgrade Policy" diff --git a/test/nextcloud/1.5.2/requirements.lock b/test/nextcloud/1.6.0/requirements.lock similarity index 100% rename from test/nextcloud/1.5.2/requirements.lock rename to test/nextcloud/1.6.0/requirements.lock diff --git a/test/nextcloud/1.5.2/templates/NOTES.txt b/test/nextcloud/1.6.0/templates/NOTES.txt similarity index 100% rename from test/nextcloud/1.5.2/templates/NOTES.txt rename to test/nextcloud/1.6.0/templates/NOTES.txt diff --git a/test/nextcloud/1.5.2/templates/_nginx.tpl b/test/nextcloud/1.6.0/templates/_nginx.tpl similarity index 100% rename from test/nextcloud/1.5.2/templates/_nginx.tpl rename to test/nextcloud/1.6.0/templates/_nginx.tpl diff --git a/test/nextcloud/1.5.2/templates/_postgres.tpl b/test/nextcloud/1.6.0/templates/_postgres.tpl similarity index 100% rename from test/nextcloud/1.5.2/templates/_postgres.tpl rename to test/nextcloud/1.6.0/templates/_postgres.tpl diff --git a/test/nextcloud/1.5.2/templates/backup-postgres-config.yaml b/test/nextcloud/1.6.0/templates/backup-postgres-config.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/backup-postgres-config.yaml rename to test/nextcloud/1.6.0/templates/backup-postgres-config.yaml diff --git a/test/nextcloud/1.5.2/templates/backup-postgres-hook.yaml b/test/nextcloud/1.6.0/templates/backup-postgres-hook.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/backup-postgres-hook.yaml rename to test/nextcloud/1.6.0/templates/backup-postgres-hook.yaml diff --git a/test/nextcloud/1.6.0/templates/cronjob.yaml b/test/nextcloud/1.6.0/templates/cronjob.yaml new file mode 100644 index 0000000000..2d3b650700 --- /dev/null +++ b/test/nextcloud/1.6.0/templates/cronjob.yaml @@ -0,0 +1,49 @@ +{{ $cronjob_values := (. | mustDeepCopy) }} +{{ $_ := set $cronjob_values "common" (dict "nameSuffix" "cronjob") }} + +{{ $hostName := .Values.nextcloud.host }} +{{ if .Values.useServiceNameForHost }} +{{ $hostName = (include "common.names.fullname" .) }} +{{ end }} + +{{if .Values.cronjob.enabled }} +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ template "common.names.fullname" $cronjob_values }} + labels: + app: {{ template "common.names.name" $cronjob_values }} + chart: {{ template "common.names.chart" $cronjob_values }} + release: {{ .Release.Name }} + annotations: + rollme: {{ randAlphaNum 5 | quote }} +spec: + schedule: "{{ .Values.cronjob.schedule }}" + concurrencyPolicy: Forbid + failedJobsHistoryLimit: 2 + successfulJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + app: {{ template "common.names.name" $cronjob_values }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" $cronjob_values | nindent 8 }} + spec: + template: + metadata: + labels: + app: {{ template "common.names.name" $cronjob_values }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" $cronjob_values | nindent 12 }} + spec: + restartPolicy: Never + 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 }} +{{ end }} diff --git a/test/nextcloud/1.5.2/templates/deployment.yaml b/test/nextcloud/1.6.0/templates/deployment.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/deployment.yaml rename to test/nextcloud/1.6.0/templates/deployment.yaml diff --git a/test/nextcloud/1.5.2/templates/nginx-configmap.yaml b/test/nextcloud/1.6.0/templates/nginx-configmap.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/nginx-configmap.yaml rename to test/nextcloud/1.6.0/templates/nginx-configmap.yaml diff --git a/test/nextcloud/1.5.2/templates/nginx-secret.yaml b/test/nextcloud/1.6.0/templates/nginx-secret.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/nginx-secret.yaml rename to test/nextcloud/1.6.0/templates/nginx-secret.yaml diff --git a/test/nextcloud/1.5.2/templates/nuke-deployments-hook.yaml b/test/nextcloud/1.6.0/templates/nuke-deployments-hook.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/nuke-deployments-hook.yaml rename to test/nextcloud/1.6.0/templates/nuke-deployments-hook.yaml diff --git a/test/nextcloud/1.5.2/templates/postgres-deployment.yaml b/test/nextcloud/1.6.0/templates/postgres-deployment.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/postgres-deployment.yaml rename to test/nextcloud/1.6.0/templates/postgres-deployment.yaml diff --git a/test/nextcloud/1.5.2/templates/postgres-secret.yaml b/test/nextcloud/1.6.0/templates/postgres-secret.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/postgres-secret.yaml rename to test/nextcloud/1.6.0/templates/postgres-secret.yaml diff --git a/test/nextcloud/1.5.2/templates/postgres-service.yaml b/test/nextcloud/1.6.0/templates/postgres-service.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/postgres-service.yaml rename to test/nextcloud/1.6.0/templates/postgres-service.yaml diff --git a/test/nextcloud/1.5.2/templates/secrets.yaml b/test/nextcloud/1.6.0/templates/secrets.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/secrets.yaml rename to test/nextcloud/1.6.0/templates/secrets.yaml diff --git a/test/nextcloud/1.5.2/templates/service.yaml b/test/nextcloud/1.6.0/templates/service.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/service.yaml rename to test/nextcloud/1.6.0/templates/service.yaml diff --git a/test/nextcloud/1.5.2/templates/serviceaccount.yaml b/test/nextcloud/1.6.0/templates/serviceaccount.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/serviceaccount.yaml rename to test/nextcloud/1.6.0/templates/serviceaccount.yaml diff --git a/test/nextcloud/1.5.2/templates/tests/deployment-check.yaml b/test/nextcloud/1.6.0/templates/tests/deployment-check.yaml similarity index 100% rename from test/nextcloud/1.5.2/templates/tests/deployment-check.yaml rename to test/nextcloud/1.6.0/templates/tests/deployment-check.yaml diff --git a/charts/nextcloud/1.5.2/test_values.yaml b/test/nextcloud/1.6.0/test_values.yaml similarity index 94% rename from charts/nextcloud/1.5.2/test_values.yaml rename to test/nextcloud/1.6.0/test_values.yaml index db9a984dff..b908cdd9db 100644 --- a/charts/nextcloud/1.5.2/test_values.yaml +++ b/test/nextcloud/1.6.0/test_values.yaml @@ -39,3 +39,6 @@ service: nodePort: 31000 updateStrategy: Recreate useServiceNameForHost: true +cronjob: + enabled: false + schedule: "1 */24 * * *"