Add support for Plugin type applications with argocd write-back #738
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.
This PR introduces support for updating container images in Plugin type applications with the imperative argocd write-back method.
Key Features:
Environment Variable Modification: Instead of adding parameters to the helm source of the application manifest, this PR modifies the HELM_ARGS environment variable within the plugin source.
Integration with argocd-vault-plugin: The HELM_ARGS env variable is primarily used by argocd-vault-plugin to pass arguments to the
helm template
command before it generates the final manifest with vault values. For more details, visit https://argocd-vault-plugin.readthedocs.io/en/stable/usage/#with-additional-helm-argumentsExample of my use case:
Annotations:
Every time a commit is pushed to the dev branch, images are built with the dev tag in the CI pipeline.
The dev tag is mutable, which is why the digest strategy is used.
php.image.tag
andnginx.image.tag
are keys inside the values.yaml file that need to be overridden if a new digest of the images tag exists.With auto-sync enabled, the application is deployed automatically.
Initial manifest:
Updated manifest after an image update:
How to try it:
You can try out this feature by applying the following command:
It's based on v0.13.1
Notes:
This PR was primarily focused on my specific use case and may not cover all possible scenarios, but I wanted to share it for broader use and feedback. I have not tested the Git write-back method. However, the related PR #637 appears to add this support.
It fixes #417