diff --git a/api/v1beta1/backuppolicy_types.go b/api/v1beta1/backuppolicy_types.go index 9d6d3a4bf..e0859bc35 100644 --- a/api/v1beta1/backuppolicy_types.go +++ b/api/v1beta1/backuppolicy_types.go @@ -83,7 +83,6 @@ type BackupPolicySpec struct { } //+kubebuilder:object:root=true -//+kubebuilder:storageversion // BackupPolicy is a namespaced resource that should be referenced from MySQLCluster. type BackupPolicy struct { diff --git a/api/v1beta1/mysqlcluster_types.go b/api/v1beta1/mysqlcluster_types.go index f78726ac2..2cfb1a982 100644 --- a/api/v1beta1/mysqlcluster_types.go +++ b/api/v1beta1/mysqlcluster_types.go @@ -345,7 +345,6 @@ type ReconcileInfo struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status" // +kubebuilder:printcolumn:name="Healthy",type="string",JSONPath=".status.conditions[?(@.type=='Healthy')].status" // +kubebuilder:printcolumn:name="Primary",type="integer",JSONPath=".status.currentPrimaryIndex" diff --git a/api/v1beta2/backuppolicy_types.go b/api/v1beta2/backuppolicy_types.go index d9721798d..6934e0abe 100644 --- a/api/v1beta2/backuppolicy_types.go +++ b/api/v1beta2/backuppolicy_types.go @@ -97,6 +97,7 @@ func (s *BackupPolicySpec) validate() (admission.Warnings, field.ErrorList) { } //+kubebuilder:object:root=true +//+kubebuilder:storageversion // BackupPolicy is a namespaced resource that should be referenced from MySQLCluster. type BackupPolicy struct { diff --git a/api/v1beta2/mysqlcluster_types.go b/api/v1beta2/mysqlcluster_types.go index 6a5965431..3232f44b8 100644 --- a/api/v1beta2/mysqlcluster_types.go +++ b/api/v1beta2/mysqlcluster_types.go @@ -659,6 +659,7 @@ type ReconcileInfo struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status" // +kubebuilder:printcolumn:name="Healthy",type="string",JSONPath=".status.conditions[?(@.type=='Healthy')].status" // +kubebuilder:printcolumn:name="Primary",type="integer",JSONPath=".status.currentPrimaryIndex" diff --git a/charts/moco/templates/generated/crds/moco_crds.yaml b/charts/moco/templates/generated/crds/moco_crds.yaml index 72eb87c2e..83d6c9ad9 100644 --- a/charts/moco/templates/generated/crds/moco_crds.yaml +++ b/charts/moco/templates/generated/crds/moco_crds.yaml @@ -2030,7 +2030,7 @@ spec: - spec type: object served: true - storage: true + storage: false - name: v1beta2 schema: openAPIV3Schema: @@ -4043,7 +4043,7 @@ spec: - spec type: object served: true - storage: false + storage: true --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -9671,7 +9671,7 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: status: {} - additionalPrinterColumns: @@ -15427,6 +15427,6 @@ spec: type: object type: object served: true - storage: false + storage: true subresources: status: {} diff --git a/config/crd/bases/moco.cybozu.com_backuppolicies.yaml b/config/crd/bases/moco.cybozu.com_backuppolicies.yaml index b1e71e593..dea044f69 100644 --- a/config/crd/bases/moco.cybozu.com_backuppolicies.yaml +++ b/config/crd/bases/moco.cybozu.com_backuppolicies.yaml @@ -2183,7 +2183,7 @@ spec: - spec type: object served: true - storage: true + storage: false - name: v1beta2 schema: openAPIV3Schema: @@ -4353,4 +4353,4 @@ spec: - spec type: object served: true - storage: false + storage: true diff --git a/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml b/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml index ab0859112..9e4b4bf39 100644 --- a/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml +++ b/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml @@ -6139,7 +6139,7 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: status: {} - additionalPrinterColumns: @@ -12435,6 +12435,6 @@ spec: type: object type: object served: true - storage: false + storage: true subresources: status: {} diff --git a/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_backuppolicies.moco.cybozu.com.yaml b/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_backuppolicies.moco.cybozu.com.yaml index a861ea025..08d6b4300 100644 --- a/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_backuppolicies.moco.cybozu.com.yaml +++ b/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_backuppolicies.moco.cybozu.com.yaml @@ -2182,7 +2182,7 @@ spec: - spec type: object served: true - storage: true + storage: false - name: v1beta2 schema: openAPIV3Schema: @@ -4352,4 +4352,4 @@ spec: - spec type: object served: true - storage: false + storage: true diff --git a/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_mysqlclusters.moco.cybozu.com.yaml b/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_mysqlclusters.moco.cybozu.com.yaml index c6d62c033..2c87c66e9 100644 --- a/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_mysqlclusters.moco.cybozu.com.yaml +++ b/config/crd/tests/apiextensions.k8s.io_v1_customresourcedefinition_mysqlclusters.moco.cybozu.com.yaml @@ -6149,7 +6149,7 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: status: {} - additionalPrinterColumns: @@ -12445,6 +12445,6 @@ spec: type: object type: object served: true - storage: false + storage: true subresources: status: {}