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

202: Add Support for PlainHTTP for flexibility in chart downloads #255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions apis/release/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ type ReleaseParameters struct {
SkipCRDs bool `json:"skipCRDs,omitempty"`
// InsecureSkipTLSVerify skips tls certificate checks for the chart download
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
// PlainHTTP uses insecure HTTP connections for the chart download
PlainHTTP bool `json:"plainHTTP,omitempty"`
}

// ReleaseObservation are the observable fields of a Release.
Expand Down
4 changes: 4 additions & 0 deletions package/crds/helm.crossplane.io_releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,10 @@ spec:
type: object
type: object
type: array
plainHTTP:
description: PlainHTTP uses insecure HTTP connections for the
chart download
type: boolean
set:
items:
description: SetVal represents a "set" value override in a Release
Expand Down
2 changes: 2 additions & 0 deletions pkg/clients/helm/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ type Args struct {
SkipCRDs bool
// InsecureSkipTLSVerify skips tls certificate checks for the chart download
InsecureSkipTLSVerify bool
// PlainHTTP uses HTTP connections for the chart download
PlainHTTP bool
}
3 changes: 3 additions & 0 deletions pkg/clients/helm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func NewClient(log logging.Logger, restConfig *rest.Config, argAppliers ...ArgsA
pc.DestDir = chartCache
pc.Settings = &cli.EnvSettings{}
pc.InsecureSkipTLSverify = args.InsecureSkipTLSVerify
pc.PlainHTTP = args.PlainHTTP

gc := action.NewGet(actionConfig)

Expand All @@ -124,12 +125,14 @@ func NewClient(log logging.Logger, restConfig *rest.Config, argAppliers ...ArgsA
ic.Timeout = args.Timeout
ic.SkipCRDs = args.SkipCRDs
ic.InsecureSkipTLSverify = args.InsecureSkipTLSVerify
ic.PlainHTTP = args.PlainHTTP

uc := action.NewUpgrade(actionConfig)
uc.Wait = args.Wait
uc.Timeout = args.Timeout
uc.SkipCRDs = args.SkipCRDs
uc.InsecureSkipTLSverify = args.InsecureSkipTLSVerify
uc.PlainHTTP = args.PlainHTTP

uic := action.NewUninstall(actionConfig)
uic.Wait = args.Wait
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func withRelease(cr *v1beta1.Release) helmClient.ArgsApplier {
config.Timeout = waitTimeout(cr)
config.SkipCRDs = cr.Spec.ForProvider.SkipCRDs
config.InsecureSkipTLSVerify = cr.Spec.ForProvider.InsecureSkipTLSVerify
config.PlainHTTP = cr.Spec.ForProvider.PlainHTTP
}
}

Expand Down