-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: add insecure-skip-tls-verify on helm pull when Creds.InsecureSkipVerify is set to true #6458
fix: add insecure-skip-tls-verify on helm pull when Creds.InsecureSkipVerify is set to true #6458
Conversation
…Verify is set to true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @elucidator ! Added one minor comment
util/helm/cmd.go
Outdated
@@ -219,6 +219,9 @@ func (c *Cmd) Fetch(repo, chartName, version, destination string, creds Creds) ( | |||
if creds.Password != "" { | |||
args = append(args, "--password", creds.Password) | |||
} | |||
if creds.InsecureSkipVerify { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to creds.InsecureSkipVerify && c.insecureSkipVerifySupported
, simiar to:
Line 160 in 6f95950
if opts.InsecureSkipVerify && c.insecureSkipVerifySupported { |
The --insecure-skip-tls-verify
was added recently to helm client and not supported by older versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be needed for the login command as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @elucidator, I did not notice your update. For consistency is good to add the same check to Login
but not must have: Login
command is only available in helm3 which supports skip verify so we can leave it as is.
Codecov Report
@@ Coverage Diff @@
## master #6458 +/- ##
=======================================
Coverage 41.07% 41.07%
=======================================
Files 152 152
Lines 20144 20146 +2
=======================================
+ Hits 8274 8275 +1
Misses 10734 10734
- Partials 1136 1137 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When using an insecure helm repository you are allowed to add that on including the "--insecure-skip..." see (https://github.com/argoproj/argo-cd/blob/master/util/helm/cmd.go#L160)
But when doing an actual fetch for the helm chart this parameter gets omitted.
This PR adds this to the Fetch method (https://github.com/argoproj/argo-cd/blob/master/util/helm/cmd.go#L211)
Fixes:
#4258
#3693
#6376
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: