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

validate the protocol in the crd schema #3342

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

KMAnju-2021
Copy link
Contributor

@KMAnju-2021 KMAnju-2021 commented Feb 22, 2022

Fixes #3262

This commit fixed the issue of Network Policy does not validate protocol and accept wrong configuration.

Signed-off-by: KMAnju-2021 [email protected]

@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2022

Codecov Report

Merging #3342 (834532b) into main (3f30d84) will decrease coverage by 2.31%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3342      +/-   ##
==========================================
- Coverage   60.85%   58.54%   -2.32%     
==========================================
  Files         266      266              
  Lines       26520    26520              
==========================================
- Hits        16139    15525     -614     
- Misses       8591     9280     +689     
+ Partials     1790     1715      -75     
Flag Coverage Δ
kind-e2e-tests 43.04% <ø> (-4.92%) ⬇️
unit-tests 41.60% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/agent/apiserver/handlers/featuregates/handler.go 0.00% <0.00%> (-82.36%) ⬇️
pkg/controller/networkpolicy/mutate.go 2.29% <0.00%> (-59.78%) ⬇️
...kg/apiserver/registry/system/supportbundle/rest.go 20.45% <0.00%> (-54.55%) ⬇️
pkg/apiserver/handlers/webhook/mutation_crd.go 0.00% <0.00%> (-52.64%) ⬇️
...ver/registry/controlplane/nodestatssummary/rest.go 50.00% <0.00%> (-50.00%) ⬇️
pkg/support/dump.go 8.19% <0.00%> (-49.19%) ⬇️
pkg/apiserver/handlers/webhook/validation_crd.go 0.00% <0.00%> (-48.79%) ⬇️
...egator/apiserver/handlers/recordmetrics/handler.go 0.00% <0.00%> (-44.45%) ⬇️
pkg/support/dump_others.go 0.00% <0.00%> (-44.00%) ⬇️
...g/agent/apiserver/handlers/addressgroup/handler.go 0.00% <0.00%> (-40.00%) ⬇️
... and 46 more

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

@KMAnju-2021 thanks for the fix. Please link the issue to this PR by adding a line "Fixes #<ISSUE ID>"

@KMAnju-2021 KMAnju-2021 changed the title validate the protocol in the crd validate the protocol in the crd schema Feb 23, 2022
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@tnqn
Copy link
Member

tnqn commented Feb 23, 2022

/skip-all

@tnqn tnqn merged commit 01002ed into antrea-io:main Feb 23, 2022
@tnqn tnqn added the action/release-note Indicates a PR that should be included in release notes. label Feb 23, 2022
@KMAnju-2021 KMAnju-2021 deleted the first-bug-fix branch February 25, 2022 14:31
bangqipropel pushed a commit to bangqipropel/antrea that referenced this pull request Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network Policy does not validate protocol and accept wrong configuration
3 participants