Skip to content

Commit 6aff954

Browse files
authored
Merge pull request kubernetes-sigs#10853 from sbueringer/pr-deprecate-mhc-fields
🌱 Deprecate MHC MaxUnhealthy & UnhealthyRange fields
2 parents 4e151e2 + 937302d commit 6aff954

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ issues:
235235
- linters:
236236
- staticcheck
237237
text: "SA1019: (bootstrapv1.ClusterStatus|KubeadmConfigSpec.UseExperimentalRetryJoin|scope.Config.Spec.UseExperimentalRetryJoin|DockerMachine.Spec.Bootstrapped|machineStatus.Bootstrapped|c.TopologyPlan|clusterv1.ClusterClassVariableMetadata|(variable|currentDefinition|specVar|newVariableDefinition|statusVarDefinition).Metadata) is deprecated"
238+
# Deprecations for MHC MaxUnhealthy, UnhealthyRange
239+
- linters:
240+
- staticcheck
241+
text: "SA1019: (mhc|m)(.Spec.MaxUnhealthy|.Spec.UnhealthyRange) is deprecated"
238242
# Specific exclude rules for deprecated packages that are still part of the codebase. These
239243
# should be removed as the referenced deprecated packages are removed from the project.
240244
- linters:

api/v1beta1/machinehealthcheck_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ type MachineHealthCheckSpec struct {
5252

5353
// Any further remediation is only allowed if at most "MaxUnhealthy" machines selected by
5454
// "selector" are not healthy.
55+
//
56+
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10722 for more details.
57+
//
5558
// +optional
5659
MaxUnhealthy *intstr.IntOrString `json:"maxUnhealthy,omitempty"`
5760

@@ -60,6 +63,9 @@ type MachineHealthCheckSpec struct {
6063
// Eg. "[3-5]" - This means that remediation will be allowed only when:
6164
// (a) there are at least 3 unhealthy machines (and)
6265
// (b) there are at most 5 unhealthy machines
66+
//
67+
// Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10722 for more details.
68+
//
6369
// +optional
6470
// +kubebuilder:validation:Pattern=^\[[0-9]+-[0-9]+\]$
6571
UnhealthyRange *string `json:"unhealthyRange,omitempty"`

api/v1beta1/zz_generated.openapi.go

Lines changed: 2 additions & 2 deletions
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_machinehealthchecks.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)