{{- if .Values.clusterConfig.cilium.enabled }}
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-egress-openfga
  namespace: {{ .Release.Namespace }}
spec:
  egress:
  - toEndpoints:
    - matchLabels:
        k8s:io.kubernetes.pod.namespace: openfga
  endpointSelector:
    matchLabels:
      app.kubernetes.io/name: atlantis
{{- end }}
