forked from kubernetes/autoscaler
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: <carry>: openshift: return no nodegroup when scaling bounds…
… == 0 Change nodeGroupForNode() to return nil when the underlying node group has no scaling bounds. The underlying MachineSet in these cases is either missing the following annotations: ``` annotations: machine.openshift.io/cluster-api-autoscaler-node-group-min-size: "1" machine.openshift.io/cluster-api-autoscaler-node-group-max-size: "6" ``` or they are present but the result of `max-size - min-size` is zero. This change helps to remove a lot of spurious error messages from the core of the autoscaler logs at runtime. Without this change we see the following printed every time the autoscaler scans the state of the cluster (which defaults to 10s) and can be very misleading. ```console $ oc logs -f cluster-autoscaler-default-77f884d74b-527bq E1204 08:26:01.996252 1 utils.go:467] Error while checking node group size worker-us-east-2a: group size not found E1204 08:26:01.996545 1 utils.go:467] Error while checking node group size worker-us-east-2b: group size not found E1204 08:26:01.996678 1 utils.go:467] Error while checking node group size worker-us-east-2c: group size not found ``` Those unit tests that were previously relying on nodeGroupForNode() to always return a node group when no bounds had been specified have been modified so that they now have a scaling bound >= 1. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1656334
- Loading branch information
Showing
2 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters