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 validation for ANP/BANP Enum actions #213

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

tssurya
Copy link
Contributor

@tssurya tssurya commented Mar 26, 2024

Credit to @asood-rh who put pass and allow instead of Pass and Allow which causes panic (I admit panic was too much over-reaction on the implementation side, but really this needs to be fixed in the API because we clearly state what our enum allowed values are and we don't want to have confusion on pass, Pass, PASS etc).

Tested output with this fix:
The AdminNetworkPolicy "node-as-egress-peers" is invalid: spec.egress[0].action: Unsupported value: "allow": supported values: "Allow", "Deny", "Pass"

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 26, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 26, 2024
Copy link

netlify bot commented Mar 26, 2024

Deploy Preview for kubernetes-sigs-network-policy-api ready!

Name Link
🔨 Latest commit 8454955
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-network-policy-api/deploys/660333b5a8cf150008da4e93
😎 Deploy Preview https://deploy-preview-213--kubernetes-sigs-network-policy-api.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.

@tssurya
Copy link
Contributor Author

tssurya commented Mar 26, 2024

PTAL @astoycos and/or @danwinship

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
@tssurya tssurya force-pushed the add-action-validation branch from 740ee74 to 8454955 Compare March 26, 2024 20:44
Copy link
Member

@astoycos astoycos left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks @tssurya!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 26, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astoycos, tssurya

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit 0e247ac into kubernetes-sigs:main Mar 26, 2024
8 checks passed
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Mar 28, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 3, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 4, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 5, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 8, 2024
tssurya added a commit to tssurya/ovn-kubernetes-1 that referenced this pull request Apr 9, 2024
Brings in:
1) kubernetes-sigs/network-policy-api#209
2) kubernetes-sigs/network-policy-api#196
3) kubernetes-sigs/network-policy-api#213

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
(cherry picked from commit 57bca707c5f866a24c79767b4af1244ec2463570)
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 10, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 11, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 15, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 15, 2024
tssurya added a commit to tssurya/ovn-kubernetes-1 that referenced this pull request Apr 16, 2024
tssurya added a commit to tssurya/ovn-kubernetes that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants