Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-36468: Make sure that policies with no valid peers are enforced #61

Merged
merged 2 commits into from
Oct 10, 2024

Commits on Sep 10, 2024

  1. Run all e2e tests in ./e2e/tests/*.bats

    Signed-off-by: Andrea Panattoni <[email protected]>
    zeeke committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    c9a3100 View commit details
    Browse the repository at this point in the history
  2. Make sure that policies with no valid peers are enforced

    If a policy rule has a `from` (or `to`) selector that matches no pods,
    the subject pod has to not be reached by  (or has to not reach) any pods.
    
    The following example helps clarify the reasons behind these:
    Given a scenario  with 3 pods (A, B, C) and a rule like:
    ```
    podSelector:
        matchLabels:
          name: A
      ingress:
      - from:
        - podSelector:
            matchLabels:
              name: B
      policyTypes:
      - Ingress
    ```
    Pod A can be reached only by pod B. Pod C can't reach A, and this has to be
    ensured even if pod B is deleted.
    
    Add an end-to-end test case to validate this scenario and adjust unit
    tests accordingly.
    
    Signed-off-by: Andrea Panattoni <[email protected]>
    zeeke committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    1065b3c View commit details
    Browse the repository at this point in the history