Skip to content

Commit 9a9848f

Browse files
Deprecate replica counters planned for removal
1 parent 8fcde6a commit 9a9848f

10 files changed

+29
-6
lines changed

.golangci.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,13 @@ issues:
252252
- linters:
253253
- staticcheck
254254
text: "SA1019: (mhc|m)(.Spec.MaxUnhealthy|.Spec.UnhealthyRange) is deprecated"
255-
# Deprecations for FailureMessage and FailureReason
255+
# Deprecations for FailureMessage, FailureReason, UnavailableReplicas and FullyLabeledReplicas
256256
- linters:
257257
- staticcheck
258-
text: "SA1019: .*\\.Status\\.(FailureMessage|FailureReason) is deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details."
258+
text: "SA1019: .*\\.Status\\.(FailureMessage|FailureReason|UnavailableReplicas|FullyLabeledReplicas) is deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details."
259+
- linters:
260+
- staticcheck
261+
text: "SA1019: newStatus.FullyLabeledReplicas is deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details."
259262
# Specific exclude rules for deprecated packages that are still part of the codebase. These
260263
# should be removed as the referenced deprecated packages are removed from the project.
261264
- linters:

api/v1beta1/machinedeployment_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ type MachineDeploymentStatus struct {
449449
// the deployment to have 100% available capacity. They may either
450450
// be machines that are running but not yet available or machines
451451
// that still have not been created.
452+
//
453+
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
454+
//
452455
// +optional
453456
UnavailableReplicas int32 `json:"unavailableReplicas"`
454457

api/v1beta1/machineset_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ type MachineSetStatus struct {
284284
Replicas int32 `json:"replicas"`
285285

286286
// The number of replicas that have labels matching the labels of the machine template of the MachineSet.
287+
//
288+
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
289+
//
287290
// +optional
288291
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas"`
289292

api/v1beta1/zz_generated.openapi.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinepools.yaml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinesets.yaml

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ type KubeadmControlPlaneStatus struct {
290290
// the deployment to have 100% available capacity. They may either
291291
// be machines that are running but not yet ready or machines
292292
// that still have not been created.
293+
//
294+
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
295+
//
293296
// +optional
294297
UnavailableReplicas int32 `json:"unavailableReplicas"`
295298

controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exp/api/v1beta1/machinepool_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ type MachinePoolStatus struct {
8989
// the machine pool to have 100% available capacity. They may either
9090
// be machine instances that are running but not yet available or machine instances
9191
// that still have not been created.
92+
//
93+
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
94+
//
9295
// +optional
9396
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`
9497

0 commit comments

Comments
 (0)