From 1e53239591243d4877a2c790b24151b214af51a6 Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Wed, 18 May 2022 14:26:03 +0000 Subject: [PATCH] add GatewayClass Accepted print column Adds the status of the "Accepted" condition to the GatewayClass print columns list. Signed-off-by: Steve Kriss --- apis/v1alpha2/gatewayclass_types.go | 1 + .../experimental/gateway.networking.k8s.io_gatewayclasses.yaml | 3 +++ .../crd/stable/gateway.networking.k8s.io_gatewayclasses.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/apis/v1alpha2/gatewayclass_types.go b/apis/v1alpha2/gatewayclass_types.go index 699bc78c8a..e73b6b36dd 100644 --- a/apis/v1alpha2/gatewayclass_types.go +++ b/apis/v1alpha2/gatewayclass_types.go @@ -27,6 +27,7 @@ import ( // +kubebuilder:subresource:status // +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Controller",type=string,JSONPath=`.spec.controllerName` +// +kubebuilder:printcolumn:name="Accepted",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].status` // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` // +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description`,priority=1 diff --git a/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml b/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml index 5a54547be3..e9a52a5720 100644 --- a/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml +++ b/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml @@ -24,6 +24,9 @@ spec: - jsonPath: .spec.controllerName name: Controller type: string + - jsonPath: .status.conditions[?(@.type=="Accepted")].status + name: Accepted + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/config/crd/stable/gateway.networking.k8s.io_gatewayclasses.yaml b/config/crd/stable/gateway.networking.k8s.io_gatewayclasses.yaml index 7abaef5028..e52b1f9d30 100644 --- a/config/crd/stable/gateway.networking.k8s.io_gatewayclasses.yaml +++ b/config/crd/stable/gateway.networking.k8s.io_gatewayclasses.yaml @@ -24,6 +24,9 @@ spec: - jsonPath: .spec.controllerName name: Controller type: string + - jsonPath: .status.conditions[?(@.type=="Accepted")].status + name: Accepted + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date