multiline-template-v1-external-secret.yaml 898 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% raw %}
  2. apiVersion: external-secrets.io/v1beta1
  3. kind: ExternalSecret
  4. metadata:
  5. name: template
  6. spec:
  7. refreshInterval: 1h
  8. secretStoreRef:
  9. name: secretstore-sample
  10. kind: SecretStore
  11. target:
  12. name: secret-to-be-created
  13. # v1 is the default version
  14. engineVersion: v1
  15. # this is how the Kind=Secret will look like
  16. template:
  17. type: kubernetes.io/tls
  18. data:
  19. # multiline string
  20. config: |
  21. datasources:
  22. - name: Graphite
  23. type: graphite
  24. access: proxy
  25. url: http://localhost:8080
  26. password: "{{ .password | toString }}" # <-- convert []byte to string
  27. user: "{{ .user | toString }}" # <-- convert []byte to string
  28. data:
  29. - secretKey: user
  30. remoteRef:
  31. key: /grafana/user
  32. - secretKey: password
  33. remoteRef:
  34. key: /grafana/password
  35. {% endraw %}