feat(mattermost-sync): make cronjob command/args values-configurable#19
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make the
mattermost-synccronjob containercommandandargsconfigurable from values, with defaults equal to today's hardcoded behavior.templates/cronjob.yaml: rendercommand/argsfrom newcronjob.command/cronjob.argsvalues viatoYaml. The--dry-runappend onsync.dryRunis preserved.values.yaml: add defaultscronjob.command: ["python"]andcronjob.args: ["sync_groups_to_mattermost.py"].Chart.yaml: bump1.0.9→1.0.10.Why
There is one shared
Chart.yaml/Chart.lockfor both the testing and production ArgoCD environments; they differ only viavalues.testing.yamlvsvalues.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 imagev1.0.15and only has the oldsync_groups_to_mattermost.pyscript — 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 templateconfirms:python/sync_groups_to_mattermost.py).sync.dryRun=truestill appends--dry-run.python -m mattermost_sync.helm lintclean (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.yamlonly, set imagev1.0.17withcronjob.command: ["python"]/cronjob.args: ["-m","mattermost_sync"]. Leavevalues.production.yamlonv1.0.15+ defaults until ready to bump its image and command together.