gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

gwctl: Show Events, Analysis and few other fields for various resources.

Open gauravkghildiyal opened this issue 9 months ago • 3 comments

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.

gauravkghildiyal avatar May 05 '24 01:05 gauravkghildiyal

/lgtm

youngnick avatar May 06 '24 06:05 youngnick

/hold for other review though

youngnick avatar May 06 '24 06:05 youngnick

(Rebased)

gauravkghildiyal avatar May 15 '24 07:05 gauravkghildiyal

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 16 '24 14:05 k8s-ci-robot

Thanks for the review, both! (I'll unhold based on the two reviews)

/unhold

gauravkghildiyal avatar May 16 '24 15:05 gauravkghildiyal