Skip to content

Commit

Permalink
Merge pull request #8071 from sbueringer/pr-deprecate
Browse files Browse the repository at this point in the history
🌱 Deprecate v1alpha3 & v1alpha4
  • Loading branch information
k8s-ci-robot authored Feb 14, 2023
2 parents 75b6c47 + 9bee35d commit 9c5fdae
Show file tree
Hide file tree
Showing 65 changed files with 235 additions and 48 deletions.
13 changes: 12 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,21 @@ issues:
# changes in PRs and avoid nitpicking.
exclude-use-default: false
exclude-rules:
# Specific exclude rules for deprecated fields that are still part of the codebase. These should be removed as the referenced deprecated item is removed from the project.
# Specific exclude rules for deprecated fields that are still part of the codebase. These
# should be removed as the referenced deprecated item is removed from the project.
- linters:
- staticcheck
text: "SA1019: (bootstrapv1.ClusterStatus|scope.Config.Spec.UseExperimentalRetryJoin|DockerMachine.Spec.Bootstrapped|machineStatus.Bootstrapped) is deprecated"
# Specific exclude rules for deprecated packages that are still part of the codebase. These
# should be removed as the referenced deprecated packages are removed from the project.
- linters:
- staticcheck
text: "SA1019: .* is deprecated: This package will be removed in one of the next releases."
# Specific exclude rules for deprecated types that are still part of the codebase. These
# should be removed as the referenced deprecated types are removed from the project.
- linters:
- staticcheck
text: "SA1019: (clusterv1alpha3.*|clusterv1alpha4.*) is deprecated: This type will be removed in one of the next releases."
- linters:
- revive
text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha3/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ limitations under the License.

