From 6b87ce3444360a06294026d3d3f1d4c418c4482a Mon Sep 17 00:00:00 2001 From: Jian Zhu Date: Wed, 3 Jan 2024 10:44:55 +0800 Subject: [PATCH] :seedling: Deprecate managedserviceaccount v1alpha1 (#92) * Deprecate managedserviceaccount v1alpha1 Signed-off-by: zhujian * Add deprecation warning Signed-off-by: zhujian --------- Signed-off-by: zhujian --- .../v1alpha1/managedserviceaccount_types.go | 2 +- .../v1beta1/managedserviceaccount_types.go | 1 + ...n-cluster-management.io_managedserviceaccounts.yaml | 10 +++++++--- ...n-cluster-management.io_managedserviceaccounts.yaml | 10 +++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/apis/authentication/v1alpha1/managedserviceaccount_types.go b/apis/authentication/v1alpha1/managedserviceaccount_types.go index ad186c1..7ca7592 100644 --- a/apis/authentication/v1alpha1/managedserviceaccount_types.go +++ b/apis/authentication/v1alpha1/managedserviceaccount_types.go @@ -26,7 +26,7 @@ func init() { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -//+kubebuilder:storageversion +//+kubebuilder:deprecatedversion:warning="authentication.open-cluster-management.io/v1alpha1 ManagedServiceAccount is deprecated; use authentication.open-cluster-management.io/v1beta1 ManagedServiceAccount; version v1alpha1 will be removed in the next release" // +genclient // ManagedServiceAccount is the Schema for the managedserviceaccounts API diff --git a/apis/authentication/v1beta1/managedserviceaccount_types.go b/apis/authentication/v1beta1/managedserviceaccount_types.go index 30bfca6..ae34943 100644 --- a/apis/authentication/v1beta1/managedserviceaccount_types.go +++ b/apis/authentication/v1beta1/managedserviceaccount_types.go @@ -26,6 +26,7 @@ func init() { //+kubebuilder:object:root=true //+kubebuilder:subresource:status +//+kubebuilder:storageversion // +genclient // ManagedServiceAccount is the Schema for the managedserviceaccounts API diff --git a/charts/managed-serviceaccount/crds/authentication.open-cluster-management.io_managedserviceaccounts.yaml b/charts/managed-serviceaccount/crds/authentication.open-cluster-management.io_managedserviceaccounts.yaml index db05ce4..c5721db 100644 --- a/charts/managed-serviceaccount/crds/authentication.open-cluster-management.io_managedserviceaccounts.yaml +++ b/charts/managed-serviceaccount/crds/authentication.open-cluster-management.io_managedserviceaccounts.yaml @@ -16,7 +16,11 @@ spec: singular: managedserviceaccount scope: Namespaced versions: - - name: v1alpha1 + - deprecated: true + deprecationWarning: authentication.open-cluster-management.io/v1alpha1 ManagedServiceAccount + is deprecated; use authentication.open-cluster-management.io/v1beta1 ManagedServiceAccount; + version v1alpha1 will be removed in the next release + name: v1alpha1 schema: openAPIV3Schema: description: ManagedServiceAccount is the Schema for the managedserviceaccounts @@ -167,7 +171,7 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: status: {} - name: v1beta1 @@ -321,7 +325,7 @@ spec: type: object type: object served: true - storage: false + storage: true subresources: status: {} status: diff --git a/config/crd/bases/authentication.open-cluster-management.io_managedserviceaccounts.yaml b/config/crd/bases/authentication.open-cluster-management.io_managedserviceaccounts.yaml index db05ce4..c5721db 100644 --- a/config/crd/bases/authentication.open-cluster-management.io_managedserviceaccounts.yaml +++ b/config/crd/bases/authentication.open-cluster-management.io_managedserviceaccounts.yaml @@ -16,7 +16,11 @@ spec: singular: managedserviceaccount scope: Namespaced versions: - - name: v1alpha1 + - deprecated: true + deprecationWarning: authentication.open-cluster-management.io/v1alpha1 ManagedServiceAccount + is deprecated; use authentication.open-cluster-management.io/v1beta1 ManagedServiceAccount; + version v1alpha1 will be removed in the next release + name: v1alpha1 schema: openAPIV3Schema: description: ManagedServiceAccount is the Schema for the managedserviceaccounts @@ -167,7 +171,7 @@ spec: type: object type: object served: true - storage: true + storage: false subresources: status: {} - name: v1beta1 @@ -321,7 +325,7 @@ spec: type: object type: object served: true - storage: false + storage: true subresources: status: {} status: