{{- if .Values.clusterConfig.cilium.enabled }}
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-s3
  namespace: loki
spec:
  description: Allow loki to ship logs to s3
  egress:
    - toFQDNs:
        - matchPattern: s3.*.oceanbox.io
        - matchPattern: s3.*.itpartner.no
  endpointSelector:
    matchLabels:
      app.kubernetes.io/instance: loki
{{- end }}
