{{- if .Values.clusterConfig.cilium.enabled }}
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
  name: allow-host-port-9070
  namespace: csi-addons-system
spec:
  endpointSelector:
    matchLabels:
      app.kubernetes.io/name: csi-addons
  egress:
  - toEntities:
    - host
    toPorts:
    - ports:
      - port: "9070"
        protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: addons-to-remote-node
  namespace: csi-addons-system
spec:
  description: remote node
  egress:
    - toEntities:
        - remote-node
  endpointSelector: {}
{{- end }}
