I am using Kustomize to manage multiple variations of the same cluster. I am using nameSuffix
option to add a suffix to all my resources:
nameSuffix: -mysfx
My problem is that everything works fine but adding this suffix only to one Service resource cause me an issue. My problem is that the application (Patroni) interact with a service that must be called:
CLUSTER-NAME-config
so I want to exclude this single resource from the nameSuffix
. I know this is not possible due to how this feature was designed. I read several articles here on StackOverflow and on the web. I know I can skip the use of nameSuffix
for a category of resources. So I tried to put in my kustomization.yaml
the rows:
configurations:
- kustomize-config/kustomize-config.yaml
to skip all the Service resources. Then in the file kustomize-config/kustomize-config.yaml
nameSuffix:
- path: metadata/name
apiVersion: v1
kind: Service
skip: true
but this doesn't work.
Does anyone know what's wrong with this configuration?
Then suppose I am able now to skip the use of nameSuffix
for only Service resources, I have other two Services where I want to add this suffix. What do I have to do to add nameSuffix
to these two Services and not the one mentioned above?
If there is a better solution for this, please let me know.