Have Kustomize inject dynamic values via ConfigMap
After building many K8 clusters via Kustomize/Flux, I feel there are ways we can reduce the number of overlays for a given cluster or application.
If a base manifest can leverage reading values lets say spec.container[0].image via configMap key/value file, it would eliminate the need for an overlay directory.
Consider creating an entire Kubernetes cluster with base manifests and then think about the overlays everytime you build a new cluster? So creating a ConfigMap with default values in base, and then ConfigMap for the new cluster or an application can simplify many complicated usecases.
I do not know if this can be handled by Kustomize or Kustomize-Controller at this point.
The Kustomize-controller has variable substitution, is this what you are looking for?