bitwarden-secret.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% raw %}
  2. apiVersion: external-secrets.io/v1beta1
  3. kind: ExternalSecret
  4. metadata:
  5. name: my-secrets
  6. namespace: default
  7. spec:
  8. target:
  9. name: my-secrets
  10. deletionPolicy: Delete
  11. template:
  12. type: Opaque
  13. data:
  14. username: |-
  15. {{ .username }}
  16. password: |-
  17. {{ .password }}
  18. postgres-password: |-
  19. {{ .postgres_password }}
  20. postgres-replication-password: |-
  21. {{ .postgres_replication_password }}
  22. db_url: |-
  23. postgresql://{{ .username }}:{{ .password }}@my-postgresql:5432/mydb
  24. service_account_key: |-
  25. {{ .service_account_key }}
  26. ssh_pub_key: |-
  27. {{ .ssh_pub_key }}
  28. data:
  29. - secretKey: username
  30. sourceRef:
  31. storeRef:
  32. name: bitwarden-login
  33. kind: ClusterSecretStore # or SecretStore
  34. remoteRef:
  35. key: aaaabbbb-cccc-dddd-eeee-000011112222
  36. property: username
  37. - secretKey: password
  38. sourceRef:
  39. storeRef:
  40. name: bitwarden-login
  41. kind: ClusterSecretStore # or SecretStore
  42. remoteRef:
  43. key: aaaabbbb-cccc-dddd-eeee-000011112222
  44. property: password
  45. - secretKey: postgres_password
  46. sourceRef:
  47. storeRef:
  48. name: bitwarden-fields
  49. kind: ClusterSecretStore # or SecretStore
  50. remoteRef:
  51. key: aaaabbbb-cccc-dddd-eeee-000011112222
  52. property: admin-password
  53. - secretKey: postgres_replication_password
  54. sourceRef:
  55. storeRef:
  56. name: bitwarden-fields
  57. kind: ClusterSecretStore # or SecretStore
  58. remoteRef:
  59. key: aaaabbbb-cccc-dddd-eeee-000011112222
  60. property: postgres-replication-password
  61. - secretKey: service_account_key
  62. sourceRef:
  63. storeRef:
  64. name: bitwarden-notes
  65. kind: ClusterSecretStore # or SecretStore
  66. remoteRef:
  67. key: service_account_key
  68. - secretKey: ssh_pub_key
  69. sourceRef:
  70. storeRef:
  71. name: bitwarden-attachments
  72. kind: ClusterSecretStore # or SecretStore
  73. remoteRef:
  74. key: aaaabbbb-cccc-dddd-eeee-000011112222
  75. property: id_rsa.pub
  76. {% endraw %}