StatCan / gatekeeper-policies

Policies that are to be enforced by GateKeeper for the Cloud Native Platform
Other
16 stars 12 forks source link

feat(restrict-ingress): incorporate ingress-hostname-conflict #38

Closed frazs closed 2 years ago

frazs commented 2 years ago

Incorporates ingress-hostname-conflict into restrict-hostnames while expanding its functionality such that:

Mostly tested on InfraTest, but lacked time for the allowed-hosts label test (although that works in opa test and should be consistent with existing use of that function). Out of an abundance of caution, because I am new to Gatekeeper and about to leave for a week, on InfraTest I have not yet deleted the ingress-hostname-conflict template (which had earlier been modified to allow conflicts in the same namespace, but will not recognize allowed-hosts) or its constraints.

This is my first policy and test, and I think I might still have some redundancies in the rego or test castes. Please feel free to suggest any improvements.

justbert commented 2 years ago

PS, LGTM!