cancel
Showing results for 
Search instead for 
Did you mean: 
  • 2,601 Views

DO280 - Question to Lab Ch10.2 - compreview-review

Jump to solution

Hello, 

 

in the tasks for the compreview-review labs we have to configure also an "network policy template" for ingress traffic:

  • Must accept traffic only from within the same workshop or from the ingress controller.

I copied the example for the ingress controller from the official RedHat documentation:

matchLabels:
   policy-group.network.openshift.io/ingress: ""

Chapter 20. Network policy OpenShift Container Platform 4.12 | Red Hat Customer Portal
20.1.1.1. Using the allow-from-router network policy

but the "grade-script" doesn't accept this code. It want the following code:

 

matchLabels:
  network.openshift.io/policy-group: ingress

 


Both codes should be working, or dosn't it?
My question is now how the exam script will accept this kind of answers?

Regards

 

 

12 Replies
Wasim_Raja
Moderator
Moderator
  • 333 Views

@Randy_Thomas Thank you for the confirmation.

0 Kudos
Steve_Zeng
Mission Specialist
Mission Specialist
  • 53 Views

aside from the label, do we also need to specifially define a deny-all policy to make sure "a project allow only connections from the OpenShift Container Platform Ingress Controller"? 

Thanks,

Chetan_Tiwary_
Community Manager
Community Manager
  • 22 Views

@Steve_Zeng   To make a project allow only connections from the OpenShift Container Platform Ingress Controller, add the following NetworkPolicy object.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-openshift-ingress
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
network.openshift.io/policy-group: ingress
podSelector: {}
policyTypes:
- Ingress

0 Kudos
Join the discussion
You must log in to join this conversation.