You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With #673helmfile gained support for applying patches via kustomize. The helmfile directives jsonPatches and strategicMergePatches are translated to patchesJson6902 and strategicmergepatches in the generated kustomization.yaml by https://github.com/variantdev/chartify.
Unfortunately both of these directives don't support patching multiple Kubernetes resources at once. This is only supported by kustomize's patches directive (see https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patches/) which in turn both supports strategic merge patches and a JSON patches. kustomize's patches directive accepts partial target specifications, target specification containing regular expressions and even label and annotation selectors.
My use case: I want to add some annotations to all resources of a Helm chart which doesn't support doing so via values.yaml.
This should be addressed by #1592 because the patches section is implemented via the PatchTransformer plugin which should also be usable via the way implemented in #1592. And there are also the AnnotationTransformer and LabelTransformer for my specific use case. Thanks @mumoshu!
With #673
helmfile
gained support for applying patches viakustomize
. Thehelmfile
directivesjsonPatches
andstrategicMergePatches
are translated topatchesJson6902
andstrategicmergepatches
in the generatedkustomization.yaml
by https://github.com/variantdev/chartify.Unfortunately both of these directives don't support patching multiple Kubernetes resources at once. This is only supported by
kustomize
'spatches
directive (see https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patches/) which in turn both supports strategic merge patches and a JSON patches.kustomize
'spatches
directive accepts partial target specifications, target specification containing regular expressions and even label and annotation selectors.My use case: I want to add some annotations to all resources of a Helm chart which doesn't support doing so via
values.yaml
.Proposal: Add this
kustomize
feature via a new Helmfile directivepatches
which gets translated to the directive of the same name in thekustomization.yaml
. The code should be identical to the one already present for thejsonPatches
directive I think. See: https://github.com/variantdev/chartify/blob/d5b0a294ed25506d900c6fe7024a60a557f1c977/patch.go#L47-L109.The text was updated successfully, but these errors were encountered: