Skip to content

Commit

Permalink
feat: add caFile Helm option (#166)
Browse files Browse the repository at this point in the history
* feat: add CA file Helm option

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* feat: add CA file Helm option

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

---------

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
  • Loading branch information
TylerGillson authored Dec 26, 2023
1 parent ad78ea4 commit 2425599
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/validatorconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type HelmChart struct {
Name string `json:"name" yaml:"name"`
Repository string `json:"repository" yaml:"repository"`
Version string `json:"version" yaml:"version"`
CaFile string `json:"caFile,omitempty" yaml:"caFile,omitempty"`
InsecureSkipTlsVerify bool `json:"insecureSkipVerify,omitempty" yaml:"insecureSkipVerify,omitempty"`
AuthSecretName string `json:"authSecretName,omitempty" yaml:"authSecretName,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
properties:
authSecretName:
type: string
caFile:
type: string
insecureSkipVerify:
type: boolean
name:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
properties:
authSecretName:
type: string
caFile:
type: string
insecureSkipVerify:
type: boolean
name:
Expand Down
5 changes: 5 additions & 0 deletions pkg/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ func (c *helmClient) run(name, namespace string, options UpgradeOptions, command
if options.Atomic {
args = append(args, "--atomic")
}

// TLS options
if options.CaFile != "" {
args = append(args, "--ca-file", options.CaFile)
}
if options.InsecureSkipTlsVerify {
args = append(args, "--insecure-skip-tls-verify")
}
Expand Down
1 change: 1 addition & 0 deletions pkg/helm/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type UpgradeOptions struct {
Force bool
CreateNamespace bool

CaFile string
InsecureSkipTlsVerify bool

ExtraArgs []string
Expand Down

0 comments on commit 2425599

Please sign in to comment.