Skip to content

Commit

Permalink
Merge branch 'master' into sbapi2
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivnathan authored Oct 2, 2023
2 parents d8382b3 + 74689fa commit 02dc856
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testsupport/tiers/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (a *baseTierChecks) GetNamespaceObjectChecks(nsType string) []namespaceObje
case "stage":
otherNamespaceKind = "dev"
}
checks = append(checks, networkPolicyAllowFromCRW(), networkPolicyAllowFromOtherNamespace(otherNamespaceKind), numberOfNetworkPolicies(7))
checks = append(checks, networkPolicyAllowFromCRW(), networkPolicyAllowFromVirtualizationNamespaces(), networkPolicyAllowFromOtherNamespace(otherNamespaceKind), numberOfNetworkPolicies(8))

return checks
}
Expand Down Expand Up @@ -229,7 +229,7 @@ func (a *base1nsTierChecks) GetNamespaceObjectChecks(_ string) []namespaceObject
crtadminViewRoleBinding(),
}
checks = append(checks, commonNetworkPolicyChecks()...)
checks = append(checks, networkPolicyAllowFromCRW(), numberOfNetworkPolicies(6))
checks = append(checks, networkPolicyAllowFromCRW(), networkPolicyAllowFromVirtualizationNamespaces(), numberOfNetworkPolicies(7))
return checks
}

Expand Down Expand Up @@ -1042,6 +1042,10 @@ func networkPolicyAllowFromConsoleNamespaces() namespaceObjectsCheck {
return networkPolicyIngressFromPolicyGroup("allow-from-console-namespaces", "console")
}

func networkPolicyAllowFromVirtualizationNamespaces() namespaceObjectsCheck {
return networkPolicyIngress("allow-from-openshift-virtualization-os-images", "kubernetes.io/metadata.name", "openshift-virtualization-os-images")
}

func networkPolicyAllowFromCRW() namespaceObjectsCheck {
return networkPolicyIngressFromPolicyGroup("allow-from-codeready-workspaces-operator", "codeready-workspaces")
}
Expand Down

0 comments on commit 02dc856

Please sign in to comment.