Uploaded image for project: 'Operator Runtime'
  1. Operator Runtime
  2. OPRUN-3873

Add test that requires justification for each NetworkPolicy Rule

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • None
    • Lillipup Sprint 272

      In order to ensure NetworkPolicy changes have sufficient review context, let's implement a test that ensures that each network policy rule present in our NetworkPolicy objects are separately "registered" with a provided justification.

      The test would likely need to be run in the context of the e2e tests so that it has access to the actual NetworkPolicy objects that were installed via our release manifest into the cluster.

      The test should:

      1. Define a registry of "allowedNetworkPolicies", which would map a network policy name to a set of ingress and egress rules + justifications.
      2. Validate that each justification is at least 40 characters.
      3. Gather all of the NetworkPolicy objects in the OLMv1 system namespace
      4. For each NetworkPolicy object in the cluster, validate that:
        1. It is present in the allowedNetworkPolicies registry
        2. The cluster rules match the registry rules (we don't want either list to have extra rules that the other doesn't have).

              anik120 Anik Bhattacharjee
              jlanford@redhat.com Joe Lanford
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: