From c351e257a88bb4259ef909e11bcb6a014e094cde Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Wed, 15 May 2024 21:37:02 +0200 Subject: [PATCH] chore: deprecate v1 and v2alpha1 SubNamespace API --- api/accurate/v1/subnamespace_types.go | 3 +++ api/accurate/v2alpha1/subnamespace_types.go | 3 +++ charts/accurate/templates/generated/crds.yaml | 16 ++++++++++++---- .../accurate.cybozu.com_subnamespaces.yaml | 18 ++++++++++++++---- docs/crd_subnamespace.md | 4 ++-- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/api/accurate/v1/subnamespace_types.go b/api/accurate/v1/subnamespace_types.go index 0ef252f..18edbc9 100644 --- a/api/accurate/v1/subnamespace_types.go +++ b/api/accurate/v1/subnamespace_types.go @@ -28,8 +28,10 @@ type SubNamespaceSpec struct { } //+kubebuilder:object:root=true +//+kubebuilder:deprecatedversion:warning="The v1 version of SubNamespace has been deprecated and will be removed in a future release of the API. Please upgrade." // SubNamespace is the Schema for the subnamespaces API +// Deprecated: This type will be removed in one of the next releases. type SubNamespace struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -46,6 +48,7 @@ type SubNamespace struct { //+kubebuilder:object:root=true // SubNamespaceList contains a list of SubNamespace +// Deprecated: This type will be removed in one of the next releases. type SubNamespaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/api/accurate/v2alpha1/subnamespace_types.go b/api/accurate/v2alpha1/subnamespace_types.go index 28640c5..176e255 100644 --- a/api/accurate/v2alpha1/subnamespace_types.go +++ b/api/accurate/v2alpha1/subnamespace_types.go @@ -32,10 +32,12 @@ type SubNamespaceSpec struct { } //+kubebuilder:object:root=true +//+kubebuilder:deprecatedversion:warning="The v2alpha1 version of SubNamespace has been deprecated and will be removed in a future release of the API. Please upgrade." //+kubebuilder:subresource:status //+genclient // SubNamespace is the Schema for the subnamespaces API +// Deprecated: This type will be removed in one of the next releases. type SubNamespace struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -52,6 +54,7 @@ type SubNamespace struct { //+kubebuilder:object:root=true // SubNamespaceList contains a list of SubNamespace +// Deprecated: This type will be removed in one of the next releases. type SubNamespaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/charts/accurate/templates/generated/crds.yaml b/charts/accurate/templates/generated/crds.yaml index 317cda7..f3f2b9f 100644 --- a/charts/accurate/templates/generated/crds.yaml +++ b/charts/accurate/templates/generated/crds.yaml @@ -30,10 +30,14 @@ spec: singular: subnamespace scope: Namespaced versions: - - name: v1 + - deprecated: true + deprecationWarning: The v1 version of SubNamespace has been deprecated and will be removed in a future release of the API. Please upgrade. + name: v1 schema: openAPIV3Schema: - description: SubNamespace is the Schema for the subnamespaces API + description: |- + SubNamespace is the Schema for the subnamespaces API + Deprecated: This type will be removed in one of the next releases. properties: apiVersion: description: |- @@ -184,10 +188,14 @@ spec: storage: true subresources: status: {} - - name: v2alpha1 + - deprecated: true + deprecationWarning: The v2alpha1 version of SubNamespace has been deprecated and will be removed in a future release of the API. Please upgrade. + name: v2alpha1 schema: openAPIV3Schema: - description: SubNamespace is the Schema for the subnamespaces API + description: |- + SubNamespace is the Schema for the subnamespaces API + Deprecated: This type will be removed in one of the next releases. properties: apiVersion: description: |- diff --git a/config/crd/bases/accurate.cybozu.com_subnamespaces.yaml b/config/crd/bases/accurate.cybozu.com_subnamespaces.yaml index 5efb924..4080643 100644 --- a/config/crd/bases/accurate.cybozu.com_subnamespaces.yaml +++ b/config/crd/bases/accurate.cybozu.com_subnamespaces.yaml @@ -14,10 +14,15 @@ spec: singular: subnamespace scope: Namespaced versions: - - name: v1 + - deprecated: true + deprecationWarning: The v1 version of SubNamespace has been deprecated and will + be removed in a future release of the API. Please upgrade. + name: v1 schema: openAPIV3Schema: - description: SubNamespace is the Schema for the subnamespaces API + description: |- + SubNamespace is the Schema for the subnamespaces API + Deprecated: This type will be removed in one of the next releases. properties: apiVersion: description: |- @@ -172,10 +177,15 @@ spec: storage: true subresources: status: {} - - name: v2alpha1 + - deprecated: true + deprecationWarning: The v2alpha1 version of SubNamespace has been deprecated and + will be removed in a future release of the API. Please upgrade. + name: v2alpha1 schema: openAPIV3Schema: - description: SubNamespace is the Schema for the subnamespaces API + description: |- + SubNamespace is the Schema for the subnamespaces API + Deprecated: This type will be removed in one of the next releases. properties: apiVersion: description: |- diff --git a/docs/crd_subnamespace.md b/docs/crd_subnamespace.md index 229a182..b751d6c 100644 --- a/docs/crd_subnamespace.md +++ b/docs/crd_subnamespace.md @@ -10,7 +10,7 @@ #### SubNamespace -SubNamespace is the Schema for the subnamespaces API +SubNamespace is the Schema for the subnamespaces API Deprecated: This type will be removed in one of the next releases. | Field | Description | Scheme | Required | | ----- | ----------- | ------ | -------- | @@ -22,7 +22,7 @@ SubNamespace is the Schema for the subnamespaces API #### SubNamespaceList -SubNamespaceList contains a list of SubNamespace +SubNamespaceList contains a list of SubNamespace Deprecated: This type will be removed in one of the next releases. | Field | Description | Scheme | Required | | ----- | ----------- | ------ | -------- |