Skip to content

Commit 1fd4b79

Browse files
committed
Fixes #25 by verifying if the string is a boolean
1 parent 3e223ca commit 1fd4b79

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/helm/controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"os"
99
"sort"
1010

11-
"k8s.io/apimachinery/pkg/types"
1211
helmv1 "github.com/rancher/helm-controller/pkg/apis/helm.cattle.io/v1"
1312
helmcontroller "github.com/rancher/helm-controller/pkg/generated/controllers/helm.cattle.io/v1"
1413
batchcontroller "github.com/rancher/wrangler-api/pkg/generated/controllers/batch/v1"
@@ -24,6 +23,7 @@ import (
2423
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
2524
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2625
"k8s.io/apimachinery/pkg/runtime"
26+
"k8s.io/apimachinery/pkg/types"
2727
"k8s.io/apimachinery/pkg/util/intstr"
2828
)
2929

@@ -320,7 +320,9 @@ func args(chart *helmv1.HelmChart) []string {
320320

321321
for _, k := range keys(spec.Set) {
322322
val := spec.Set[k]
323-
if val.StrVal != "" {
323+
if val.StrVal == "false" || val.StrVal == "true" {
324+
args = append(args, "--set", fmt.Sprintf("%s=%s", k, val.StrVal))
325+
} else if val.StrVal != "" {
324326
args = append(args, "--set-string", fmt.Sprintf("%s=%s", k, val.StrVal))
325327
} else {
326328
args = append(args, "--set", fmt.Sprintf("%s=%d", k, val.IntVal))

0 commit comments

Comments
 (0)