Check if helmRelease.Spec.Install is nil

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
pull/1846/head
Somtochi Onyekwere 3 years ago
parent 3a76c26822
commit 64f39e160b

@ -197,6 +197,10 @@ func createHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
}
if helmReleaseArgs.crds != "" {
if helmRelease.Spec.Install == nil {
helmRelease.Spec.Install = &helmv2.Install{}
}
helmRelease.Spec.Install.CRDs = helmv2.Create
helmRelease.Spec.Upgrade = &helmv2.Upgrade{CRDs: helmv2.CRDsPolicy(helmReleaseArgs.crds.String())}
}

Loading…
Cancel
Save