apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: grafana-oauth-secret
  namespace: grafana-operator
  labels:
    app.kubernetes.io/name: grafana-oauth-secret
    app.kubernetes.io/instance: grafana-operator
    app.kubernetes.io/part-of: grafana-operator
spec:
  secretStoreRef:
    kind: ClusterSecretStore
    name: vault
  data:
    - secretKey: AUTH_CLIENT_ID
      remoteRef:
        conversionStrategy: Default
        decodingStrategy: None
        key: /authentik/oidc/grafana
        metadataPolicy: None
        property: client
    - secretKey: AUTH_CLIENT_SECRET
      remoteRef:
        conversionStrategy: Default
        decodingStrategy: None
        key: /authentik/oidc/grafana
        metadataPolicy: None
        property: secret
