theshire/kubernetes/apps/network/cloudflared/app/externalsecret.yaml

30 lines
774 B
YAML
Raw Normal View History

2024-01-12 13:34:23 -06:00
---
# yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: cloudflared
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: cloudflared-secret
creationPolicy: Owner
template:
engineVersion: v2
data:
credentials.json: |
{
"AccountTag": "{{ .cloudflare_tunnel_account_tag }}",
"TunnelSecret": "{{ .cloudflare_tunnel_secret }}",
"TunnelID": "{{ .cloudflare_tunnel_id }}"
}
dataFrom:
- extract:
key: Cloudflare
rewrite:
- regexp:
source: "(.*)"
target: "cloudflare_$1"