From cce29672251719e6cf26a11a6a3ef640a409ecf8 Mon Sep 17 00:00:00 2001 From: Bob Haddleton Date: Wed, 7 Dec 2022 12:53:50 -0600 Subject: [PATCH] Update output columns Fixes #78 Signed-off-by: Bob Haddleton --- apis/object/v1alpha1/types.go | 5 +++++ .../crds/kubernetes.crossplane.io_objects.yaml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/apis/object/v1alpha1/types.go b/apis/object/v1alpha1/types.go index 2c4eda7c..aeec3150 100644 --- a/apis/object/v1alpha1/types.go +++ b/apis/object/v1alpha1/types.go @@ -132,6 +132,11 @@ type ObjectStatus struct { // A Object is an provider Kubernetes API type // +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="KIND",type="string",JSONPath=".spec.forProvider.manifest.kind" +// +kubebuilder:printcolumn:name="APIVERSION",type="string",JSONPath=".spec.forProvider.manifest.apiVersion",priority=1 +// +kubebuilder:printcolumn:name="METANAME",type="string",JSONPath=".spec.forProvider.manifest.metadata.name",priority=1 +// +kubebuilder:printcolumn:name="METANAMESPACE",type="string",JSONPath=".spec.forProvider.manifest.metadata.namespace",priority=1 +// +kubebuilder:printcolumn:name="PROVIDERCONFIG",type="string",JSONPath=".spec.providerConfigRef.name" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/package/crds/kubernetes.crossplane.io_objects.yaml b/package/crds/kubernetes.crossplane.io_objects.yaml index 81ea63f0..027682d0 100644 --- a/package/crds/kubernetes.crossplane.io_objects.yaml +++ b/package/crds/kubernetes.crossplane.io_objects.yaml @@ -20,6 +20,24 @@ spec: scope: Cluster versions: - additionalPrinterColumns: + - jsonPath: .spec.forProvider.manifest.kind + name: KIND + type: string + - jsonPath: .spec.forProvider.manifest.apiVersion + name: APIVERSION + priority: 1 + type: string + - jsonPath: .spec.forProvider.manifest.metadata.name + name: METANAME + priority: 1 + type: string + - jsonPath: .spec.forProvider.manifest.metadata.namespace + name: METANAMESPACE + priority: 1 + type: string + - jsonPath: .spec.providerConfigRef.name + name: PROVIDERCONFIG + type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string