-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Git Generator fails calling private repo which other ApplicationSets and Applications successfully connect to #20088
Comments
What does the (redacted) secret look like? |
@blakepettersson Thank you for the rapid response. Can you be more specific? What secret are you referring to and how is it associated with the Git Generator? |
@cResults well, if the Git repo is private you would need some credentials to be able to access it. Do you have such a secret and if so what does it look like? |
@blakepettersson ArgoCD has in its UI the ability to connect with a private git repo via https, ssh, GitHub app and Google Cloud. The instance that is failing is configured with ssh as stated above. The repo that the Git Generator is failing to call is currently successfully being called by two ArgoCD Applications and an ApplicationSet using the Cluster Generator. Its only failing whenever the Git Generator is involved. |
@cResults remove the project |
I'm talking about the repository credential... |
Ok. Where? In GitHub, ArgoCD UI, or the ApplicationSet git generator itself? |
So and ran another test to find which logs are generated when the many-apps-single-cluster ApplicationSet (which as the git generator that is failing) was committed into main. Minimal logs in argocd-applicationset-controller may be impacted by this log entry These are the only relevant logs from argocd-applicationset-controller:
The following appear to be relevant from the argocd-repo-server
|
|
@agaudreault you re-labeled this from bug to question. Is there any feedback you can give me as to what might be the issue if its not a bug? |
This seems to be a configuration error as the bug has not yet been identified. See #20088 (comment) for the suggestion on the fix and the release notes for a detailed explanation https://argo-cd.readthedocs.io/en/latest/operator-manual/upgrading/2.11-2.12/ |
Thank you @agaudreault for the link to the release notes. After reading that I found this at the bottom of the Git Generator page. I didn't trust the prior responses as they were asking for the contents of my secret. |
How can I unset the project field for git generator appset? |
Checklist:
argocd version
.Describe the bug
When adding an ApplicationSet that uses a Git Generator to a folder being watched by an app (ie app-of-apps pattern) and the Git Generator is configured with a repoURL that points to a private repo the ApplicationSet fails to deploy its apps throwing the following errors.
Mostly:
Sometimes:
To Reproduce
While this repo doesn't perform the issue out of the box, it has many of the necessary pieces.
Now you should have an instance of ArgoCD that is managing itself with GitOps and a root app-of-apps that points to root-apps directory.
As seen in the image below, we also had ArgoCD configured to manage a downstream cluster, including the single-app-multiple-clusters.yaml moved to the root-apps directory and committed into main successfully deploying apps from the gitops_poc_public repo suggesting there isn't anything wrong with ArgoCD's connection to that git repository.
Now moving the many-apps-single-cluster.yaml to the root-apps directory, I'd expect The error shown in the argocd-applicationset-controller-logs, many-apps-single-cluster with look as it does in the image below and when clicking it one of the errors listed above will be visible.
Expected behavior
An ApplicationSet using a Git Generator should be able to load apps from a private git repository that has been properly configured in ArgoCD confirmed by other ArgoCD Applications and ApplicationSets correctly pulling data from the git repository.
Screen Shot
Version
Logs
argocd-applicationset-controller-logs
This contains what appears to be an error stack
Most important line is
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
UPDATE:
The logs below don't appear to be relevant to the issue. I performed another test starting with both ApplicationSets out of the root-apps directory (App-Of-Apps). When I committed the first ApplicationSet into the root-apps directory that just uses the cluster generator, similar logs to below were added in the argocd-applicationset-controller.
The relevant logs created when the ApplicationSet using git generator was added to root-app and committed into git for both the argocd-applicationset-controller and argocd-repo-server can be found here.
We also have argocd-repo-server logs if you think they would be helpful.
The text was updated successfully, but these errors were encountered: