Skip to content

Commit

Permalink
Add support for --skip-crds helm install flag
Browse files Browse the repository at this point in the history
  • Loading branch information
svvac committed Jun 10, 2024
1 parent 3b100ff commit 20c03e5
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/helm.cattle.io/v1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/apis/helm.cattle.io/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type HelmChartSpec struct {
JobImage string `json:"jobImage,omitempty"`
BackOffLimit *int32 `json:"backOffLimit,omitempty"`
Timeout *metav1.Duration `json:"timeout,omitempty"`
SkipCRDs bool `json:"skipCRDs,omitempty"`
FailurePolicy string `json:"failurePolicy,omitempty"`
AuthSecret *corev1.LocalObjectReference `json:"authSecret,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/helm.cattle.io/v1/zz_generated_deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/helm.cattle.io/v1/zz_generated_list_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/helm.cattle.io/v1/zz_generated_register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/helm.cattle.io/zz_generated_register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/controllers/chart/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,10 @@ func args(chart *v1.HelmChart) []string {
args = append(args, "--version", spec.Version)
}

if spec.SkipCRDs {
args = append(args, "--skip-crds")
}

for _, k := range keys(spec.Set) {
val := spec.Set[k]
if typedVal(val) {
Expand Down
4 changes: 3 additions & 1 deletion pkg/controllers/chart/chart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func TestInstallArgs(t *testing.T) {
assert := assert.New(t)
stringArgs := strings.Join(args(NewChart()), " ")
assert.Equal("install "+
"--skip-crds "+
"--set-string acme.dnsProvider.name=cloudflare "+
"--set-string global.clusterCIDR=10.42.0.0/16\\,fd42::/48 "+
"--set-string global.systemDefaultRegistry= "+
Expand All @@ -163,7 +164,8 @@ func TestDeleteArgs(t *testing.T) {
func NewChart() *v1.HelmChart {
return v1.NewHelmChart("kube-system", "traefik", v1.HelmChart{
Spec: v1.HelmChartSpec{
Chart: "stable/traefik",
Chart: "stable/traefik",
SkipCRDs: true,
Set: map[string]intstr.IntOrString{
"rbac.enabled": intstr.Parse("true"),
"ssl.enabled": intstr.Parse("false"),
Expand Down
2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/fake/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/scheme/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/controllers/helm.cattle.io/factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/controllers/helm.cattle.io/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/controllers/helm.cattle.io/v1/helmchart.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/controllers/helm.cattle.io/v1/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20c03e5

Please sign in to comment.