Skip to content

Bug: k8s.gcr.io (registry) hardcoded for cluster-autoscaler #113

Closed
@drmaciej

Description

Expected Behaviour

No exception thrown, both old and new registry handled.

Current Behaviour

Snippet of the output when running eksupgrade drmaciej-cluster 1.26 ap-southeast-2 --preflight

Cluster Autoscaler exists
cluster-autoscaler pod is running
Error occurred while checking for the cluster autoscaler - Error: list index out of range
Pre flight unsuccessful because of the following errors: ['To upgrade please run the code with --force flag ', 'Error occurred while checking for the cluster autoscaler list index out of range']
Pre-flight check for cluster drmaciej-cluster targeting version: 1.26 failed!

It appears that the exception is thrown in

                version = (
                    i.spec.template.spec.containers[0]
                    .image.split("k8s.gcr.io/autoscaling/cluster-autoscaler:v")[1]
                    .split("-")[0]
                )

because my image is set to registry.k8s.io/autoscaling/cluster-autoscaler:v1.25.0.

k8s.gcr.io is about to be sunset and new images are not published there. For instance, the latest publish CA images are on the new registry already (see https://github.com/kubernetes/autoscaler/releases)

Code snippet

NA

Possible Solution

No response

Steps to Reproduce

Detailed in "Current Behaviour"

Amazon EKS upgrade version

1.25 to 1.26

Python runtime version

3.9

Packaging format used

PyPi

Debugging logs

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions