I have 2
separate properties
files which contain secrets. I would like to use secretGenerator
and merge them into a single property (i.e. app_properties
).
Here’s the code I’m using but it’s not working:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
secretGenerator:
- name: my-secret
files:
- app_properties=app-default.properties
- app_properties=app-dev.properties
generatorOptions:
disableNameSuffixHash: true
This obviously fails with an error:
error: configmap my-secret illegally repeats the key `app_properties`
I seem to be missing something, but not sure what. Looking at the docs it does sound like I could use mergeBehavior
and have the secretGenerator
create two secrets (one that creates and one that merges), but that did not work as well.
Not sure if what I’m trying to do is possible and if I’m in the right direction. Any ideas?