Replies: 2 comments
-
You cannot use Kustomize to add a hash-suffix to an existing ConfigMap that you are providing yourself. Kustomize only adds hash-suffixes to ConfigMaps that are generated by Kustomize. I assume the file What you should do is this: resources:
- deployment.yaml # or some other workload that consumes the ConfigMap named `caddy-config`
configMapGenerator:
- name: caddy-config
files:
- Caddyfile |
Beta Was this translation helpful? Give feedback.
-
You can. It is just not documented and uses an internal annotation - but it works. TLDR: This annotation does the trick to apply hashes to existing configmaps.
Unfortunately the problem is also is a bit more complex than it should be. If I merge a generated map with an existing map the hash does not get applied either.
That's really not what I want to do though. |
Beta Was this translation helpful? Give feedback.
-
I really don't get the config map hashing feature as documented.
What I want:
List all the configmaps in the config that should be renamed to their name with their content hash added as a suffix.
Is this possible or not? The
configMapGenerator
does not really seem to help here.What I tried
Which already is a bit flawed because I want configmap caddy - but in the infra namespace.
What I would like is to have this modification:
Beta Was this translation helpful? Give feedback.
All reactions