From 328cf881b869d795fe40951f61a10ef7cb22f705 Mon Sep 17 00:00:00 2001 From: HenningE Date: Tue, 10 Aug 2021 17:10:56 +0200 Subject: [PATCH] feat: add status printcolumn to ES CRD (#318) --- apis/externalsecrets/v1alpha1/externalsecret_types.go | 1 + deploy/crds/external-secrets.io_externalsecrets.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/apis/externalsecrets/v1alpha1/externalsecret_types.go b/apis/externalsecrets/v1alpha1/externalsecret_types.go index ba1b83638..3f1e89fa6 100644 --- a/apis/externalsecrets/v1alpha1/externalsecret_types.go +++ b/apis/externalsecrets/v1alpha1/externalsecret_types.go @@ -198,6 +198,7 @@ type ExternalSecretStatus struct { // +kubebuilder:resource:scope=Namespaced,categories={externalsecrets},shortName=es // +kubebuilder:printcolumn:name="Store",type=string,JSONPath=`.spec.secretStoreRef.name` // +kubebuilder:printcolumn:name="Refresh Interval",type=string,JSONPath=`.spec.refreshInterval` +// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason` type ExternalSecret struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/deploy/crds/external-secrets.io_externalsecrets.yaml b/deploy/crds/external-secrets.io_externalsecrets.yaml index 6bbc82791..cc7bd2afa 100644 --- a/deploy/crds/external-secrets.io_externalsecrets.yaml +++ b/deploy/crds/external-secrets.io_externalsecrets.yaml @@ -25,6 +25,9 @@ spec: - jsonPath: .spec.refreshInterval name: Refresh Interval type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].reason + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: