apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: auth-generic-oauth-secret
  namespace: gitea 
spec:
  secretStoreRef:
    name: keycloak
    kind: ClusterSecretStore
  refreshInterval: "0"
  target:
    name: auth-generic-oauth-secret
    template:
      engineVersion: v2
      data:
        key: "{{.FORGEJO_CLIENT_ID}}"
        secret: "{{.FORGEJO_CLIENT_SECRET}}"
  data:
    - secretKey: FORGEJO_CLIENT_ID
      remoteRef:
        key: keycloak-clients
        property: FORGEJO_CLIENT_ID
    - secretKey: FORGEJO_CLIENT_SECRET
      remoteRef:
        key: keycloak-clients
        property: FORGEJO_CLIENT_SECRET
