forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(reposerver): loosen source not permitted helm errors (argoproj#14210
) * fix: loosen source not permitted helm errors With argoproj#12255, we check if a source is first permitted before running `helm template`. This works a bit too well, since this may break previously working manifests. If an `AppProject` has a set of `sourceRepos` which are more restrictive than `*`, and it also has Helm public dependencies (repos with credentials would not work with 2.7x due to the fact they get filtered out before ending up on the repo server). Whereas before this would work, this currently fails on `HEAD` but not in `2.7x`. What we instead do here is that we only run this check if the chart failed to download - if it does then we run a check to see if the repo is in the allowed repos list. If the repo is not in the allowed repos list, we return the same error as in argoproj#12555, otherwise we bubble up the error. Should fix argoproj#13833. Signed-off-by: Blake Pettersson <[email protected]> * fix: check for 401 unauthorized in error The regex check works fine for OCI artifacts, but the flow is slightly different for standard Helm charts (specifically when running `helm repo add`). To get around that, we also check the error for `401 Unauthorized`. Signed-off-by: Blake Pettersson <[email protected]> * fix: loosen string check Signed-off-by: Blake Pettersson <[email protected]> * Revert "chore: revert argoproj#12255 (argoproj#14858)" This reverts commit c8ae5bc. Signed-off-by: Blake Pettersson <[email protected]> * wip Signed-off-by: Blake Pettersson <[email protected]> * wip Signed-off-by: Blake Pettersson <[email protected]> * chore: reword test to reduce confusion Signed-off-by: Blake Pettersson <[email protected]> --------- Signed-off-by: Blake Pettersson <[email protected]>
- Loading branch information
1 parent
65f5259
commit 0133be8
Showing
12 changed files
with
524 additions
and
215 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
Oops, something went wrong.