Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgoCD doesn't see image tag in target branch from argocd-image-updater.argoproj.io/git-branch: :target parameter. #941

Open
yury-stsefanovich opened this issue Nov 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yury-stsefanovich
Copy link

yury-stsefanovich commented Nov 22, 2024

Describe the bug
When I try to specify a target branch to commit for image updater argoCD doesn't catch image from the branch.

I have:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: test-app-set
  namespace: argo-cd
spec:
  generators:
    - list:
        elements:
          - environment_name: "staging"
            eks_cluster: "cluster"
            namespace: "argo-test"
  template:
    metadata:
      name: '{{environment_name}}-test-app'
      annotations:
        argocd-image-updater.argoproj.io/write-back-method: git
        argocd-image-updater.argoproj.io/image-list: 'my.jfrog.io/docker-dev/test:latest'
        argocd-image-updater.argoproj.io/update-strategy: digest
        argocd-image-updater.argoproj.io/helm.image-name: image.name
        argocd-image-updater.argoproj.io/helm.image-tag: image.tag
        argocd-image-updater.argoproj.io/git-branch: :image_updater_branch
    spec:
      project: default
      source:
        repoURL: https://gitlab.com/helm/my-chart.git
        targetRevision: main
        path: helm/chart
        helm:
          releaseName: my-app
          ignoreMissingValueFiles: false
          valueFiles:
            - ../values/default.yaml
      destination:
        name: '{{eks_cluster}}'
        namespace: '{{namespace}}'
      syncPolicy:
        automated: {}

Image updater successfully push new image tag with digest to image_updater_branch .argocd-source-staging-my-app.yaml file, but ArgoCD doesn't update deployment with the new tag from .argocd-source-staging-my-app.yaml file.
Without argocd-image-updater.argoproj.io/git-branch: :image_updater_branch annotation all works correctly, but I want to keep main branch protected and use image_updater_branch for image changes.

Expected behavior
Image updater push new tag to image_updater_branch .argocd-source-staging-my-app.yaml file, argo update deployment's image after sync.

Version
Image updater 0.15.1, ArgoCD 2.13.0
Logs
No any errors in logs.

@yury-stsefanovich yury-stsefanovich added the bug Something isn't working label Nov 22, 2024
@danielz0
Copy link

Same here. It complicates the repository logic.

@chengfang
Copy link
Collaborator

Since the app sources from targetRevision: main, it will not sync up with other branches like the custom write-back-target branch. If you want to keep parameter updates in a separate place, you may want to consider multi-source app, with the 2nd source as a repo keeping helm values file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants