apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-prometheus-metrics
  namespace: argocd
spec:
  description: Allow access to the Prometheus metrics
  endpointSelector:
    matchLabels:
      app.kubernetes.io/instance: argocd
  ingress:
    - fromEndpoints:
        - matchLabels:
            io.kubernetes.pod.namespace: prometheus
      toPorts:
        - ports:
            - port: "8082"
              protocol: TCP
            - port: "8080"
              protocol: TCP
            - port: "9001"
              protocol: TCP
            - port: "9121"
              protocol: TCP
            - port: "8084"
              protocol: TCP
            - port: "8083"
              protocol: TCP
            - port: "5558"
              protocol: TCP
