-
Notifications
You must be signed in to change notification settings - Fork 534
Add GATEWAYS field to kubectl get httproute output #586
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
Comments
That would be so awesome |
Although I agree that would be awesome, we're unfortunately quite limited by what we can do with the When reading from lists, you can actually get pretty close with something like |
Is there anyone in API-machinery that can help us (cc @thockin)? The more I use Gateway hands on, the more I see the need to make it very obvious how Routes and Gateways are bound. For example, I am testing a bunch of Routes against a bunch of different Gateways, but based on the CLI output, you'd guess that all these Routes are in conflict on the same Gateway:
|
I've had similar needs and the only thing I could come up with is to add a metadata status type section to expose more of this to users. Here's a draft PR on adding some bits to Contour which don't translate 100% but are similar: https://github.com/projectcontour/contour/blob/e802dd5f8d2c5bb267299bda3a247d461be7b13d/design/httpproxy-status-meta.md |
I think adding a new field to status may be our best option here, even if it is repetitive. For example, we could add a new For reference, on a 1.19 cluster using kubectl 1.20, the following variations kinda work but only return the first item in the list:
And of course a list like this fails validation:
@lavalamp do you know if anything like this should work as a value for |
Quick follow up on this: I got some help from @apelisse in tracking down how this is implemented. This behavior is intentional, the code picks the first matching result. Although we can make a feature request for more advanced support here, we likely need a better solution until we get to that point. I think that means at least one of the following:
|
I would go with a field at first. Plug-in is nice for more features, but if im trouble shooting things and I need a plug-in I probably go mad. So my vote is on a simple field first :p |
Better reference to a tracking issue in upstream kubernetes/kubectl#517. Hope to have a PR adding a new field ready for review shortly. |
You rock. Thanks :) |
I think this is very useful thing to have and a feature that most users would just expect to have. I do have concerns with the workaround with duplicate field we are considering. This is not the first time when we are running into limitations of CRD and gateway-api being out of tree and it seems a tad early to start adding hacks into our API to get this to work. |
|
It is fairly easy to write a kubectl plugin in my experience, it's just much more difficult to maintain it, especially if it's built against an alpha API with breaking changes planned. Although a plugin would enable us to do much more, it may not be as intuitive/straightforward for users as using kubectl directly. I'd be concerned if our kubectl experience was entirely dependent on a plugin, but I also realize that API changes like this add a fair amount of overhead to each implementation. |
Writing and maintaining a kubectl plugin will certainly involve non-trivial cost and I'd really like to avoid it as much as possible.
+1 If this was the only feature that we wanted to add to help with kubectl experience, I'd be down to adding it. I really doubt that to be the case. |
I soo much agree. As I said previously, having a plugin as a "requirement" for better troubleshooting is imho not that user friendly. Im also down for wait a bit and see what other requests we have to come up with something "better" |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Yeh I agree that this is just the thin end of the wedge. IIUC Cluster API ships various versions of It also seems likely that we would want to improve the tooling at a different rate (rapidly) than that at which the API evolves (slowly).
Is it just a matter of where this cost is borne? If it's not done centrally, then it needs to be specced in the API and implemented in every controller. |
One interesting alternative to the options currently being discussed (kubectl plugin vs controller populated fields) would be webhook populated fields. That would also result in central cost, but would not require any additional controller work or users to install a plugin. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
While grooming this one it appears we're just at a point where this is a nice to have, but it's not easy to implement. We're going to close this as we don't expect anyone's ready to drive it forward, but if you still want this feature and have a strong use case we will be happy to reconsider this and re-open. |
What would you like to be added:
Add a GATEWAYS field to the
kubectl get httproute
output. Thanks to the feedback from @joshrosso I realize it's challenging to easily understand which Gateways a Route is bound to or whether it's bound at all. This field would key off of the HTTPRoute status which indicates the Gateways that a Route is bound to: https://gateway-api.sigs.k8s.io/spec/#networking.x-k8s.io/v1alpha1.RouteGatewayStatusThe below example shows HTTPRoutes, some which are bound to different Gateways, some bound to multiple Gateways, and one that's not bound to any Gateway (which is probably an accident that the deployer doesn't know yet). This would be really useful because it provides a quick snapshot of all the Gateways being used in a certain Namespace without having to dig into each Route individually. It also provides a very quick check to validate that a Route has been bound to a Gateway successfully after creation.
cc @robscott @bowei @stevesloka @hbagdi
The text was updated successfully, but these errors were encountered: