Skip to content
Snippets Groups Projects
Commit 68a89d3c authored by Somtochi Onyekwere's avatar Somtochi Onyekwere
Browse files

Check for nil pointer before setting createNamespace in helmrelease

parent 64f39e16
No related branches found
No related tags found
No related merge requests found
......@@ -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 != "" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment