Bug 2066270 - Fallback to CAPI annotations
Summary: Fallback to CAPI annotations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.z
Assignee: Alberto
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On: 2066262
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-21 11:54 UTC by Alberto
Modified: 2022-04-08 09:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2066262
Environment:
Last Closed: 2022-04-08 09:56:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kubernetes-autoscaler pull 226 0 None open Bug 2066270: UPSTREAM: <carry>: Fallback to CAPI annotations 2022-03-21 12:02:22 UTC
Red Hat Product Errata RHSA-2022:1158 0 None None None 2022-04-08 09:56:32 UTC

Description Alberto 2022-03-21 11:54:06 UTC
+++ This bug was initially created as a clone of Bug #2066262 +++

This https://github.com/openshift/kubernetes-autoscaler/pull/214 enabled upstream capi support in openshift 4.10 autoscaler fork which was referencing old annotations.
The same is needed in 4.9 so It can be used by HyperShift when running 4.9 HostedClusters

Comment 3 sunzhaohua 2022-03-29 09:09:08 UTC
Verified
ocp clusterversion: 4.9.0-0.nightly-2022-03-29-031241 
hypershift guest cluster:
oc get hostedcontrolplane -n clusters-example-02 -ojsonpath='{.items[*].spec.releaseImage}'
registry.ci.openshift.org/ocp/release:4.9.0-0.nightly-2022-03-29-031241

Steps:
1. Install ocp cluster
2. Create a HostedCluster
3. Add NodePools and enable autoscaling
oc patch nodepool example-02-us-east-2a --type=json --patch='[{"op":"remove", "path":"/spec/nodeCount"}]' -n clusters
oc -n clusters patch nodepool example-02-us-east-2a --type=merge --patch='{"spec":{"autoScaling":{"max":4, "min":1}}}'

$ oc get nodepools -n clusters                                                                                                             [16:52:08]
NAME                    CLUSTER      DESIRED NODES   CURRENT NODES   AUTOSCALING   AUTOREPAIR   VERSION                             UPDATINGVERSION   UPDATINGCONFIG   MESSAGE
example-02-us-east-2a   example-02                   2               True          False        4.9.0-0.nightly-2022-03-29-031241

4. Check machineset annotation is cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size
$ oc get machineset -A -ojsonpath='{.items[*].metadata.annotations}' | jq
{
 "cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size": "4",
 "cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size": "1",
 "hypershift.openshift.io/nodePool": "clusters/example-02-us-east-2a",
 "machinedeployment.clusters.x-k8s.io/desired-replicas": "1",
 "machinedeployment.clusters.x-k8s.io/max-replicas": "2",
 "machinedeployment.clusters.x-k8s.io/revision": "1",
 "machinedeployment.clusters.x-k8s.io/revision-history": "1,1"
}

Comment 6 errata-xmlrpc 2022-04-08 09:56:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.9.27 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1158


Note You need to log in before you can comment on or make changes to this bug.