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 label value regexp pattern verification in CRD labelSelector matchExpressions #2887

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

wenqiq
Copy link
Contributor

@wenqiq wenqiq commented Oct 13, 2021

Improve ExternalIPPool nodeSelector fields CRD schema verification

Fixes: #2573

Signed-off-by: Wenqi Qiu [email protected]

@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2021

Codecov Report

Merging #2887 (727f6f7) into main (4d0eea7) will increase coverage by 0.12%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2887      +/-   ##
==========================================
+ Coverage   60.30%   60.42%   +0.12%     
==========================================
  Files         283      283              
  Lines       23504    23644     +140     
==========================================
+ Hits        14173    14287     +114     
- Misses       7797     7817      +20     
- Partials     1534     1540       +6     
Flag Coverage Δ
kind-e2e-tests 48.03% <0.00%> (+0.25%) ⬆️
unit-tests 40.87% <0.00%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
pkg/agent/memberlist/cluster.go 70.04% <0.00%> (-1.94%) ⬇️
pkg/antctl/antctl.go 66.66% <0.00%> (-33.34%) ⬇️
pkg/agent/util/ipset/ipset.go 61.53% <0.00%> (-3.85%) ⬇️
pkg/ovs/openflow/ofctrl_packetin.go 57.14% <0.00%> (-1.59%) ⬇️
pkg/ovs/ovsctl/ofctl.go 37.07% <0.00%> (-1.20%) ⬇️
pkg/agent/proxy/proxier.go 57.43% <0.00%> (-0.59%) ⬇️
...gent/controller/noderoute/node_route_controller.go 54.76% <0.00%> (-0.57%) ⬇️
pkg/agent/controller/networkpolicy/reconciler.go 77.29% <0.00%> (-0.54%) ⬇️
pkg/agent/controller/traceflow/packetin.go 64.60% <0.00%> (-0.37%) ⬇️
... and 20 more

@@ -172,6 +172,7 @@ spec:
values:
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
Copy link
Member

Choose a reason for hiding this comment

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

This applies to other CRDs that have "matchExpressions", could you address all of them in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, good idea. Done.
I think this PR title should be updated to Add label values regexp pattern verification in CRD labelSelector matchExpressions?

@wenqiq wenqiq changed the title Improve ExternalIPPool nodeSelector fields CRD schema verification Add label value regexp pattern verification in CRD labelSelector matchExpressions Oct 19, 2021
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

@wenqiq
Copy link
Contributor Author

wenqiq commented Oct 20, 2021

/test-e2e

@tnqn
Copy link
Member

tnqn commented Oct 20, 2021

/test-conformance
/test-networkpolicy

@tnqn tnqn merged commit 110e9f6 into antrea-io:main Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Egress cluster consistent hash map sync error with invalid ExternalIPPool nodeSelector
3 participants