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 resource size validator #2781

Merged
merged 2 commits into from
Sep 15, 2020
Merged

Conversation

timuthy
Copy link
Contributor

@timuthy timuthy commented Aug 26, 2020

How to categorize this PR?

/area security
/kind enhancement
/priority normal

What this PR does / why we need it:
This PR adds the Resource Size Validator which is a webook for GCM and can be used to restrict the size of resources applied by end users. Please consult the enclosed documentation docs/concepts/controller-manager.md for more details.

Which issue(s) this PR fixes:
Fixes parts of #1650

Release note:

The Gardener Controller Manager is now equipped with a validation handler which checks incoming resource requests against configured quota configurations. It especially enables operators to restrict the maximum size of a single resource (e.g. shoot, plant, secret, ...) users apply to the Garden cluster and is at the same time a measure against DoS attacks. Please consult the documentation `docs/concepts/controller-manager.md#Resource-Size-Validator` for more details.

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

/assign
Love it - very clean, easy-to-follow and easy-to-read PR, thanks a lot.

docs/concepts/controller-manager.md Outdated Show resolved Hide resolved
docs/concepts/controller-manager.md Outdated Show resolved Hide resolved
docs/concepts/controller-manager.md Outdated Show resolved Hide resolved
docs/concepts/controller-manager.md Outdated Show resolved Hide resolved
docs/concepts/controller-manager.md Outdated Show resolved Hide resolved
pkg/controllermanager/apis/config/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/controllermanager/apis/config/v1alpha1/types.go Outdated Show resolved Hide resolved
@timuthy
Copy link
Contributor Author

timuthy commented Sep 2, 2020

Thanks for your rewiews @rfranzke @ialidzhikov. I already addressed your comments but as discussed in our internal meeting, I'll continue to move out the webhooks to a dedicated component so that we have:

  • multiple replicas for this dedicated component
  • a clear separation

@timuthy
Copy link
Contributor Author

timuthy commented Sep 11, 2020

PR has been rebased on #2832. Please consider a98e6ee for review.
/hold

@rfranzke
Copy link
Member

Please update the PR now that #2832 is merged :)

charts/gardener/controlplane/values.yaml Outdated Show resolved Hide resolved
docs/concepts/admission-controller.md Outdated Show resolved Hide resolved
docs/concepts/admission-controller.md Outdated Show resolved Hide resolved
docs/concepts/admission-controller.md Outdated Show resolved Hide resolved
docs/concepts/admission-controller.md Outdated Show resolved Hide resolved
@timuthy
Copy link
Contributor Author

timuthy commented Sep 14, 2020

/unhold
I addressed the feedback in 87272f1. PTAL.

rfranzke
rfranzke previously approved these changes Sep 15, 2020
Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

/lgtm

@timuthy
Copy link
Contributor Author

timuthy commented Sep 15, 2020

Thanks @rfranzke, I force pushed again to squash the commits.

@timuthy
Copy link
Contributor Author

timuthy commented Sep 15, 2020

Thanks @ialidzhikov for the feedback. PTAL.

Copy link
Member

@ialidzhikov ialidzhikov left a comment

Choose a reason for hiding this comment

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

/lgtm

@rfranzke rfranzke merged commit 0106379 into gardener:master Sep 15, 2020
@timuthy timuthy deleted the feature.size-validator branch September 15, 2020 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/security Security related kind/enhancement Enhancement, improvement, extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants