theshire/kubernetes/apps/database/mariadb/cluster/externalsecret.yaml

27 lines
695 B
YAML

---
# yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: &name mariadb
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: mariadb-secret
template:
engineVersion: v2
data:
AWS_ACCESS_KEY_ID: "{{ .minio_mariadb_access_key }}"
AWS_SECRET_ACCESS_KEY: "{{ .minio_mariadb_secret_key }}"
dataFrom:
- extract:
key: minio
rewrite:
- regexp:
source: "[-]"
target: "_"
- regexp:
source: "(.*)"
target: "minio_$1"