From 0bd562464fde00d4bf85a81880d057fbd5816ff8 Mon Sep 17 00:00:00 2001 From: George Cordalis <8468312+gcordalis@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:20:59 +1200 Subject: [PATCH] feat(mattermost-sync): make cronjob command/args values-configurable Render the cronjob container command and args from new cronjob.command / cronjob.args values, with defaults equal to the previous hardcoded behavior (python / sync_groups_to_mattermost.py). The --dry-run append on sync.dryRun is preserved. This lets per-environment values files choose the entrypoint so the image tag and invocation travel together, without changing the default render for existing deployments. Bump chart version 1.0.9 -> 1.0.10. --- charts/mattermost-sync/Chart.yaml | 2 +- charts/mattermost-sync/templates/cronjob.yaml | 5 +++-- charts/mattermost-sync/values.yaml | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/charts/mattermost-sync/Chart.yaml b/charts/mattermost-sync/Chart.yaml index e758908..3011ef1 100644 --- a/charts/mattermost-sync/Chart.yaml +++ b/charts/mattermost-sync/Chart.yaml @@ -3,7 +3,7 @@ name: mattermost-sync description: Sync groups and users from Google Workspace to Mattermost type: application -version: 1.0.9 +version: 1.0.10 # App metadata appVersion: "v1.0.0" diff --git a/charts/mattermost-sync/templates/cronjob.yaml b/charts/mattermost-sync/templates/cronjob.yaml index 77b7dbf..eae6b0f 100644 --- a/charts/mattermost-sync/templates/cronjob.yaml +++ b/charts/mattermost-sync/templates/cronjob.yaml @@ -51,12 +51,13 @@ spec: {{- toYaml .Values.securityContext | nindent 14 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + {{- toYaml .Values.cronjob.command | nindent 12 }} args: - - "sync_groups_to_mattermost.py" + {{- toYaml .Values.cronjob.args | nindent 12 }} {{- if .Values.sync.dryRun }} - "--dry-run" {{- end }} - command: ["python"] env: - name: MATTERMOST_URL value: {{ .Values.mattermost.url | quote }} diff --git a/charts/mattermost-sync/values.yaml b/charts/mattermost-sync/values.yaml index c8310c2..588c706 100644 --- a/charts/mattermost-sync/values.yaml +++ b/charts/mattermost-sync/values.yaml @@ -29,6 +29,11 @@ cronjob: enabled: true # Schedule in cron format (default: every 4 hours) schedule: "0 */4 * * *" + # Container entrypoint (command). Default matches the historical behavior. + command: ["python"] + # Container args. Default matches the historical behavior. + # Note: "--dry-run" is appended automatically when sync.dryRun is true. + args: ["sync_groups_to_mattermost.py"] # Successful job history limit successfulJobsHistoryLimit: 3 # Failed job history limit