argocd-image-updater
argocd-image-updater copied to clipboard
[Question] Image updater with custom plugin
I have a kustomize based plugin. It substitutes the variables present in the yaml files with the ones defined in a .env file, runs kustomize build and prints a valid YAML to stdout. It basically acts similar to helm but with environments. This approach works fine and ArgoCD does not complain.
My kustomization.yaml looks like this:
namespace: my-ns
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base/
nameSuffix: -${REGION_SHORT}
images:
- name: 1122334455.dkr.ecr.${REGION}.amazonaws.com/example
newTag: "9b25f6e"
My intention is that the image-updater either writes back to kustomization.yaml or creates the .argocd-source-my-app.yaml. I tried different combinations of annotations but they didn't work. Since the image name present in the kustomization file is different from the one running in the cluster I added the following:
argocd-image-updater.argoproj.io/image-list: argocd=1122334455.dkr.ecr.eu-east-1.amazonaws.com/example
argocd-image-updater.argoproj.io/argocd.kustomize.image-name: 1122334455.dkr.ecr.${REGION}.amazonaws.com/example
but didn't help.
Additionally, I added
argocd-image-updater.argoproj.io/write-back-target: "kustomization:/config/overlays/dev"
which is the path where the kustomization.yaml resides but with no luck.
Is it I'm doing something work with the annotations? Or maybe this custom plugin cannot be fully integrated with the updater? Is there any particular condition the plugin must meet to make it work with the updater?
Thanks!
Same request here https://github.com/argoproj-labs/argocd-image-updater/issues/287