feat: add skipCrds flag for helm charts#8012
Conversation
* replace additionalTemplateArgs with includeCrds flag * add testcase for skip crds Signed-off-by: patst <patrick.steinig@googlemail.com>
afc638f to
2620784
Compare
* replace additionalTemplateArgs with includeCrds flag * add testcase for skip crds Signed-off-by: patst <patrick.steinig@googlemail.com>
# Conflicts: # cmd/util/app.go # pkg/apis/application/v1alpha1/generated.pb.go # pkg/apis/application/v1alpha1/generated.proto # pkg/apis/application/v1alpha1/openapi_generated.go # pkg/apis/application/v1alpha1/types.go
* replace additionalTemplateArgs with includeCrds flag * add testcase for skip crds Signed-off-by: patst <patrick.steinig@googlemail.com>
|
The folks over at |
|
@jplanza-gr Yes. But the correct fix is more #2267. |
Thanks, I'll keep an eye on that issue. |
|
Even though the correct fix for kube-prometheus-stack case would be different I feel like this PR in itself would have value as well. I myself like to manage CRDs separately from applications and would love to see this merged. Some other valid uses have been raised in #4723 |
I agree with @poksiala . This is not completely related to the prometheus helm chart. I would like to have a separate application to maintain the CRD version and therefore have the possibility to skip the installation via the helm3 The |
util/helm/cmd.go
Outdated
| } | ||
| if c.HelmVer.additionalTemplateArgs != nil { | ||
| args = append(args, c.HelmVer.additionalTemplateArgs...) | ||
| if !opts.SkipCrds { |
There was a problem hiding this comment.
Nice, thank you for keeping backward compatible behavior!
Codecov Report
@@ Coverage Diff @@
## master #8012 +/- ##
==========================================
- Coverage 41.54% 41.53% -0.01%
==========================================
Files 174 174
Lines 22696 22711 +15
==========================================
+ Hits 9430 9434 +4
+ Misses 11925 11923 -2
- Partials 1341 1354 +13
Continue to review full report at Codecov.
|
* make sure include crds is not added for helm2 Signed-off-by: patst <patrick.steinig@googlemail.com>
@alexmt : thanks for your feedback. I missed the one condition which makes sure |
|
the Lint docs failed due to an unrelated issue because |
Closes #6252
Checklist:
This PR allows to skip the CRD creation for helm charts by providing a flag
skipCrds.I removed the
additionalTemplateArgsarray in the template options. There was only on entry and it was conflicting in turning crd application off.Helm provides a
skip-crdscommand line argument. But argo-cd useshelm templateto generate rendered YAML files which are applied then. Imhoskip-crdsonly works forhelm install.I am unsure if a better name for the flag would be
include-crdswhich is true by default. This would reflect the current behaviour.From an end user perspective used to the
helm installcommand theskip-crdsflag is what we want to have.