Skip to content

Commit b5d85b5

Browse files
MartinKirchnerMartin Kirchner
and
Martin Kirchner
authored
fix(cronjob): Make command of cronjob container configurable (#708)
This allows to run it without root permissions by using a while-true-script over cron (cron needs root permissions for the impersonation). Signed-off-by: Martin Kirchner <[email protected]> Co-authored-by: Martin Kirchner <[email protected]>
1 parent 224a8ba commit b5d85b5

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 6.6.6
3+
version: 6.6.7
44
# renovate: image=docker.io/library/nextcloud
55
appVersion: 30.0.6
66
description: A file sharing server that puts the control and security of your own data back into your hands.

charts/nextcloud/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ The following table lists the configurable parameters of the nextcloud chart and
190190
| `redis.global.storageClass` | PVC Storage Class for both Redis&reg; master and replica Persistent Volumes | `''` |
191191
| `redis.master.persistence.enabled` | Enable persistence on Redis&reg; master nodes using Persistent Volume Claims | `true` |
192192
| `redis.replica.persistence.enabled` | Enable persistence on Redis&reg; replica nodes using Persistent Volume Claims | `true` |
193+
| `cronjob.command` | The command the cronjob container executes | `/cron.sh` |
193194
| `cronjob.enabled` | Whether to enable/disable cron jobs sidecar | `false` |
194195
| `cronjob.lifecycle.postStartCommand` | Specify deployment lifecycle hook postStartCommand for the cron jobs sidecar | `nil` |
195196
| `cronjob.lifecycle.preStopCommand` | Specify deployment lifecycle hook preStopCommand for the cron jobs sidecar | `nil` |

charts/nextcloud/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ spec:
253253
image: {{ include "nextcloud.image" . }}
254254
imagePullPolicy: {{ .Values.image.pullPolicy }}
255255
command:
256-
- /cron.sh
256+
{{- toYaml .Values.cronjob.command | nindent 12 }}
257257
{{- with .Values.cronjob.lifecycle }}
258258
lifecycle:
259259
{{- with .postStartCommand }}

charts/nextcloud/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,10 @@ cronjob:
579579
# runAsNonRoot: true
580580
# readOnlyRootFilesystem: true
581581

582+
# The command the cronjob container executes.
583+
command:
584+
- /cron.sh
585+
582586
service:
583587
type: ClusterIP
584588
port: 8080

0 commit comments

Comments
 (0)