From d8b0842023cf5cca16c2a17bb41651d3f423caf1 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Fri, 4 Aug 2023 10:36:33 +0200 Subject: [PATCH] Add ClusterClass column to Cluster CRD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- api/v1beta1/cluster_types.go | 1 + config/crd/bases/cluster.x-k8s.io_clusters.yaml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index ffc1f05063cf..c85bc049fdc6 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -480,6 +480,7 @@ func (v APIEndpoint) String() string { // +kubebuilder:resource:path=clusters,shortName=cl,scope=Namespaced,categories=cluster-api // +kubebuilder:storageversion // +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ClusterClass",type="string",JSONPath=".spec.topology.class",description="ClusterClass of this Cluster, empty if the Cluster is not using a ClusterClass" // +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Cluster" // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.topology.version",description="Kubernetes version associated with this Cluster" diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml index d35d54d9bf5e..3bd1c08fb613 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml @@ -665,6 +665,11 @@ spec: subresources: status: {} - additionalPrinterColumns: + - description: ClusterClass of this Cluster, empty if the Cluster is not using + a ClusterClass + jsonPath: .spec.topology.class + name: ClusterClass + type: string - description: Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed jsonPath: .status.phase name: Phase