Currently, many options within kustomization.yaml
are global, such as commonLabels
, namespace
, etc. This can lead to issues when you want to create an overlay which includes multiple resources, some sharing values such as the namespace, but then some monitoring resources also needing to be created in a different namespace. I'll provide an example to illustrate my problem.
I'm currently trying to define a "monitoring" overlay which is composed of multiple applications: prometheus-operator, grafana, etc. I also have an overlay for each K8s environment I manage: example, dev, staging and production each have their own overlay. Each environment overlay would include the monitoring
overlay.
# environments/dev/kustomization.yaml