From 29e36e927803d486b78e3eddbba7b09c55f22bdf Mon Sep 17 00:00:00 2001 From: Roman Hros Date: Tue, 19 Dec 2023 09:38:20 +0100 Subject: [PATCH] Add boolean 'status.ready' field for openstackclusterstackrelease Signed-off-by: Roman Hros --- api/v1alpha1/openstackclusterstackrelease_types.go | 6 ++++-- ...erstack.x-k8s.io_openstackclusterstackreleases.yaml | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/v1alpha1/openstackclusterstackrelease_types.go b/api/v1alpha1/openstackclusterstackrelease_types.go index 8565096b..758dd94e 100644 --- a/api/v1alpha1/openstackclusterstackrelease_types.go +++ b/api/v1alpha1/openstackclusterstackrelease_types.go @@ -34,12 +34,14 @@ type OpenstackClusterStackReleaseSpec struct { // OpenstackClusterStackReleaseStatus defines the observed state of OpenstackClusterStackRelease. type OpenstackClusterStackReleaseStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file + // +optional + // +kubebuilder:default:=false + Ready bool `json:"ready,omitempty"` } //+kubebuilder:object:root=true //+kubebuilder:subresource:status +//+kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready" // OpenstackClusterStackRelease is the Schema for the openstackclusterstackreleases API. type OpenstackClusterStackRelease struct { diff --git a/config/crd/bases/infrastructure.clusterstack.x-k8s.io.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml b/config/crd/bases/infrastructure.clusterstack.x-k8s.io.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml index 46d6a74d..3dc45fda 100644 --- a/config/crd/bases/infrastructure.clusterstack.x-k8s.io.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml +++ b/config/crd/bases/infrastructure.clusterstack.x-k8s.io.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml @@ -14,7 +14,11 @@ spec: singular: openstackclusterstackrelease scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1alpha1 schema: openAPIV3Schema: description: OpenstackClusterStackRelease is the Schema for the openstackclusterstackreleases @@ -44,6 +48,10 @@ spec: status: description: OpenstackClusterStackReleaseStatus defines the observed state of OpenstackClusterStackRelease. + properties: + ready: + default: false + type: boolean type: object type: object served: true