From ec96ae2ba6e4516e63ae843742253912bd644a39 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Mon, 13 Jul 2020 12:02:15 +0200 Subject: [PATCH] Add 'ready', 'status' and 'age' columns to CRD --- api/v2alpha1/helmrelease_types.go | 3 +++ config/crd/bases/helm.fluxcd.io_helmreleases.yaml | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/api/v2alpha1/helmrelease_types.go b/api/v2alpha1/helmrelease_types.go index c88a1e0..8c6bc15 100644 --- a/api/v2alpha1/helmrelease_types.go +++ b/api/v2alpha1/helmrelease_types.go @@ -504,6 +504,9 @@ const ( // +genclient:Namespaced // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +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="" // HelmRelease is the Schema for the helmreleases API type HelmRelease struct { diff --git a/config/crd/bases/helm.fluxcd.io_helmreleases.yaml b/config/crd/bases/helm.fluxcd.io_helmreleases.yaml index d4f7083..9ef7928 100644 --- a/config/crd/bases/helm.fluxcd.io_helmreleases.yaml +++ b/config/crd/bases/helm.fluxcd.io_helmreleases.yaml @@ -8,6 +8,16 @@ metadata: creationTimestamp: null name: helmreleases.helm.fluxcd.io spec: + additionalPrinterColumns: + - 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 group: helm.fluxcd.io names: kind: HelmRelease