Skip to content

feat(mattermost-sync): make cronjob command/args values-configurable#19

Merged
gcordalis merged 1 commit into
mainfrom
chore/mattermost-sync-configurable-command
Jun 30, 2026
Merged

feat(mattermost-sync): make cronjob command/args values-configurable#19
gcordalis merged 1 commit into
mainfrom
chore/mattermost-sync-configurable-command

Conversation

@gcordalis

Copy link
Copy Markdown
Collaborator

What

Make the mattermost-sync cronjob container command and args configurable from values, with defaults equal to today's hardcoded behavior.

  • templates/cronjob.yaml: render command/args from new cronjob.command / cronjob.args values via toYaml. The --dry-run append on sync.dryRun is preserved.
  • values.yaml: add defaults cronjob.command: ["python"] and cronjob.args: ["sync_groups_to_mattermost.py"].
  • Chart.yaml: bump 1.0.91.0.10.

Why

There is one shared Chart.yaml/Chart.lock for both the testing and production ArgoCD environments; they differ only via values.testing.yaml vs values.production.yaml, and the chart dependency version is not per-environment. Hardcoding a new entrypoint (e.g. python -m mattermost_sync) in the chart would re-render prod too, which is still on image v1.0.15 and only has the old sync_groups_to_mattermost.py script — breaking prod on the next sync.

By making the entrypoint values-configurable, the per-environment values files (which are separate) choose the invocation, so the image tag and command travel together per environment. The shared dependency bump is safe because the default render is unchanged.

Verification

helm template confirms:

  • Defaults render identically to before (python / sync_groups_to_mattermost.py).
  • sync.dryRun=true still appends --dry-run.
  • Override renders python -m mattermost_sync.

helm lint clean (only the pre-existing "icon is recommended" info note).

Follow-up (separate consumer repo)

After this is published, bump the dependency in the argocd repo and, in values.testing.yaml only, set image v1.0.17 with cronjob.command: ["python"] / cronjob.args: ["-m","mattermost_sync"]. Leave values.production.yaml on v1.0.15 + defaults until ready to bump its image and command together.

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.
@gcordalis gcordalis merged commit ba11388 into main Jun 30, 2026
1 check passed
@gcordalis gcordalis deleted the chore/mattermost-sync-configurable-command branch June 30, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant