-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(appset): allow usage of project-scoped repos in git generators
With #18388, we added the possibility of being able to create a repository credential with the same URL per AppProject (previously one could only create one credential globally for the same URL). Sadly, this caused a regression in regards to ApplicationSets. Now, any credential that is used for an appset needs to have an unset appproject. This fixes it by using the same semantics as the API server (used when doing `argocd repo get` or `argocd repo delete`: * If there is only one repo credential with the given URL and there is no AppProject set on the Git genertor - use that. * If an AppProject is specified on the Git generator and the single repo cred does not match it, return an error. * If there are multiple repo credentials with the same URL, return an error if none matches the given project passed in from the git generator This could potentially be split into two PRs; one to allow for a more flexible retrieval of a _single_ URL, which can be backported to 2.12 - 2.13, and another with the CRD changes which would allow a project to be specified on the Git generator, which would go in 2.14+. Signed-off-by: Blake Pettersson <[email protected]>
- Loading branch information
1 parent
87c853e
commit 63c7a0f
Showing
18 changed files
with
841 additions
and
728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.