how to make argocd path to a branch instead of main in the git repo

I have the following:

apiVersion: kind: Application metadata: name: crm namespace: default spec: project: default source: repoURL: <my url targetRevision: argocd path: argocd/ destination: server: namespace: default syncPolicy: syncOptions: - CreateNamespace=true automated: selfHeal: true prune: true 

This is working to connect argocd with the main branch, but what if I want it to follow a different branch instead?

Thank you.

1 Answer

No, your example above will make the ArgoCD application load content from:

  • repo: "<my url"
  • targetRevision (branch): "argocd"
  • path (ie. path in repo): "argocd/" meaning it won't load from main/master branch!

Use targetRevision to specify the branch you require if source is a Git repo URL.

See excerpt from the ArgoCD application.yaml docs:

 # Source of the application manifests source: repoURL: # Can point to either a Helm chart repo or a git repo. targetRevision: HEAD # For Helm, this refers to the chart version. path: guestbook # This has no meaning for Helm charts pulled directly from a Helm repo instead of git. 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like