Skip to content

Commit

Permalink
Add support for skip-verify/plain-http
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Sep 5, 2024
1 parent c0ac473 commit fb5ed01
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 6 additions & 4 deletions pkg/apis/helm.cattle.io/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ type HelmChartSpec struct {
FailurePolicy string `json:"failurePolicy,omitempty"`
AuthSecret *corev1.LocalObjectReference `json:"authSecret,omitempty"`

AuthPassCredentials bool `json:"authPassCredentials,omitempty"`
DockerRegistrySecret *corev1.LocalObjectReference `json:"dockerRegistrySecret,omitempty"`
AuthPassCredentials bool `json:"authPassCredentials,omitempty"`
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
PlainHTTP bool `json:"plainHTTP,omitempty"`

PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
DockerRegistrySecret *corev1.LocalObjectReference `json:"dockerRegistrySecret,omitempty"`
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}

type HelmChartStatus struct {
Expand Down
10 changes: 9 additions & 1 deletion pkg/controllers/chart/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const (
var (
commaRE = regexp.MustCompile(`\\*,`)
deletePolicy = metav1.DeletePropagationForeground
DefaultJobImage = "rancher/klipper-helm:v0.9.1-build20240731"
DefaultJobImage = "rancher/klipper-helm:v0.9.2-build20240828"
DefaultFailurePolicy = FailurePolicyReinstall
defaultBackOffLimit = pointer.Int32(1000)

Expand Down Expand Up @@ -505,6 +505,14 @@ func job(chart *v1.HelmChart, apiServerPort string) (*batch.Job, *corev1.Secret,
Name: "AUTH_PASS_CREDENTIALS",
Value: fmt.Sprintf("%t", chart.Spec.AuthPassCredentials),
},
{
Name: "INSECURE_SKIP_TLS_VERIFY",
Value: fmt.Sprintf("%t", chart.Spec.InsecureSkipTLSVerify),
},
{
Name: "PLAIN_HTTP",
Value: fmt.Sprintf("%t", chart.Spec.PlainHTTP),
},
},
SecurityContext: securityContext,
VolumeMounts: []corev1.VolumeMount{
Expand Down

0 comments on commit fb5ed01

Please sign in to comment.