1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

fix: template funcs need to be wrapped in raw block (#2642)

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
This commit is contained in:
Moritz Johner 2023-08-23 11:08:40 +02:00 committed by GitHub
parent 95bb5f9345
commit 0334c2801c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,7 @@ kubectl get secret secret-to-be-created -n <namespace> -o jsonpath="{.data\.dock
Alternately, if you only have the container registry name and password value, you can take advantage of the advanced ExternalSecret templating functions to create the secret:
```yaml
{% raw %}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
@ -51,8 +52,7 @@ spec:
template:
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: '{"auths":{"{{ .registryName | lower }}.{{ .registryHost }}":{"username":"{{ .registryName }}","password":"{{ .password }}",
"auth":"{{ printf "%s:%s" .registryName .password | b64enc }}"}}}'
.dockerconfigjson: '{"auths":{"{{ .registryName | lower }}.{{ .registryHost }}":{"username":"{{ .registryName }}","password":"{{ .password }}", "auth":"{{ printf "%s:%s" .registryName .password | b64enc }}"}}}'
data:
- secretKey: registryName
remoteRef:
@ -63,6 +63,7 @@ spec:
- secretKey: password
remoteRef:
key: secret/docker-registry-password
{% endraw %}
```
## TLS Cert example