1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/docs/snippets/merge-template-v2-external-secret.yaml
Gustavo Fernandes de Carvalho ad67363751
Implements template MergePolicy. Fixes a few template merging bugs (#2115)
Signed-off-by: Gustavo Carvalho <gusfcarvalho@gmail.com>
2023-03-20 19:22:30 -03:00

22 lines
541 B
YAML

{% raw %}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: template
spec:
# ...
target:
template:
mergePolicy: Merge
engineVersion: v2
data:
name: admin
password: "{{ .password | b64dec }}" # Overwrites the password from the data call and use this output
data:
- secretKey: password
remoteRef:
key: /credentials/password
- secretKey: username # Preserves the username in the templated Secret
remoteRef:
key: /credentials/username
{% endraw %}