apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: grafana-admin
  namespace: observability
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: doppler-hetznerterra
    kind: ClusterSecretStore
  target:
    name: grafana-admin-credentials
    creationPolicy: Owner
    template:
      type: Opaque
      data:
        admin-user: admin
        admin-password: "{{ .grafanaAdminPassword }}"
  data:
    - secretKey: grafanaAdminPassword
      remoteRef:
        key: GRAFANA_ADMIN_PASSWORD
