Skip to content

Commit

Permalink
Upgrade to latest version and fix cron (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Fuhrmann <[email protected]>
  • Loading branch information
Patrik Fuhrmann authored Sep 26, 2020
1 parent 95bc1ad commit 5c9f27e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
10 changes: 5 additions & 5 deletions charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: nextcloud
version: 2.1.2
appVersion: 17.0.0
version: 2.2.0
appVersion: 19.0.3
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
- nextcloud
Expand All @@ -23,14 +23,14 @@ maintainers:
email: [email protected]
dependencies:
- name: postgresql
version: 9.1.2
version: 9.7.2
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: mariadb
version: 7.7.1
version: 7.10.2
repository: https://charts.bitnami.com/bitnami
condition: mariadb.enabled
- name: redis
version: 10.7.17
version: 11.0.5
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
1 change: 1 addition & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ The following table lists the configurable parameters of the nextcloud chart and
| `cronjob.enabled` | Whether to enable/disable cronjob | `false` |
| `cronjob.schedule` | Schedule for the CronJob | `*/15 * * * *` |
| `cronjob.annotations` | Annotations to add to the cronjob | {} |
| `cronjob.curlInsecure` | Set insecure (-k) option to curl | false |
| `cronjob.failedJobsHistoryLimit` | Specify the number of failed Jobs to keep | `5` |
| `cronjob.successfulJobsHistoryLimit` | Specify the number of completed Jobs to keep | `2` |
| `cronjob.resources` | Cronjob Resources | `nil` |
Expand Down
13 changes: 12 additions & 1 deletion charts/nextcloud/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: {{ template "nextcloud.fullname" . }}
name: {{ template "nextcloud.fullname" . }}-cron
labels:
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
helm.sh/chart: {{ include "nextcloud.chart" . }}
Expand Down Expand Up @@ -44,9 +44,20 @@ spec:
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.cronjob.image.pullPolicy }}
command: [ "curl" ]
args:
{{- if .Values.ingress.enabled }}
{{- if .Values.cronjob.curlInsecure }}
- "-k"
{{- end }}
- "--fail"
- "-L"
{{- if .Values.ingress.tls }}
- "https://{{ .Values.nextcloud.host }}/cron.php"
{{- else }}
- "http://{{ .Values.nextcloud.host }}/cron.php"
{{- end }}
{{- else }}
- "http://{{ template "nextcloud.fullname" . }}:{{ .Values.service.port }}/cron.php"
{{- end }}
resources:
{{ toYaml (default .Values.resources .Values.cronjob.resources) | indent 16 }}
{{- with (default .Values.nodeSelector .Values.cronjob.nodeSelector) }}
Expand Down
12 changes: 7 additions & 5 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##
image:
repository: nextcloud
tag: 17.0.0-apache
tag: 19.0.3-apache
pullPolicy: IfNotPresent
# pullSecrets:
# - myRegistrKeySecretName
Expand Down Expand Up @@ -245,7 +245,7 @@ redis:
usePassword: false

## Cronjob to execute Nextcloud background tasks
## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#cron-jobs
## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron
##
cronjob:
enabled: false
Expand All @@ -256,11 +256,13 @@ cronjob:
# pullPolicy: IfNotPresent
# pullSecrets:
# - myRegistrKeySecretName
# Every 15 minutes
# Note: Setting this to any any other value than 15 minutes might
# Every 5 minutes
# Note: Setting this to any any other value than 5 minutes might
# cause issues with how nextcloud background jobs are executed
schedule: "*/15 * * * *"
schedule: "*/5 * * * *"
annotations: {}
# Set curl's insecure option if you use e.g. self-signed certificates
curlInsecure: false
failedJobsHistoryLimit: 5
successfulJobsHistoryLimit: 2
# If not set, nextcloud deployment one will be set
Expand Down

0 comments on commit 5c9f27e

Please sign in to comment.