multiline-template-external-secret.yaml 843 B

12345678910111213141516171819202122232425262728293031323334
  1. {% raw %}
  2. apiVersion: external-secrets.io/v1alpha1
  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. # this is how the Kind=Secret will look like
  14. template:
  15. type: kubernetes.io/tls
  16. data:
  17. # multiline string
  18. config: |
  19. datasources:
  20. - name: Graphite
  21. type: graphite
  22. access: proxy
  23. url: http://localhost:8080
  24. password: "{{ .password | toString }}" # <-- convert []byte to string
  25. user: "{{ .user | toString }}" # <-- convert []byte to string
  26. data:
  27. - secretKey: user
  28. remoteRef:
  29. key: /grafana/user
  30. - secretKey: password
  31. remoteRef:
  32. key: /grafana/password
  33. {% endraw %}