1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/docs/snippets/bitwarden-secret.yaml
Thibault Cohen 6c070bb538
Add bitwarden example (#2139)
* Add bitwarden example

Signed-off-by: Thibault Cohen <47721+titilambert@users.noreply.github.com>

* Fix bitwarden docs

Signed-off-by: Thibault Cohen <47721+titilambert@users.noreply.github.com>

* fix: punctuation, newline for bullet list

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>

---------

Signed-off-by: Thibault Cohen <47721+titilambert@users.noreply.github.com>
Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Co-authored-by: Moritz Johner <beller.moritz@googlemail.com>
2023-03-20 21:47:47 +01:00

57 lines
1.6 KiB
YAML

{% raw %}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: my-db-secrets
namespace: default
spec:
target:
name: my-db-secrets
deletionPolicy: Delete
template:
type: Opaque
data:
username: |-
{{ .username }}
password: |-
{{ .password }}
postgres-password: |-
{{ .postgres_password }}
postgres-replication-password: |-
{{ .postgres_replication_password }}
db_url: |-
postgresql://{{ .username }}:{{ .password }}@my-postgresql:5432/mydb
data:
- secretKey: username
sourceRef:
storeRef:
name: bitwarden-login
kind: ClusterSecretStore # or SecretStore
remoteRef:
key: aaaabbbb-cccc-dddd-eeee-000011112222
property: username
- secretKey: password
sourceRef:
storeRef:
name: bitwarden-login
kind: ClusterSecretStore # or SecretStore
remoteRef:
key: aaaabbbb-cccc-dddd-eeee-000011112222
property: password
- secretKey: postgres_password
sourceRef:
storeRef:
name: bitwarden-fields
kind: ClusterSecretStore # or SecretStore
remoteRef:
key: aaaabbbb-cccc-dddd-eeee-000011112222
property: admin-password
- secretKey: postgres_replication_password
sourceRef:
storeRef:
name: bitwarden-fields
kind: ClusterSecretStore # or SecretStore
remoteRef:
key: aaaabbbb-cccc-dddd-eeee-000011112222
property: postgres-replication-password
{% endraw %}