From 7320e33f3d575ddabe4610353ab05cbda41d6f71 Mon Sep 17 00:00:00 2001 From: uwe-mayer Date: Tue, 16 Dec 2025 10:59:40 +0100 Subject: [PATCH 1/2] fix(api): add ready message to printcolumns --- api/v1alpha1/catalog_types.go | 1 + api/v1alpha1/cluster_types.go | 1 + api/v1alpha1/clusterplugindefinition_types.go | 1 + api/v1alpha1/organization_types.go | 1 + api/v1alpha1/plugin_types.go | 4 +--- api/v1alpha1/pluginpreset_types.go | 1 + api/v1alpha2/teamrolebinding_types.go | 1 + 7 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api/v1alpha1/catalog_types.go b/api/v1alpha1/catalog_types.go index 8dd014380..85cef10bf 100644 --- a/api/v1alpha1/catalog_types.go +++ b/api/v1alpha1/catalog_types.go @@ -137,6 +137,7 @@ type CatalogStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status //+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type == "Ready")].status` +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // +kubebuilder:resource:shortName=cat // Catalog is the Schema for the catalogs API. diff --git a/api/v1alpha1/cluster_types.go b/api/v1alpha1/cluster_types.go index 9cdd438ed..c7f61d700 100644 --- a/api/v1alpha1/cluster_types.go +++ b/api/v1alpha1/cluster_types.go @@ -97,6 +97,7 @@ type NodeStatus struct { //+kubebuilder:printcolumn:name="AccessMode",type="string",JSONPath=".spec.accessMode" //+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type == "Ready")].status` //+kubebuilder:printcolumn:name="Version",type="string",JSONPath=`.status.kubernetesVersion` +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // Cluster is the Schema for the clusters API type Cluster struct { diff --git a/api/v1alpha1/clusterplugindefinition_types.go b/api/v1alpha1/clusterplugindefinition_types.go index d92b1ec0f..9d935c4c7 100644 --- a/api/v1alpha1/clusterplugindefinition_types.go +++ b/api/v1alpha1/clusterplugindefinition_types.go @@ -28,6 +28,7 @@ type ClusterPluginDefinitionStatus struct { //+kubebuilder:printcolumn:name="Version",type=string,JSONPath=`.spec.version` //+kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description` // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // ClusterPluginDefinition is the Schema for the clusterplugindefinitions API. type ClusterPluginDefinition struct { diff --git a/api/v1alpha1/organization_types.go b/api/v1alpha1/organization_types.go index c5447a819..67ed03bdf 100644 --- a/api/v1alpha1/organization_types.go +++ b/api/v1alpha1/organization_types.go @@ -117,6 +117,7 @@ type OrganizationStatus struct { //+kubebuilder:printcolumn:name="IdP admin group",type="string",JSONPath=".spec.mappedOrgAdminIdPGroup" //+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" //+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type == "Ready")].status` +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // Organization is the Schema for the organizations API type Organization struct { diff --git a/api/v1alpha1/plugin_types.go b/api/v1alpha1/plugin_types.go index 6934cfc59..c7fd91bb6 100644 --- a/api/v1alpha1/plugin_types.go +++ b/api/v1alpha1/plugin_types.go @@ -202,14 +202,12 @@ type HelmReleaseStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -//+kubebuilder:printcolumn:name="Display name",type=string,JSONPath=`.spec.displayName` //+kubebuilder:printcolumn:name="Plugin Definition",type=string,JSONPath=`.spec.pluginDefinitionRef.name` //+kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=`.spec.clusterName` -//+kubebuilder:printcolumn:name="Release Name",type=string,JSONPath=`.spec.releaseName` -//+kubebuilder:printcolumn:name="Release Namespace",type=string,JSONPath=`.spec.releaseNamespace` //+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type == "Ready")].status` //+kubebuilder:printcolumn:name="Version",type=string,JSONPath=`.status.version` //+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // Plugin is the Schema for the plugins API // +kubebuilder:validation:XValidation:rule="!has(oldSelf.spec.releaseName) || has(self.spec.releaseName)", message="ReleaseName is required once set" diff --git a/api/v1alpha1/pluginpreset_types.go b/api/v1alpha1/pluginpreset_types.go index 55f071d2f..5aaffc706 100644 --- a/api/v1alpha1/pluginpreset_types.go +++ b/api/v1alpha1/pluginpreset_types.go @@ -88,6 +88,7 @@ type ManagedPluginStatus struct { //+kubebuilder:printcolumn:name="Plugin Definition",type=string,JSONPath=`.spec.plugin.pluginDefinition` //+kubebuilder:printcolumn:name="Release Namespace",type=string,JSONPath=`.spec.plugin.releaseNamespace` //+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type == "Ready")].status` +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // PluginPreset is the Schema for the PluginPresets API type PluginPreset struct { diff --git a/api/v1alpha2/teamrolebinding_types.go b/api/v1alpha2/teamrolebinding_types.go index 4c12c2478..c9008f683 100644 --- a/api/v1alpha2/teamrolebinding_types.go +++ b/api/v1alpha2/teamrolebinding_types.go @@ -56,6 +56,7 @@ type PropagationStatus struct { //+kubebuilder:printcolumn:name="Team",type=string,JSONPath=`.spec.teamRef` //+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type == "Ready")].status` //+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.statusConditions.conditions[?(@.type=="Ready")].message` // TeamRoleBinding is the Schema for the rolebindings API type TeamRoleBinding struct { From 5f1b2744340c272ada0345a90648e9eeae5f3c63 Mon Sep 17 00:00:00 2001 From: "cloud-operator-bot[bot]" <224791424+cloud-operator-bot[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 07:48:58 +0000 Subject: [PATCH 2/2] Automatic generation of CRD API Docs --- charts/manager/crds/greenhouse.sap_catalogs.yaml | 3 +++ .../greenhouse.sap_clusterplugindefinitions.yaml | 3 +++ charts/manager/crds/greenhouse.sap_clusters.yaml | 3 +++ .../manager/crds/greenhouse.sap_organizations.yaml | 3 +++ .../manager/crds/greenhouse.sap_pluginpresets.yaml | 3 +++ charts/manager/crds/greenhouse.sap_plugins.yaml | 12 +++--------- .../crds/greenhouse.sap_teamrolebindings.yaml | 3 +++ 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/charts/manager/crds/greenhouse.sap_catalogs.yaml b/charts/manager/crds/greenhouse.sap_catalogs.yaml index 5f27fab2d..949973607 100755 --- a/charts/manager/crds/greenhouse.sap_catalogs.yaml +++ b/charts/manager/crds/greenhouse.sap_catalogs.yaml @@ -23,6 +23,9 @@ spec: - jsonPath: .status.statusConditions.conditions[?(@.type == "Ready")].status name: Ready type: string + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/charts/manager/crds/greenhouse.sap_clusterplugindefinitions.yaml b/charts/manager/crds/greenhouse.sap_clusterplugindefinitions.yaml index 336ea0d73..caed80bf1 100755 --- a/charts/manager/crds/greenhouse.sap_clusterplugindefinitions.yaml +++ b/charts/manager/crds/greenhouse.sap_clusterplugindefinitions.yaml @@ -29,6 +29,9 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/charts/manager/crds/greenhouse.sap_clusters.yaml b/charts/manager/crds/greenhouse.sap_clusters.yaml index 1f95f4f1c..a63fd6c4f 100644 --- a/charts/manager/crds/greenhouse.sap_clusters.yaml +++ b/charts/manager/crds/greenhouse.sap_clusters.yaml @@ -30,6 +30,9 @@ spec: - jsonPath: .status.kubernetesVersion name: Version type: string + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/charts/manager/crds/greenhouse.sap_organizations.yaml b/charts/manager/crds/greenhouse.sap_organizations.yaml index 3885c27b1..e27cef1f8 100644 --- a/charts/manager/crds/greenhouse.sap_organizations.yaml +++ b/charts/manager/crds/greenhouse.sap_organizations.yaml @@ -32,6 +32,9 @@ spec: - jsonPath: .status.statusConditions.conditions[?(@.type == "Ready")].status name: Ready type: string + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/charts/manager/crds/greenhouse.sap_pluginpresets.yaml b/charts/manager/crds/greenhouse.sap_pluginpresets.yaml index f4a0bc04a..05f4bd42a 100644 --- a/charts/manager/crds/greenhouse.sap_pluginpresets.yaml +++ b/charts/manager/crds/greenhouse.sap_pluginpresets.yaml @@ -29,6 +29,9 @@ spec: - jsonPath: .status.statusConditions.conditions[?(@.type == "Ready")].status name: Ready type: string + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/charts/manager/crds/greenhouse.sap_plugins.yaml b/charts/manager/crds/greenhouse.sap_plugins.yaml index ea9fd778e..9037fbb80 100644 --- a/charts/manager/crds/greenhouse.sap_plugins.yaml +++ b/charts/manager/crds/greenhouse.sap_plugins.yaml @@ -18,21 +18,12 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .spec.displayName - name: Display name - type: string - jsonPath: .spec.pluginDefinitionRef.name name: Plugin Definition type: string - jsonPath: .spec.clusterName name: Cluster type: string - - jsonPath: .spec.releaseName - name: Release Name - type: string - - jsonPath: .spec.releaseNamespace - name: Release Namespace - type: string - jsonPath: .status.statusConditions.conditions[?(@.type == "Ready")].status name: Ready type: string @@ -42,6 +33,9 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/charts/manager/crds/greenhouse.sap_teamrolebindings.yaml b/charts/manager/crds/greenhouse.sap_teamrolebindings.yaml index 49fe12df5..ecb75192d 100644 --- a/charts/manager/crds/greenhouse.sap_teamrolebindings.yaml +++ b/charts/manager/crds/greenhouse.sap_teamrolebindings.yaml @@ -251,6 +251,9 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.statusConditions.conditions[?(@.type=="Ready")].message + name: Status + type: string name: v1alpha2 schema: openAPIV3Schema: