in controllers/policyendpoints_controller.go [492:507]
func (r *PolicyEndpointsReconciler) deriveDefaultPodIsolation(ctx context.Context, policyEndpoint *policyk8sawsv1.PolicyEndpoint,
ingressRulesCount, egressRulesCount int) (bool, bool) {
isIngressIsolated, isEgressIsolated := false, false
for _, value := range policyEndpoint.Spec.PodIsolation {
if value == networking.PolicyTypeIngress && ingressRulesCount == 0 {
r.log.Info("Default Deny enabled on Ingress")
isIngressIsolated = true
}
if value == networking.PolicyTypeEgress && egressRulesCount == 0 {
r.log.Info("Default Deny enabled on Egress")
isEgressIsolated = true
}
}
return isIngressIsolated, isEgressIsolated
}