mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-10 09:47:28 +00:00
Merge pull request #1846 from SomtochiAma/crd-panic-0.17.2
This commit is contained in:
commit
bbe62d029c
1 changed files with 8 additions and 2 deletions
|
|
@ -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 != "" {
|
||||
|
|
@ -197,6 +199,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…
Reference in a new issue