From 869ef77fdfed203f1a57a478f6235753d44d52f3 Mon Sep 17 00:00:00 2001 From: Sunny Date: Thu, 24 Feb 2022 01:47:32 +0530 Subject: [PATCH] api: Move Status in CRD printcolumn to the end Status content could be very long compare to other fields. Moving it to the end helps improve the visibility of other fields. Signed-off-by: Sunny --- api/v1beta2/kustomization_types.go | 2 +- .../bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1beta2/kustomization_types.go b/api/v1beta2/kustomization_types.go index 232c4ffe..d0baa9f3 100644 --- a/api/v1beta2/kustomization_types.go +++ b/api/v1beta2/kustomization_types.go @@ -333,9 +333,9 @@ func (in *Kustomization) GetStatusConditions() *[]metav1.Condition { // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=ks // +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="" // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description="" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="" // Kustomization is the Schema for the kustomizations API. type Kustomization struct { diff --git a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml index 03d3c006..a2477aad 100644 --- a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml +++ b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml @@ -554,15 +554,15 @@ spec: subresources: status: {} - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date - jsonPath: .status.conditions[?(@.type=="Ready")].status name: Ready type: string - jsonPath: .status.conditions[?(@.type=="Ready")].message name: Status type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date name: v1beta2 schema: openAPIV3Schema: