Skip to content

Add support for --insecure-skip-tls-verify #462

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

Merged
merged 1 commit into from
Jun 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/helm3.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ func (d *diffCmd) template(isUpgrade bool) ([]byte, error) {
for _, arg := range d.postRendererArgs {
flags = append(flags, "--post-renderer-args", arg)
}
if d.insecureSkipTLSVerify {
flags = append(flags, "--insecure-skip-tls-verify")
}
// Helm automatically enable --reuse-values when there's no --set, --set-string, --set-values, --set-file present.
// Let's simulate that in helm-diff.
// See https://medium.com/@kcatstack/understand-helm-upgrade-flags-reset-values-reuse-values-6e58ac8f127e
Expand Down
2 changes: 2 additions & 0 deletions cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type diffCmd struct {
includeTests bool
postRenderer string
postRendererArgs []string
insecureSkipTLSVerify bool
install bool
normalizeManifests bool
threeWayMerge bool
Expand Down Expand Up @@ -197,6 +198,7 @@ func newChartCommand() *cobra.Command {
f.BoolVar(&diff.dryRun, "dry-run", false, "disables cluster access and show diff as if it was install. Implies --install, --reset-values, and --disable-validation")
f.StringVar(&diff.postRenderer, "post-renderer", "", "the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path")
f.StringArrayVar(&diff.postRendererArgs, "post-renderer-args", []string{}, "an argument to the post-renderer (can specify multiple)")
f.BoolVar(&diff.insecureSkipTLSVerify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")
f.BoolVar(&diff.normalizeManifests, "normalize-manifests", false, "normalize manifests before running diff to exclude style differences from the output")

AddDiffOptions(f, &diff.Options)
Expand Down