mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-24 00:21:46 +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:
parent
d770f3f53f
commit
546be76f55
1 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue