1
0
mirror of synced 2026-02-06 19:05:55 +00:00

fix: don't set 'Install' field by default in 'create hr'

This fixes the case where you create a HelmRelease with `--export` and
the `install: {}` field being there, adding no value to the manifest.

Signed-off-by: Max Jonas Werner <mail@makk.es>
This commit is contained in:
Max Jonas Werner
2021-09-16 15:54:58 +02:00
parent d770f3f53f
commit 546be76f55

View File

@@ -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
}