{{- if .Values.clusterConfig.cilium.enabled }}
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-remote-node-to-metrics-server
  namespace: prometheus
spec:
  description: Allow Remote Metrics Server
  endpointSelector:
    matchLabels:
      app.kubernetes.io/instance: metrics-server
  ingress:
    - fromEntities:
        - remote-node
{{- end }}
