Skip to content

ClusterLoader2 run-e2e.sh script does not work if kube context is set to a namespace other than default #3102

Open
@Jont828

Description

@Jont828

What happened: The kubectl commands in ClusterLoader2 do not explicitly specify a namespace and will inherit the namespace if set by the kube context. However, this secret is hard coded to be created in the default namespace, and if we are using a different on in the kube context, it will look for the clutser-loader secret in the wrong namespace. This wasn't an issue in existing CI tests b/c they already use the default namespace automatically when looking at the kube context:

CURRENT   NAME                                           CLUSTER                                        AUTHINFO                                       NAMESPACE
*         k8s-infra-e2e-boskos-scale-29_e2e-3101-62db2   k8s-infra-e2e-boskos-scale-29_e2e-3101-62db2   k8s-infra-e2e-boskos-scale-29_e2e-3101-62db2  

For my use case, I was trying to build a cluster with Azure, and I ran into an issue saying that error: failed to create serviceaccount: namespaces "test-pods" not found in these logs. However, that namespace isn't being passed anywhere to clusterloader2 and it seems to be implicitly picking it up.

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions