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

Check for nil pointer before setting createNamespace in helmrelease

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2021-09-21 14:37:20 +01:00
parent 64f39e160b
commit 68a89d3cd4

View File

@@ -187,9 +187,11 @@ func createHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
}
if helmReleaseArgs.createNamespace {
helmRelease.Spec.Install = &helmv2.Install{
CreateNamespace: helmReleaseArgs.createNamespace,
if helmRelease.Spec.Install == nil {
helmRelease.Spec.Install = &helmv2.Install{}
}
helmRelease.Spec.Install.CreateNamespace = helmReleaseArgs.createNamespace
}
if helmReleaseArgs.saName != "" {