gateway-api
gateway-api copied to clipboard
gwctl: Show Events, Analysis and few other fields for various resources.
What type of PR is this? /kind feature
What this PR does / why we need it:
This PR addresses missing information in the display of various resources and enhances the presentation of printed information. After this and the related issue #3037 get completed, all gwctl describe views will have the relevant information and some visual appeal.
Examples:
$ gwctl describe backends
...
(truncated)
...
ReferencedByRoutes:
Kind Name
---- ----
HTTPRoute default/grpc-httproute
HTTPRoute default/grpc-httproute-2
DirectlyAttachedPolicies:
Type Name
---- ----
HealthCheckPolicy.networking.gke.io default/grpc-gateway-healthcheck
EffectivePolicies:
default/grpc-gateway:
HealthCheckPolicy.networking.k8s.io:
default:
checkIntervalSec: 15
config:
http2HealthCheck:
port: 1234
portSpecification: USE_FIXED_PORT
type: HTTP2
healthyThreshold: 1
logConfig:
enabled: true
timeoutSec: 15
unhealthyThreshold: 2
Events:
Type Reason Age From Message
---- ------ --- ---- -------
Normal SYNC 36h sc-gateway-controller SYNC on default/grpc-svc was a success
$ gwctl describe gateway
...
(truncated)
...
AttachedRoutes:
Kind Name
---- ----
HTTPRoute default/grpc-httproute-2
DirectlyAttachedPolicies: <none>
Analysis:
- Gateway "default/random-gateway" references a non-existent GatewayClass "random"
Events:
Type Reason Age From Message
---- ------ --- ---- -------
Normal SYNC 36h sc-gateway-controller SYNC on default/grpc-gateway-2 was a success
Which issue(s) this PR fixes:
Closes a couple of items from https://github.com/kubernetes-sigs/gateway-api/issues/2761 Fixes https://github.com/kubernetes-sigs/gateway-api/issues/2994
Does this PR introduce a user-facing change?:
Show Events and Analysis when describing resources.
/lgtm
/hold for other review though
(Rebased)
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: gauravkghildiyal, mlavacca
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~gwctl/OWNERS~~ [gauravkghildiyal]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Thanks for the review, both! (I'll unhold based on the two reviews)
/unhold