diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 03355f5994dbc0647fc93767adc937f1a50bf999..1271d1d6557f073c1adc79fed7503ada0f7833c7 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -8,7 +8,7 @@ maintainers: - name: groundhog2k # This is the chart version. -version: 0.2.1 +version: 0.2.2 # This is the version number of the application being deployed. appVersion: "20.0.2-apache" diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index dd73df4785570674909cea0856dcb1a7b29e3977..cf5dac5571fe626f6b9a371d0cd5743f9d54d902 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -1,6 +1,6 @@ # Nextcloud -   +   A Helm chart for Nextcloud on Kubernetes @@ -93,6 +93,10 @@ $ helm uninstall my-release | cronJobs[].name | string | `nil` | Name of the cron job | | cronJobs[].schedule | string | `nil` | Schedule for the cron job | | cronJobs[].command | string | `nil` | Command for planned execution | +| cronJobs[].affinity | object | `{}` | Affinity for pod assignment | +| cronJobs[].tolerations | list | `[]` | Tolerations for pod assignment | +| cronJobs[].nodeSelector | object | `{}` | Deployment node selector | +| cronJobs[].resources | object | `{}` | Resource limits and requests | ## Service paramters diff --git a/charts/nextcloud/templates/cronjobs.yaml b/charts/nextcloud/templates/cronjobs.yaml index d90bf32362199909dc696d1aca5211472598c384..3febc677ef3e2008159c490df56529ce1852d163 100644 --- a/charts/nextcloud/templates/cronjobs.yaml +++ b/charts/nextcloud/templates/cronjobs.yaml @@ -48,15 +48,24 @@ spec: name: tmp - mountPath: /var/run name: run + resources: + {{- toYaml $job.resources | nindent 18 }} + {{- if $job.nodeSelector -}} + {{- with $job.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- else }} {{- with $.Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 12 }} {{- end }} - {{- with $.Values.affinity }} + {{- end }} + {{- with $job.affinity }} affinity: {{- toYaml . | nindent 12 }} {{- end }} - {{- with $.Values.tolerations }} + {{- with $job.tolerations }} tolerations: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/nextcloud/templates/defaultcronjobs.yaml b/charts/nextcloud/templates/defaultcronjobs.yaml index 5364066bc957383608dae014a0c14b5d0e3e5637..2b697ab5d3f036524625a0abdd1e76c07bea5ba6 100644 --- a/charts/nextcloud/templates/defaultcronjobs.yaml +++ b/charts/nextcloud/templates/defaultcronjobs.yaml @@ -48,15 +48,24 @@ spec: name: tmp - mountPath: /var/run name: run + resources: + {{- toYaml $job.resources | nindent 18 }} + {{- if $job.nodeSelector -}} + {{- with $job.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- else }} {{- with $.Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 12 }} {{- end }} - {{- with $.Values.affinity }} + {{- end }} + {{- with $job.affinity }} affinity: {{- toYaml . | nindent 12 }} {{- end }} - {{- with $.Values.tolerations }} + {{- with $job.tolerations }} tolerations: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index f39d770484a6b1767621e2213eb69af5c6059445..badd1eaeacae0daec36e4282f4d39a01107f51be 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -24,12 +24,20 @@ defaultCronJobs: - name: cronphp schedule: "*/5 * * * *" command: "php -f /var/www/html/cron.php" + nodeSelector: {} + tolerations: [] + affinity: {} + resources: {} ## Additional cron jobs cronJobs: # - name: imagepregen # schedule: "*/30 * * * *" # command: "php -f /var/www/html/occ preview:pre-generate" +# nodeSelector: {} +# tolerations: [] +# affinity: {} +# resources: {} ## Number of replicas replicas: 1 @@ -165,7 +173,7 @@ settings: ## Enable update processing (default: false - set to true when "helm upgrade .." is used) update: false ## Delay before database update steps are initiated (default: 30 seconds) - databaseUpdateDelay: 30 + databaseUpdateDelay: 480 ## Maximum file upload size (default: 64M) maxFileUploadSize: 64M ## PHP memory limit (default: 512M)