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 crd match expressions #1430

Merged
merged 2 commits into from Jun 20, 2022

Conversation

pperiyasamy
Copy link
Contributor

@pperiyasamy pperiyasamy commented Jun 14, 2022

This validates duplicate values specified in node and ip pool
selectors match expressions under bgp peer, bgp and l2
advertisements.

Signed-off-by: Periyasamy Palanisamy pepalani@redhat.com

@pperiyasamy pperiyasamy force-pushed the label-selector-duplicate branch 2 times, most recently from 8e6167d to b19880c Compare June 15, 2022 12:52
@pperiyasamy pperiyasamy changed the title Validate node, ip pool selector match expressions Validate crd match expressions Jun 15, 2022
@@ -1005,8 +1011,32 @@ func validateDuplicate(strSlice []string, sliceType string) error {
return nil
}

func validateLabelSelectorMatchExpressions(matchExpressions []metav1.LabelSelectorRequirement) error {
Copy link
Member

Choose a reason for hiding this comment

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

Since this is used in the function below, can we put it after it?
Ideally, higher level functions should come first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

This validates duplicate values specified in node, ip pool
selectors match expressions under bgp peer, bgp and l2
advertisements.

Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
@fedepaol fedepaol merged commit f157d55 into metallb:main Jun 20, 2022
@pperiyasamy pperiyasamy deleted the label-selector-duplicate branch June 20, 2022 11:51
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.

None yet

2 participants