Replies: 1 comment
-
Your transformers are not global, and are applied to the resources they are declared with (your base/). There are some examples/use cases of Components in the documentation |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to refactor some Kubernetes applications to make use of bases and overlays but I'm running into an issue where labels and annotations are not being applied correctly to some specific resource files.
Basically, I have a base configuration consisting of
config-map.yaml
,service.yaml
,deployment.yaml
,kustomization.yaml
, andvirtual-service.yaml
. These files contain common configuration settings that apply to all environments. This is the basekustomization.yaml
:I have one environment that doesn't require new resources — and everything works well. In another environment, where I need to add two additional configuration files:
autoscaler.yaml
anddestination-rules.yaml
, the labels, annotations, and some other transformations (e.g.:namePrefix
) from the basekustomization.yaml
are not being correctly applied to these additional files.The
kustomization.yaml
for this environment looks like:Is there a way to resolve this issue? It looks like a pretty common use case 🤔
I did try using components as well, but I've got exactly the same output.
Beta Was this translation helpful? Give feedback.
All reactions