charts/kustomization-components/external-secret.yaml

32 lines
1 KiB
YAML

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: dispatch
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: dispatch-secret
creationPolicy: Owner
template:
engineVersion: v2
data:
# Dispatch
DATABASE_CREDENTIALS: "{{ .DISPATCH_POSTGRES_USERNAME }}:{{ .DISPATCH_POSTGRES_PASSWORD }}"
DISPATCH_ENCRYPTION_KEY: "{{ .DISPATCH_ENCRYPTION_KEY }}"
DISPATCH_JWT_SECRET: "{{ .DISPATCH_JWT_SECRET }}"
# Postgres Init
INIT_POSTGRES_DBNAME: "dispatch"
INIT_POSTGRES_HOST: "postgres-rw.databases.svc.cluster.local"
INIT_POSTGRES_USER: "{{ .DISPATCH_POSTGRES_USERNAME }}"
INIT_POSTGRES_PASS: "{{ .DISPATCH_POSTGRES_PASSWORD }}"
INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_SUPER_PASS }}"
# Vars
PUBLIC_DOMAIN: ${PUBLIC_DOMAIN}
TAILNET_DOMAIN: ${TAILNET_DOMAIN}
dataFrom:
- extract:
key: dispatch
- extract:
key: postgres