Skip to content
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

Add insecure-skip-tls-verify #1386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions helm/resource_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var defaultAttributes = map[string]interface{}{
"create_namespace": false,
"lint": false,
"pass_credentials": false,
"insecure_skip_tls_verify": false,
}

func resourceRelease() *schema.Resource {
Expand Down Expand Up @@ -347,6 +348,12 @@ func resourceRelease() *schema.Resource {
return new == ""
},
},
"insecure_skip_tls_verify": {
Type: schema.TypeBool,
Optional: true,
Default: defaultAttributes["insecure_skip_tls_verify"],
Description: "Skip tls certificate checks for the repository",
},
"create_namespace": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -608,6 +615,7 @@ func resourceReleaseCreate(ctx context.Context, d *schema.ResourceData, meta int
client.Replace = d.Get("replace").(bool)
client.Description = d.Get("description").(string)
client.CreateNamespace = d.Get("create_namespace").(bool)
client.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)

if cmd := d.Get("postrender.0.binary_path").(string); cmd != "" {
av := d.Get("postrender.0.args")
Expand Down Expand Up @@ -731,6 +739,7 @@ func resourceReleaseUpdate(ctx context.Context, d *schema.ResourceData, meta int
client.MaxHistory = d.Get("max_history").(int)
client.CleanupOnFail = d.Get("cleanup_on_fail").(bool)
client.Description = d.Get("description").(string)
client.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)

if cmd := d.Get("postrender.0.binary_path").(string); cmd != "" {
av := d.Get("postrender.0.args")
Expand Down Expand Up @@ -942,6 +951,7 @@ func resourceDiff(ctx context.Context, d *schema.ResourceDiff, meta interface{})
install.Replace = d.Get("replace").(bool)
install.Description = d.Get("description").(string)
install.CreateNamespace = d.Get("create_namespace").(bool)
install.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)
install.PostRenderer = postRenderer

values, err := getValues(d)
Expand Down Expand Up @@ -1004,6 +1014,7 @@ func resourceDiff(ctx context.Context, d *schema.ResourceDiff, meta interface{})
upgrade.MaxHistory = d.Get("max_history").(int)
upgrade.CleanupOnFail = d.Get("cleanup_on_fail").(bool)
upgrade.Description = d.Get("description").(string)
upgrade.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)
upgrade.PostRenderer = postRenderer

values, err := getValues(d)
Expand Down
Loading