Skip to content

Commit 9c5fdae

Browse files
authored
Merge pull request #8071 from sbueringer/pr-deprecate
🌱 Deprecate v1alpha3 & v1alpha4
2 parents 75b6c47 + 9bee35d commit 9c5fdae

File tree

65 files changed

+235
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+235
-48
lines changed

.golangci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,21 @@ issues:
227227
# changes in PRs and avoid nitpicking.
228228
exclude-use-default: false
229229
exclude-rules:
230-
# 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.
230+
# Specific exclude rules for deprecated fields that are still part of the codebase. These
231+
# should be removed as the referenced deprecated item is removed from the project.
231232
- linters:
232233
- staticcheck
233234
text: "SA1019: (bootstrapv1.ClusterStatus|scope.Config.Spec.UseExperimentalRetryJoin|DockerMachine.Spec.Bootstrapped|machineStatus.Bootstrapped) is deprecated"
235+
# Specific exclude rules for deprecated packages that are still part of the codebase. These
236+
# should be removed as the referenced deprecated packages are removed from the project.
237+
- linters:
238+
- staticcheck
239+
text: "SA1019: .* is deprecated: This package will be removed in one of the next releases."
240+
# Specific exclude rules for deprecated types that are still part of the codebase. These
241+
# should be removed as the referenced deprecated types are removed from the project.
242+
- linters:
243+
- staticcheck
244+
text: "SA1019: (clusterv1alpha3.*|clusterv1alpha4.*) is deprecated: This type will be removed in one of the next releases."
234245
- linters:
235246
- revive
236247
text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"

api/v1alpha3/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ limitations under the License.
1616

1717
// Package v1alpha3 contains the v1alpha3 API implementation.
1818
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1
19+
//
20+
// Deprecated: This package will be removed in one of the next releases.
1921
package v1alpha3

api/v1alpha3/machine_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ type Bootstrap struct {
245245
// +kubebuilder:printcolumn:name="NodeName",type="string",JSONPath=".status.nodeRef.name",description="Node name associated with this machine",priority=1
246246

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

268270
// MachineList contains a list of Machine.
271+
//
272+
// Deprecated: This type will be removed in one of the next releases.
269273
type MachineList struct {
270274
metav1.TypeMeta `json:",inline"`
271275
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha3/machinedeployment_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
251251
// +kubebuilder:printcolumn:name="Unavailable",type=integer,JSONPath=".status.unavailableReplicas",description="Total number of unavailable machines targeted by this MachineDeployment"
252252

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

264266
// MachineDeploymentList contains a list of MachineDeployment.
267+
//
268+
// Deprecated: This type will be removed in one of the next releases.
265269
type MachineDeploymentList struct {
266270
metav1.TypeMeta `json:",inline"`
267271
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha3/machinehealthcheck_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ type MachineHealthCheckStatus struct {
121121
// +kubebuilder:printcolumn:name="CurrentHealthy",type="integer",JSONPath=".status.currentHealthy",description="Current observed healthy machines"
122122

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

147149
// MachineHealthCheckList contains a list of MachineHealthCheck.
150+
//
151+
// Deprecated: This type will be removed in one of the next releases.
148152
type MachineHealthCheckList struct {
149153
metav1.TypeMeta `json:",inline"`
150154
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha3/machineset_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ func (m *MachineSet) Validate() field.ErrorList {
193193
// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of ready machines targeted by this machineset."
194194

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

206208
// MachineSetList contains a list of MachineSet.
209+
//
210+
// Deprecated: This type will be removed in one of the next releases.
207211
type MachineSetList struct {
208212
metav1.TypeMeta `json:",inline"`
209213
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha4/cluster_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ func (v APIEndpoint) String() string {
282282
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Cluster status such as Pending/Provisioning/Provisioned/Deleting/Failed"
283283

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

389391
// ClusterList contains a list of Cluster.
392+
//
393+
// Deprecated: This type will be removed in one of the next releases.
390394
type ClusterList struct {
391395
metav1.TypeMeta `json:",inline"`
392396
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha4/clusterclass_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import (
2626
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterClass"
2727

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

123125
// ClusterClassList contains a list of Cluster.
126+
//
127+
// Deprecated: This type will be removed in one of the next releases.
124128
type ClusterClassList struct {
125129
metav1.TypeMeta `json:",inline"`
126130
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha4/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ limitations under the License.
1616

1717
// Package v1alpha4 contains the v1alpha4 API implementation.
1818
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/v1beta1
19+
//
20+
// Deprecated: This package will be removed in one of the next releases.
1921
package v1alpha4

api/v1alpha4/machine_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ type Bootstrap struct {
244244
// +kubebuilder:printcolumn:name="NodeName",type="string",JSONPath=".status.nodeRef.name",description="Node name associated with this machine",priority=1
245245

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

267269
// MachineList contains a list of Machine.
270+
//
271+
// Deprecated: This type will be removed in one of the next releases.
268272
type MachineList struct {
269273
metav1.TypeMeta `json:",inline"`
270274
metav1.ListMeta `json:"metadata,omitempty"`

0 commit comments

Comments
 (0)