It it possible to add stringData values to a secret using a secretGenerator with behavior: merge?
For example:
$ cat my_secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: my-secret
stringData:
FIRST_SECRET: foo
$ cat kustomization.yaml
resources:
- my_secret.yaml
secretGenerator:
- name: my-secret
behavior: merge
literals:
- SECOND_SECRET=bar
$ kustomize build .
apiVersion: v1
data:
SECOND_SECRET: YmFy
kind: Secret
metadata:
annotations: {}
labels: {}
name: my-secret
type: Opaque
Is there a way for the resulting my-secret to have both FIRST_SECRET: foo and SECOND_SECRET: bar as stringData? In this example I could use a JSON patch to accomplish this, but I think it'd be cleaner to use a secretGenerator to do this.
Thanks for your help.
It it possible to add
stringDatavalues to a secret using asecretGeneratorwithbehavior: merge?For example:
Is there a way for the resulting
my-secretto have bothFIRST_SECRET: fooandSECOND_SECRET: barasstringData? In this example I could use a JSON patch to accomplish this, but I think it'd be cleaner to use asecretGeneratorto do this.Thanks for your help.