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:
@@ -182,13 +182,16 @@ func createHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Install: &helmv2.Install{
|
|
||||||
CreateNamespace: helmReleaseArgs.createNamespace,
|
|
||||||
},
|
|
||||||
Suspend: false,
|
Suspend: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if helmReleaseArgs.createNamespace {
|
||||||
|
helmRelease.Spec.Install = &helmv2.Install{
|
||||||
|
CreateNamespace: helmReleaseArgs.createNamespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if helmReleaseArgs.saName != "" {
|
if helmReleaseArgs.saName != "" {
|
||||||
helmRelease.Spec.ServiceAccountName = helmReleaseArgs.saName
|
helmRelease.Spec.ServiceAccountName = helmReleaseArgs.saName
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user