MHC Controller keeps issuing warning although the MachineDeployment does not have any unhealthy machines
Levi080513 opened this issue · comments
What steps did you take and what happened?
- Create CAPI Cluster.
- Create MHC and configure unHealthRange like this
spec:
clusterName: hw-sks-test-logging
maxUnhealthy: 100%
nodeStartupTimeout: 5m0s
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: hw-sks-test-logging
cluster.x-k8s.io/deployment-name: hw-sks-test-logging-logging
unhealthyConditions:
- status: Unknown
timeout: 5m0s
type: Ready
- status: "False"
timeout: 5m0s
type: Ready
unhealthyRange: '[1-3]'
- MHC Controller keeps issuing warning although the cluster does not have any unhealthy machines, the warning events like this:
3m52s Warning RemediationRestricted machinehealthcheck/hw-sks-test-logging-logging Remediation is not allowed, the number of not started or unhealthy machines does not fall within the range (total: 3, unhealthy: 0, unhealthyRange: [1-3])
What did you expect to happen?
Can we make a small optimization for the MHC Controller does not generate this warning when the MachineDeployment does not have any unhealthy machines? This is easily misleading.
Cluster API version
v1.6.4
Kubernetes version
v1.25.16
Anything else you would like to add?
No response
Label(s) to be applied
/kind bug
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.
Sounds good!
/kind cleanup
/area machinehealthcheck
/triage accepted
/close
The PR already merged
@fabriziopandini: Closing this issue.
In response to this:
/close
The PR already merged
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.