For a Kubernetes deployment, given a Kustomize Base like:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
images:
- name: developmentregistry.com/myimage:v1.0
Is there a way to change only the image registry and retain the o.g. tag with an Overlay without re-declaring the image using image transformers?
For example if I use an Overlay like:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
images:
- newName: productionregistry.com/myimage
The image is deployed as just productionregistry.com/myimage
— which is not what I want.
How can I make it so my Overlay deployment yields productionregistry.com/myimage:v1.0
? I cannot find any other posts or any issues about this.
Would I have to use Patches instead of image transformers?