-
Notifications
You must be signed in to change notification settings - Fork 321
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
feat(general): Add volumeresources emptyDir sizelimit #514
base: master
Are you sure you want to change the base?
feat(general): Add volumeresources emptyDir sizelimit #514
Conversation
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
@dongjiang1989 can you also modify empty |
Signed-off-by: dongjiang1989 <[email protected]>
Thanks. @JaydipGabani |
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This policy will not work for Pod. Please modify constraint or rego.
library/general/volumeresources/samples/container-emptydir-limit/constraint.yaml
Show resolved
Hide resolved
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
@dongjiang1989 appologies for going back and forth, but it would be best to keep the policy applicable to pods because currenlty |
Thanks @JaydipGabani . PTAL re-check Keep the policy applicable to pods done. |
Signed-off-by: dongjiang1989 <[email protected]>
@dongjiang1989 you will need to remove examples with |
Signed-off-by: dongjiang1989 <[email protected]>
@JaydipGabani Thanks for your review. Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@maxsmythe @ritazh @sozercan PTAL. |
- | | ||
package lib.exempt_container | ||
|
||
is_exempt(container) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is is_exempt used? might be good to also add an exemptImage example to the allowed test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Thanks.
apiVersion: templates.gatekeeper.sh/v1 | ||
kind: ConstraintTemplate | ||
metadata: | ||
name: k8svolumerequests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this policy validates specifically for emptydir volume size limit, the name, description should be updated to reflect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ritazh change name to k8semptydirvolumesizelimit
?
Thanks for the PR! |
What this PR does / why we need it:
feat(general): Add volumeresources emptyDir sizelimit.
one node in the cluster was emptyDirevicted because the log volume not set a capacity limit
sizeLimit
.Which issue(s) does this PR fix (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: