[Gateway API 1.2.0] Add gateway name label#4333
[Gateway API 1.2.0] Add gateway name label#4333zhaohuabing wants to merge 8 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4333 +/- ##
==========================================
+ Coverage 65.96% 65.98% +0.01%
==========================================
Files 197 197
Lines 23959 23971 +12
==========================================
+ Hits 15805 15817 +12
Misses 7027 7027
Partials 1127 1127 ☔ View full report in Codecov by Sentry. |
| labels: | ||
| gateway.envoyproxy.io/owning-gateway-name: eg | ||
| gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway-system | ||
| gateway.networking.k8s.io/gateway-name: eg |
There was a problem hiding this comment.
EG differs from the GEP in two ways
- label name
gateway.envoyproxy.io/owning-gateway-name - generated resource is in the same ns as the Gateway
this warrants a bigger discussion, lets bring this up in the community meeting next week
There was a problem hiding this comment.
This PR only adds the required label gateway.envoyproxy.io/owning-gateway-name. It's compatible with the current EG implementation.
The existing gateway.envoyproxy.io/owning-gateway-name is reserved for compatibility reasons. This label has been used as a selector to filter out services and deployments related to a Gateway.
| metadata: | ||
| labels: | ||
| gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class | ||
| gateway.networking.k8s.io/gateway-name: gateway-1,gateway-2 |
There was a problem hiding this comment.
All gateway names are concatenated and stored in a single label if mergeGateways is enabled.
Probably not the best way to do this, should revisit this and come up with a better solution upstream.
This is tracked in kubernetes-sigs/gateway-api#3365
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
|
Apart from passing the conformance test, how does the end user benefit from this change ? |
No, but we could replace the existing |
|
I suggest waiting until kubernetes-sigs/gateway-api#3366 is resolved which in indirectly related to the name of the label |
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
|
Hello folks 👋🏻 It looks like kubernetes-sigs/gateway-api#3366 is closed now, so I'd like this to be re-visited.
I currently run multiple Gateway API implementations (Cilium & Envoy Gateway). I would like to select kubectl get --all-namespaces service --selector 'gateway.networking.k8s.io/gateway-name'But currently, this only returns The real-world impact of this is I cannot configure a Q: Can this PR as currently defined be revisited? cc: @arkodg @zhaohuabing |
|
@adrianmace this label will be available in v1.5 (end July) only for gateway namespace mode https://gateway.envoyproxy.io/docs/tasks/operations/gateway-namespace-mode/ for the default mode you'd have to use |
|
@arkodg thank you for the fast response. Unfortunately we do not want to use Gateway Namespace Mode (due to us wanting to provide a centralised gateway capability for a multi-tenant cluster, and since that feature is in Alpha). Do you have plans to bring this label to the default mode in order to fully conform to GEP-1762? |
|
@adrianmace EG conforms to GEP-1762 only in gateway namespace mode, in the default mode all proxy fleets run in the controller namespace |
|
With this in mind, I would love for at least this label to be merged in. |
Implement the Gateway name label pfart of GEP-1762: In Cluster Gateway Deployments
This PR only covers the gateway name label requirement in the GEP-1762.
Please note that this label has not been added to the generated resources of the merged gateway.
Implement: #4330