Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-77662

MultiNetworkPolicy namespaceSelector is not working as expected

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • Yes
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem: On OCP 4.22, multiNetworkPolicy with namespaceSelectors is not working as expected.

      Version-Release number of selected component (if applicable):

      How reproducible: 100%

      Steps to Reproduce: Use below MultiNetworkPolicy to test.

      https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-77204

       

      apiVersion: k8s.cni.cncf.io/v1beta1
      kind: MultiNetworkPolicy
      metadata:
        annotations:
          k8s.v1.cni.cncf.io/policy-for: policy-test-ns1/bond-nad,policy-test-ns2/bond-nad
        name: egress-nssel
        namespace: policy-test-ns1
      spec:
        podSelector:
          matchLabels:
            app: pod1
        policyTypes:
        - Egress
        egress:
        - to:
           - namespaceSelector:
               matchLabels:
                 ns: ns2
      

       

      Actual results: whole egress is blocked 

      Expected results: egress should work from pod1 to pods in namespace2

      Additional info: 

      Other Failed Tests Links:

      https://github.com/openshift-kni/cnf-features-deploy/blob/c218211f252964f7a27fca08e69d5878c5838b40/cnf-tests/testsuites/e2esuite/multinetworkpolicy/multinetworkpolicy_sriov.go#L413

      https://github.com/openshift-kni/cnf-features-deploy/blob/c218211f252964f7a27fca08e69d5878c5838b40/cnf-tests/testsuites/e2esuite/multinetworkpolicy/multinetworkpolicy_sriov.go#L467

      https://github.com/openshift-kni/cnf-features-deploy/blob/c218211f252964f7a27fca08e69d5878c5838b40/cnf-tests/testsuites/e2esuite/multinetworkpolicy/multinetworkpolicy_sriov.go#L413

       

              apanatto@redhat.com Andrea Panattoni
              rh-ee-ajaggapa Anvesh Jaggapatruni
              Anvesh Jaggapatruni Anvesh Jaggapatruni
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: