From c47a8e8626c6108b17eab7925cf0f1f002fd3774 Mon Sep 17 00:00:00 2001 From: shunki-fujita Date: Wed, 25 Oct 2023 04:00:38 +0000 Subject: [PATCH] api: add deprecatedversion marker --- api/v1beta1/backuppolicy_types.go | 1 + api/v1beta1/mysqlcluster_types.go | 1 + charts/moco/templates/generated/crds/moco_crds.yaml | 4 +++- config/crd/bases/moco.cybozu.com_backuppolicies.yaml | 3 ++- config/crd/bases/moco.cybozu.com_mysqlclusters.yaml | 1 + ...stomresourcedefinition_backuppolicies.moco.cybozu.com.yaml | 3 ++- ...ustomresourcedefinition_mysqlclusters.moco.cybozu.com.yaml | 1 + 7 files changed, 11 insertions(+), 3 deletions(-) diff --git a/api/v1beta1/backuppolicy_types.go b/api/v1beta1/backuppolicy_types.go index e0859bc35..af7eeba51 100644 --- a/api/v1beta1/backuppolicy_types.go +++ b/api/v1beta1/backuppolicy_types.go @@ -83,6 +83,7 @@ type BackupPolicySpec struct { } //+kubebuilder:object:root=true +//+kubebuilder:deprecatedversion // 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 2cfb1a982..7c7fc8091 100644 --- a/api/v1beta1/mysqlcluster_types.go +++ b/api/v1beta1/mysqlcluster_types.go @@ -345,6 +345,7 @@ type ReconcileInfo struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:deprecatedversion // +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 83d6c9ad9..a29bdd37c 100644 --- a/charts/moco/templates/generated/crds/moco_crds.yaml +++ b/charts/moco/templates/generated/crds/moco_crds.yaml @@ -18,7 +18,8 @@ spec: singular: backuppolicy scope: Namespaced versions: - - name: v1beta1 + - deprecated: true + name: v1beta1 schema: openAPIV3Schema: description: 'BackupPolicy is a namespaced resource that should ' @@ -4095,6 +4096,7 @@ spec: - jsonPath: .status.backup.time name: Last backup type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: diff --git a/config/crd/bases/moco.cybozu.com_backuppolicies.yaml b/config/crd/bases/moco.cybozu.com_backuppolicies.yaml index dea044f69..ece6302ba 100644 --- a/config/crd/bases/moco.cybozu.com_backuppolicies.yaml +++ b/config/crd/bases/moco.cybozu.com_backuppolicies.yaml @@ -14,7 +14,8 @@ spec: singular: backuppolicy scope: Namespaced versions: - - name: v1beta1 + - deprecated: true + name: v1beta1 schema: openAPIV3Schema: description: 'BackupPolicy is a namespaced resource that should ' diff --git a/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml b/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml index 9e4b4bf39..e4b5e907b 100644 --- a/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml +++ b/config/crd/bases/moco.cybozu.com_mysqlclusters.yaml @@ -33,6 +33,7 @@ spec: - jsonPath: .status.backup.time name: Last backup type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: 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 08d6b4300..b4fec001e 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 @@ -13,7 +13,8 @@ spec: singular: backuppolicy scope: Namespaced versions: - - name: v1beta1 + - deprecated: true + name: v1beta1 schema: openAPIV3Schema: description: 'BackupPolicy is a namespaced resource that should ' 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 2c87c66e9..63d519308 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 @@ -43,6 +43,7 @@ spec: - jsonPath: .status.backup.time name: Last backup type: string + deprecated: true name: v1beta1 schema: openAPIV3Schema: