Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark v1alpha4 CRDs as Deprecated and Unserved #388

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/v1alpha4/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ limitations under the License.
// +kubebuilder:object:generate=true
// +groupName=infrastructure.cluster.x-k8s.io
// +k8s:conversion-gen=github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha4
2 changes: 2 additions & 0 deletions api/v1alpha4/nutanixcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ type NutanixClusterStatus struct {
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="in ready status"

// NutanixCluster is the Schema for the nutanixclusters API
// +kubebuilder:deprecatedversion:warning=v1alpha4 NutanixCluster is deprecated and marked as unserved. It will be removed in a future release. Use v1beta1 NutanixCluster instead.
// +kubebuilder:unservedversion
type NutanixCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha4/nutanixmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ type NutanixMachineStatus struct {
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="NutanixMachine instance ID"

// NutanixMachine is the Schema for the nutanixmachines API
// +kubebuilder:deprecatedversion:warning=v1alpha4 NutanixMachine is deprecated and marked as unserved. It will be removed in a future release. Use v1beta1 NutanixMachine instead.
// +kubebuilder:unservedversion
type NutanixMachine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
jsonPath: .status.ready
name: Ready
type: string
deprecated: true
deprecationWarning: v1alpha4 NutanixCluster is deprecated and marked as unserved.
It will be removed in a future release. Use v1beta1 NutanixCluster instead.
name: v1alpha4
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -300,7 +303,7 @@ spec:
type: boolean
type: object
type: object
served: true
served: false
thunderboltsid marked this conversation as resolved.
Show resolved Hide resolved
storage: false
subresources:
status: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
jsonPath: .spec.providerID
name: ProviderID
type: string
deprecated: true
deprecationWarning: v1alpha4 NutanixMachine is deprecated and marked as unserved.
It will be removed in a future release. Use v1beta1 NutanixMachine instead.
name: v1alpha4
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -351,7 +354,7 @@ spec:
type: string
type: object
type: object
served: true
served: false
storage: false
subresources:
status: {}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"

infrav1alpha4 "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1alpha4"
infrav1alpha4 "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1alpha4" //nolint:staticcheck // deprecated package; will be removed in one of the next releases
infrav1 "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1"
"github.com/nutanix-cloud-native/cluster-api-provider-nutanix/controllers"
//+kubebuilder:scaffold:imports
Expand Down
Loading