// Package v1alpha3 contains the v1alpha3 API implementation.
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha3
4 changes: 4 additions & 0 deletions api/v1alpha3/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ type Bootstrap struct {
// +kubebuilder:printcolumn:name="NodeName",type="string",JSONPath=".status.nodeRef.name",description="Node name associated with this machine",priority=1

// Machine is the Schema for the machines API.
//
// Deprecated: This type will be removed in one of the next releases.
type Machine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -266,6 +268,8 @@ func (m *Machine) SetConditions(conditions Conditions) {
// +kubebuilder:object:root=true

// MachineList contains a list of Machine.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha3/machinedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
// +kubebuilder:printcolumn:name="Unavailable",type=integer,JSONPath=".status.unavailableReplicas",description="Total number of unavailable machines targeted by this MachineDeployment"

// MachineDeployment is the Schema for the machinedeployments API.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -262,6 +264,8 @@ type MachineDeployment struct {
// +kubebuilder:object:root=true

// MachineDeploymentList contains a list of MachineDeployment.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha3/machinehealthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ type MachineHealthCheckStatus struct {
// +kubebuilder:printcolumn:name="CurrentHealthy",type="integer",JSONPath=".status.currentHealthy",description="Current observed healthy machines"

// MachineHealthCheck is the Schema for the machinehealthchecks API.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineHealthCheck struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -145,6 +147,8 @@ func (m *MachineHealthCheck) SetConditions(conditions Conditions) {
// +kubebuilder:object:root=true

// MachineHealthCheckList contains a list of MachineHealthCheck.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineHealthCheckList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha3/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ func (m *MachineSet) Validate() field.ErrorList {
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this machineset."

// MachineSet is the Schema for the machinesets API.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -204,6 +206,8 @@ type MachineSet struct {
// +kubebuilder:object:root=true

// MachineSetList contains a list of MachineSet.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha4/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ func (v APIEndpoint) String() string {
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed"

// Cluster is the Schema for the clusters API.
//
// Deprecated: This type will be removed in one of the next releases.
type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down Expand Up @@ -387,6 +389,8 @@ func (f ClusterIPFamily) String() string {
// +kubebuilder:object:root=true

// ClusterList contains a list of Cluster.
//
// Deprecated: This type will be removed in one of the next releases.
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha4/clusterclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterClass"

// ClusterClass is a template which can be used to create managed topologies.
//
// Deprecated: This type will be removed in one of the next releases.
type ClusterClass struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down Expand Up @@ -121,6 +123,8 @@ type LocalObjectTemplate struct {
// +kubebuilder:object:root=true

// ClusterClassList contains a list of Cluster.
//
// Deprecated: This type will be removed in one of the next releases.
type ClusterClassList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha4/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ limitations under the License.

// Package v1alpha4 contains the v1alpha4 API implementation.
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha4
4 changes: 4 additions & 0 deletions api/v1alpha4/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ type Bootstrap struct {
// +kubebuilder:printcolumn:name="NodeName",type="string",JSONPath=".status.nodeRef.name",description="Node name associated with this machine",priority=1

// Machine is the Schema for the machines API.
//
// Deprecated: This type will be removed in one of the next releases.
type Machine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -265,6 +267,8 @@ func (m *Machine) SetConditions(conditions Conditions) {
// +kubebuilder:object:root=true

// MachineList contains a list of Machine.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha4/machinedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
// +kubebuilder:printcolumn:name="Unavailable",type=integer,JSONPath=".status.unavailableReplicas",description="Total number of unavailable machines targeted by this MachineDeployment"

// MachineDeployment is the Schema for the machinedeployments API.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -293,6 +295,8 @@ type MachineDeployment struct {
// +kubebuilder:object:root=true

// MachineDeploymentList contains a list of MachineDeployment.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha4/machinehealthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ type MachineHealthCheckStatus struct {
// +kubebuilder:printcolumn:name="CurrentHealthy",type="integer",JSONPath=".status.currentHealthy",description="Current observed healthy machines"

// MachineHealthCheck is the Schema for the machinehealthchecks API.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineHealthCheck struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -158,6 +160,8 @@ func (m *MachineHealthCheck) SetConditions(conditions Conditions) {
// +kubebuilder:object:root=true

// MachineHealthCheckList contains a list of MachineHealthCheck.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineHealthCheckList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha4/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ func (m *MachineSet) Validate() field.ErrorList {
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this machineset."

// MachineSet is the Schema for the machinesets API.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -216,6 +218,8 @@ type MachineSet struct {
// +kubebuilder:object:root=true

// MachineSetList contains a list of MachineSet.
//
// Deprecated: This type will be removed in one of the next releases.
type MachineSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/kubeadm/api/v1alpha3/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ limitations under the License.

// Package v1alpha3 contains the v1alpha3 API implementation.
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha3
4 changes: 4 additions & 0 deletions bootstrap/kubeadm/api/v1alpha3/kubeadmconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ type KubeadmConfigStatus struct {
// +kubebuilder:subresource:status

// KubeadmConfig is the Schema for the kubeadmconfigs API.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -157,6 +159,8 @@ func (c *KubeadmConfig) SetConditions(conditions clusterv1alpha3.Conditions) {
// +kubebuilder:object:root=true

// KubeadmConfigList contains a list of KubeadmConfig.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions bootstrap/kubeadm/api/v1alpha3/kubeadmconfigtemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ type KubeadmConfigTemplateResource struct {
// +kubebuilder:resource:path=kubeadmconfigtemplates,scope=Namespaced,categories=cluster-api

// KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfigTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -44,6 +46,8 @@ type KubeadmConfigTemplate struct {
// +kubebuilder:object:root=true

// KubeadmConfigTemplateList contains a list of KubeadmConfigTemplate.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfigTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/kubeadm/api/v1alpha4/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ limitations under the License.

// Package v1alpha4 contains the v1alpha4 API implementation.
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1
//
// Deprecated: This package will be removed in one of the next releases.
package v1alpha4
4 changes: 4 additions & 0 deletions bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ type KubeadmConfigStatus struct {
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfig"

// KubeadmConfig is the Schema for the kubeadmconfigs API.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -150,6 +152,8 @@ func (c *KubeadmConfig) SetConditions(conditions clusterv1alpha4.Conditions) {
// +kubebuilder:object:root=true

// KubeadmConfigList contains a list of KubeadmConfig.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions bootstrap/kubeadm/api/v1alpha4/kubeadmconfigtemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ type KubeadmConfigTemplateResource struct {
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfigTemplate"

// KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfigTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -45,6 +47,8 @@ type KubeadmConfigTemplate struct {
// +kubebuilder:object:root=true

// KubeadmConfigTemplateList contains a list of KubeadmConfigTemplate.
//
// Deprecated: This type will be removed in one of the next releases.
type KubeadmConfigTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9c5fdae

Please sign in to comment.