Closed jacks-reid closed 3 years ago
Makes sense.
policies/templates/gcp_gke_restrict_pod_traffic_v2.yaml
policies/templates/legacy
GCPGKERestrictPodTrafficConstraintV1
to V2 in samples
samples/legacy/gke_restrict_pod_traffic_v1.yaml
validator/
Rego to use GCPGKERestrictPodTrafficConstraintV2
Are these all the changes you had in mind?
@jacks-reid Yep, looks good. Thank you.
I need to get some tests fixed before I can give this a more thorough review though.
This change removes the
pod_security_policy_config_enabled == true
requirement in thegcp_gke_restrict_pod_traffic_v1.yaml
constraint template.I believe the PodSecurityPolicy requirement should be removed because of its recent deprecation in Kubernetes v1.21 and that users will more closely associate this policy with the enforcement of network policies.
To accomplish this:
pod_security_policy_config_enabled
was dropped from thecheck_all_enabled
rule in the source Regopod_security_policy_config_enabled
rule block was dropped altogetherasset.json
were dropped and the Rego test file was updated to account for their removal