garden
garden copied to clipboard
[FEATURE]: $merge operator should work in Kubernetes manifests
Feature Request
Background / Motivation
$merge
works in config files, but not in external manifests as part of Kubernetes modules.
While you can add a set of common labels using, e.g.:
metadata:
labels: ${var.commonLabels}
...it would be nice to be able to do:
metadata:
labels:
some-label: some-value
$merge: ${var.commonLabels}
What should the user be able to do?
Use $merge
in manifests in Kubernetes modules.
Why do they want to do this? What problem does it solve?
Allows for overriding of maps in manifests.
Suggested Implementation(s)
How important is this feature for you/your team?
🌹 It’s a nice to have, but nice things are nice 🙂
Good suggestion! This would be a neat feature. Hopefully we can have a look at this soon.
This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
This might be related to #3899
We are planning to make some changes in the way we do templating in the K8s manifest files, meanwhile we suggest to use patchResources
as best practice, see: https://docs.garden.io/kubernetes-plugins/actions/deploy/kubernetes#option-1-patching-resources-recommended.