apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
  name: allow-s3-traffic
spec:
  description: Policy for egress for CNPG Backups.
  egress:
    - toFQDNs:
      {{- range .Values.s3.hosts }}
        - matchName: {{ . | quote }}
      {{- end }}
      {{- range .Values.s3.patterns }}
        - matchPattern: {{ . | quote }}
      {{- end }}
    - toCIDR:
      {{- range .Values.s3.cidr }}
        - {{ . | quote }}
      {{- end }}
  endpointSelector:
    matchLabels: {}
