feat: support LabelSelector type for NamespaceSelectors#2494
Merged
arkodg merged 4 commits intoenvoyproxy:mainfrom Jan 26, 2024
Merged
feat: support LabelSelector type for NamespaceSelectors#2494arkodg merged 4 commits intoenvoyproxy:mainfrom
arkodg merged 4 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: yeedove <yeedove@gmail.com>
Signed-off-by: yeedove <yeedove@gmail.com>
arkodg
reviewed
Jan 24, 2024
api/v1alpha1/envoygateway_types.go
Outdated
Contributor
There was a problem hiding this comment.
should this field be renamed to namespaceSelector ?
2fb447c to
2a574f0
Compare
Signed-off-by: yeedove <yeedove@gmail.com>
2a574f0 to
bff6416
Compare
Member
|
EG use squash merge model, please kindly don't force push everytime for better review. |
Contributor
Author
I will pay attention to this. Can you help me look at the |
Member
--- FAIL: TestNamespaceSelectorProvider (67.82s)
kubernetes_test.go:1372:
Error Trace: /home/runner/work/gateway/gateway/internal/provider/kubernetes/kubernetes_test.go:1372
Error: Condition never satisfied
Test: TestNamespaceSelectorProvider
2024-01-25T11:14:20.404Z INFO kubernetes/predicates.go:39 gatewayclass has matching controller name, processing {"name": "test-gc"}
2024-01-25T11:14:20.404Z INFO kubernetes/predicates.go:43 bypassing reconciliation due to controller name {"controller": "not.configured/controller"}
2024-01-25T11:14:20.406Z DPANIC kubernetes/predicates.go:123 non-string key argument passed to logging, ignoring all later arguments {"invalid key": "not.configured/controller"}
2024-01-25T11:14:20.406Z INFO kubernetes/predicates.go:123 gatewayclass controller name
2024-01-25T11:14:20.406Z INFO kubernetes/predicates.go:124 gatewayclass name for gateway doesn't match configured name {"namespace": "", "name": "scheduled-status-test"}
2024-01-25T11:14:20.407Z DPANIC kubernetes/predicates.go:123 non-string key argument passed to logging, ignoring all later arguments {"invalid key": "not.configured/controller"}
2024-01-25T11:14:20.407Z INFO kubernetes/predicates.go:123 gatewayclass controller name
2024-01-25T11:14:20.407Z INFO kubernetes/predicates.go:124 gatewayclass name for gateway doesn't match configured name {"namespace": "", "name": "scheduled-status-test"}
2024-01-25T11:14:20.417Z INFO kubernetes/routes.go:266 processing HTTPRoute {"namespace": "test", "name": "test"}
2024-01-25T11:14:20.418Z INFO kubernetes/routes.go:266 processing HTTPRoute {"namespace": "test", "name": "test"}
2024-01-25T11:14:20.418Z INFO kubernetes/routes.go:266 processing HTTPRoute {"namespace": "test", "name": "test"}
2024-01-25T11:14:20.419Z INFO kubernetes/routes.go:137 processing GRPCRoute {"namespace": "test", "name": "test"} |
Contributor
|
/retest |
shawnh2
reviewed
Jan 26, 2024
Contributor
shawnh2
left a comment
There was a problem hiding this comment.
thanks for adding this, generally lgtm, just some nits.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2494 +/- ##
==========================================
- Coverage 64.68% 64.62% -0.07%
==========================================
Files 115 115
Lines 17472 17513 +41
==========================================
+ Hits 11302 11317 +15
- Misses 5449 5471 +22
- Partials 721 725 +4 ☔ View full report in Codecov by Sentry. |
Contributor
Author
|
@shawnh2 done, thank! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
In the current configuration, the
namespaceSelectorsfield underEnvoyGateway.Provider.Kubernetes.Wachonly supports label selection using the key, similar to theExistsoperator inLabelSelectorOperator.The
namespaceSelectorsfield can support a more comprehensive label-based selection, allowing you to specify bothmatchLabelsandmatchExpressionshttps://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector
Which issue(s) this PR fixes:
Fixes #2481