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

test: add utility for namespace labels patching and add the test cases for denyNodeFeatureLabels restriction #1990

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TessaIO
Copy link
Member

@TessaIO TessaIO commented Dec 19, 2024

Resolves #1879

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 19, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: TessaIO
Once this PR has been reviewed and has the lgtm label, please assign arangogutierrez for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 4032b02
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/6764a11955c09a0008935653
😎 Deploy Preview https://deploy-preview-1990--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 19, 2024
@TessaIO TessaIO force-pushed the test-improve-unit-tests-for-cr-constrictions branch from dac34b7 to 9fb9e67 Compare December 19, 2024 21:50
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 19, 2024
…s for denyNodeFeatureLabels restriction

Signed-off-by: TessaIO <[email protected]>
@TessaIO TessaIO force-pushed the test-improve-unit-tests-for-cr-constrictions branch from 9fb9e67 to 4032b02 Compare December 19, 2024 22:41
@TessaIO TessaIO changed the title [WIP] test: add utility for namespace labels patching test: add utility for namespace labels patching Dec 19, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2024
@TessaIO
Copy link
Member Author

TessaIO commented Dec 19, 2024

/cc @marquiz
Maybe we can add this for v0.17 also

@k8s-ci-robot k8s-ci-robot requested a review from marquiz December 19, 2024 22:56
@TessaIO TessaIO changed the title test: add utility for namespace labels patching test: add utility for namespace labels patching and add the test cases for denyNodeFeatureLabels restriction Dec 20, 2024
Comment on lines +32 to +33
AddOperation = "add"
RemoveOperation = "remove"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would make sense to specify these in pkg/utils/jsonpatch.go

Again, this could be a separate PR converting all uses of utils.NewJsonPatch to use these definitions.

WDYT?

Also, bike-shedding on the naming, for the generic pkg/utils version:

Suggested change
AddOperation = "add"
RemoveOperation = "remove"
JSONPatchOpAdd = "add"
JSONPatchOpRemove = "remove"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve CR Restrictions e2e tests
3 participants