From a83eff8dcfaa1f3d6b7806a7e9484786d040a6f4 Mon Sep 17 00:00:00 2001 From: "Per G. da Silva" Date: Fri, 16 Oct 2026 13:20:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20Ready=20detail=20and=20object?= =?UTF-8?q?-count=20columns=20to=20ClusterObjectSet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surface the Ready condition's reason and the aggregate object counts in `kubectl get clusterobjectset` so rollout progress and blocked/precondition state are visible at a glance. The object-count columns are prefixed with "#" (#Total/#Present/#Synced/#Ready) to distinguish the #Ready object count from the Ready condition status column. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Per G. da Silva --- api/v1/clusterobjectset_types.go | 5 +++++ ...lm.operatorframework.io_clusterobjectsets.yaml | 15 +++++++++++++++ manifests/experimental-e2e.yaml | 15 +++++++++++++++ manifests/experimental.yaml | 15 +++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/api/v1/clusterobjectset_types.go b/api/v1/clusterobjectset_types.go index 4c8028a07a..5eb44296d4 100644 --- a/api/v1/clusterobjectset_types.go +++ b/api/v1/clusterobjectset_types.go @@ -606,6 +606,11 @@ type ObjectCounts struct { // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].status` +// +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].reason` +// +kubebuilder:printcolumn:name="#Total",type=integer,JSONPath=`.status.objectCounts.total` +// +kubebuilder:printcolumn:name="#Present",type=integer,JSONPath=`.status.objectCounts.present` +// +kubebuilder:printcolumn:name="#Synced",type=integer,JSONPath=`.status.objectCounts.synced` +// +kubebuilder:printcolumn:name="#Ready",type=integer,JSONPath=`.status.objectCounts.ready` // +kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp` // ClusterObjectSet represents an immutable snapshot of Kubernetes objects diff --git a/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml b/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml index dec8cd06eb..d0fa1ada26 100644 --- a/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml +++ b/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml @@ -19,6 +19,21 @@ spec: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Reason + type: string + - jsonPath: .status.objectCounts.total + name: '#Total' + type: integer + - jsonPath: .status.objectCounts.present + name: '#Present' + type: integer + - jsonPath: .status.objectCounts.synced + name: '#Synced' + type: integer + - jsonPath: .status.objectCounts.ready + name: '#Ready' + type: integer - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/manifests/experimental-e2e.yaml b/manifests/experimental-e2e.yaml index 062ec31cb7..f6e07bad5b 100644 --- a/manifests/experimental-e2e.yaml +++ b/manifests/experimental-e2e.yaml @@ -1430,6 +1430,21 @@ spec: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Reason + type: string + - jsonPath: .status.objectCounts.total + name: '#Total' + type: integer + - jsonPath: .status.objectCounts.present + name: '#Present' + type: integer + - jsonPath: .status.objectCounts.synced + name: '#Synced' + type: integer + - jsonPath: .status.objectCounts.ready + name: '#Ready' + type: integer - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/manifests/experimental.yaml b/manifests/experimental.yaml index cd9328ce7d..9e2679d7ec 100644 --- a/manifests/experimental.yaml +++ b/manifests/experimental.yaml @@ -1391,6 +1391,21 @@ spec: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Reason + type: string + - jsonPath: .status.objectCounts.total + name: '#Total' + type: integer + - jsonPath: .status.objectCounts.present + name: '#Present' + type: integer + - jsonPath: .status.objectCounts.synced + name: '#Synced' + type: integer + - jsonPath: .status.objectCounts.ready + name: '#Ready' + type: integer - jsonPath: .metadata.creationTimestamp name: Age type: date