mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-15 17:51:01 +00:00
45e2bd3796
Signed-off-by: Robert Paschedag <robert.paschedag@sap.com> Co-authored-by: Robert Paschedag <robert.paschedag@sap.com>
23 lines
562 B
YAML
23 lines
562 B
YAML
{% raw %}
|
|
apiVersion: external-secrets.io/v1beta1
|
|
kind: ExternalSecret
|
|
metadata:
|
|
name: my-template-example
|
|
spec:
|
|
# ...
|
|
target:
|
|
name: secret-to-be-created
|
|
template:
|
|
engineVersion: v2
|
|
templateFrom:
|
|
- target: Data
|
|
literal: |-
|
|
{{- $creds := list }}
|
|
{{- range $user, $pw := . }}
|
|
{{- $creds = append $creds (printf "%s" (htpasswd $user $pw)) }}
|
|
{{- end }}
|
|
auth: {{ $creds | join "\n" | quote }}
|
|
dataFrom:
|
|
- extract:
|
|
key: /ingress-controller/valid-users
|
|
{% endraw %}
|