File tree 3 files changed +19
-0
lines changed
3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type HelmChartSpec struct {
30
30
JobImage string `json:"jobImage,omitempty"`
31
31
Timeout * metav1.Duration `json:"timeout,omitempty"`
32
32
FailurePolicy string `json:"failurePolicy,omitempty"`
33
+ NoHooks bool `json:"noHooks,omitempty"`
33
34
}
34
35
35
36
type HelmChartStatus struct {
Original file line number Diff line number Diff line change @@ -462,6 +462,9 @@ func args(chart *helmv1.HelmChart) []string {
462
462
if spec .Version != "" {
463
463
args = append (args , "--version" , spec .Version )
464
464
}
465
+ if spec .NoHooks {
466
+ args = append (args , "--no-hooks" )
467
+ }
465
468
466
469
for _ , k := range keys (spec .Set ) {
467
470
val := spec .Set [k ]
Original file line number Diff line number Diff line change @@ -65,6 +65,21 @@ func TestInstallArgs(t *testing.T) {
65
65
stringArgs )
66
66
}
67
67
68
+ func TestInstallArgsWithNoHooks (t * testing.T ) {
69
+ assert := assert .New (t )
70
+ chart := NewChart ()
71
+ chart .Spec .NoHooks = true
72
+ stringArgs := strings .Join (args (chart ), " " )
73
+ assert .Equal ("install " +
74
+ "--no-hooks " +
75
+ "--set-string acme.dnsProvider.name=cloudflare " +
76
+ "--set-string global.clusterCIDR=10.42.0.0/16\\ ,fd42::/48 " +
77
+ "--set-string global.systemDefaultRegistry= " +
78
+ "--set rbac.enabled=true " +
79
+ "--set ssl.enabled=false" ,
80
+ stringArgs )
81
+ }
82
+
68
83
func TestDeleteArgs (t * testing.T ) {
69
84
assert := assert .New (t )
70
85
chart := NewChart ()
You can’t perform that action at this time.
0 commit comments