{{- if eq .Values.keycloak.realms.officerPortal.browserFlow "id-gov-ua-officer-redirector" }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: officer-id-gov-ua-client-external-secrets
spec:
  dataFrom:
    - extract:
        conversionStrategy: Default
        decodingStrategy: None
        key: {{ .Values.keycloak.identityProviders.idGovUa.secretKey}}
  refreshInterval: 10s
  secretStoreRef:
    kind: SecretStore
    name: central-vault-secret-store
  target:
    creationPolicy: Owner
    deletionPolicy: Retain
    name: officer-id-gov-ua-client-secret
{{- end }}
