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:
parent
95bb5f9345
commit
0334c2801c
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue