kapp-controller
kapp-controller copied to clipboard
Duplicate Secret Error when Fetching Multiple Private Git Repos with Same Secret
What steps did you take: I have an App that fetches two private git repos. They both use the same secret for auth.
...
fetch:
- git:
url: https://dev.azure.com/example/tap-lab/_git/gitops-platform
ref: origin/1.4
path: clusters/full/app-contents/desired-namespaces
secretRef:
name: git-creds-carvel
- git:
url: https://dev.azure.com/example/tap-lab/_git/gitops-platform
ref: origin/1.4
path: clusters/full/app-contents/desired-namespaces2
secretRef:
name: git-creds-carvel
....
What happened: I get a reconcilation error Useful Error Message: vendir: Error: Syncing directory '0': │ Syncing directory '.' with git contents: │ Fetching git repository: │ Expected to find one secret 'git-creds-carvel', but found multiple
Environment:
- kapp Controller version (execute
kubectl get deployment -n kapp-controller kapp-controller -o yaml
and the annotation iskbld.k14s.io/images
): v0.38.4 - Kubernetes version (use
kubectl version
): v1.23
Hi @doddatpivotal ! Thank you helping make kapp-controller better by finding this.
Our next steps as a team are to reproduce this bug and then to fix it, given the teams current priorities this might not happen for a while. We would love a contribution if you feel like you could do that, we can help guide you if you do opt for making a pull request.
Thanks!
This has been fixed in vendir some time ago. Can we bump vendir dependency in kapp-controller?
@jorgemoralespou This was fixed in vendir v0.34.0 which is being used in the latest kapp-controller release (v0.46.x). Would you be able to try it out and let us know if you are still facing the issue?
@praveenrewar I was confused by this (https://github.com/carvel-dev/kapp-controller/blob/v0.46.1/go.mod#L12). I'll try it tomorrow to see if latest works.