Skip to content

CluserLoader2 run-e2e.sh connects to unexpected clusters when more than single cluster is available in the KUBECONFIG #3625

@jprzychodzen

Description

@jprzychodzen

What happened:
Running CL2 locally with run-e2e.sh script can unexpecdantly fail, trying to connect to another API.

How to reproduce it (as minimally and precisely as possible):
Add multiple clusters to KUBECONFIG file, ensure that test cluster is not first in KUBECONFIG.

Use run-e2e.sh wrapper to run CL2.

Anything else we need to know?:
server=$(kubectl --kubeconfig "${KUBECONFIG}" config view -o jsonpath='{.clusters[0].cluster.server}') points to first cluster from the KUBEOCNFIG file.

If there are multiple entries we can select connection information from mismatching entry, effectively breaking connectivity in local dev enviroment. This is not visible in K8s CI tests, as those jobs are short lived and always have single entry in KUBECONFIG file.

Workaround:
For scale testing with CL2, create KUBEOCNFIG file with single entry pointing to a test cluster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions