Using YAML anchors across separate garden action m...
# 🌱|help-and-getting-started
m
Can YAML anchors be referenced from multiple garden action manifests? One example of this is using the same patchResources section for deploy and run actions that use the same set of env variables.
m
f
I think I had the same question around YAML anchors/references a couple of years ago and in 0.12 at least I believe they were intentionally not supported. That being said we are using them in a Kubernetes deploy action in order to not duplicate all the Ingress http routing rules a bunch of times. I believe that works because they are passed straight onto the K8s cluster without much interpretation by Garden. I second the config templates suggestion above though.
m
the workaround is probably to define a secret/configmap resource with garden using patchresources to insert the runtime values, then refer to that secret/configmap in the deployment manifest to avoid having multiple duplicate patchresources blocks