diff --git a/cmd/flux/create_helmrelease.go b/cmd/flux/create_helmrelease.go index f3373696..6b569d89 100644 --- a/cmd/flux/create_helmrelease.go +++ b/cmd/flux/create_helmrelease.go @@ -182,13 +182,16 @@ func createHelmReleaseCmdRun(cmd *cobra.Command, args []string) error { }, }, }, - Install: &helmv2.Install{ - CreateNamespace: helmReleaseArgs.createNamespace, - }, Suspend: false, }, } + if helmReleaseArgs.createNamespace { + helmRelease.Spec.Install = &helmv2.Install{ + CreateNamespace: helmReleaseArgs.createNamespace, + } + } + if helmReleaseArgs.saName != "" { helmRelease.Spec.ServiceAccountName = helmReleaseArgs.saName }