Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a webhook to reject the gatekeeper-ignore label on non-GK namespaces #350

Merged
merged 19 commits into from
Jan 24, 2020

Conversation

maxsmythe
Copy link
Contributor

@maxsmythe maxsmythe commented Dec 17, 2019

Fixes #231

We need to add a deprecation notice to the release notes for using the control-plane label as a way to ignore namespaces. We should also should file a bug to remove the labelselector when this is submitted.

I've set the deprecation to a month from now in the comments on the YAML.

UPDATE: the control-plane label will continue to be part of deploy/gatekeeper.yaml until we have a better solution.

Signed-off-by: Max Smythe smythe@google.com

deploy/gatekeeper.yaml Outdated Show resolved Hide resolved
@maxsmythe
Copy link
Contributor Author

@ritazh LGTY?

README.md Outdated Show resolved Hide resolved
config/manager/manager.yaml Outdated Show resolved Hide resolved
@maxsmythe
Copy link
Contributor Author

@ritazh I think this should be unblocked now.

@maxsmythe maxsmythe requested a review from ritazh January 22, 2020 00:45
@maxsmythe
Copy link
Contributor Author

@ritazh @sozercan LGTY?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -30,6 +31,7 @@ spec:
- "--audit-interval=30"
- "--port=8443"
- "--logtostderr"
- "--exempt-namespace=gatekeeper-system"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to gatekeeper-system, I think we should also add kube-system to the default exemption list. I know there are users who have the control-plane label on kube-system today to ensure resources in that namespace are not impacted by Gatekeeper.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm more concerned about unexpectedly opening a security hole for users who haven't already done so.

Users that have set the control-plane label on kube-system will break anyway once the label becomes deprecated. Because we should not modify people's kube-system namespace by default including kube-system as an excused label will be the worst of both worlds: previous exclusion efforts will still fail and users who didn't want to exclude kube-system will unknowingly be vulnerable to people adding the exclusion label.

This was discussed in the meeting 2.5 weeks ago.

Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maxsmythe maxsmythe merged commit 5ebaa11 into open-policy-agent:master Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock Down the Label That Ignores the Gatekeeper-System Namespace
3 participants