kubernetes-sigs/e2e-framework

Ambiguous call to `cfg.Client()` in `CreateClusterWithConfig`

maximilianbraun opened this issue · 4 comments

What happened?

For context: I'm implementing a custom provider and I was plying around with CreateClusterWithConfig and CreateCluster. I noticed panic with CreateClusterWithConfig resulting from the call to cfg.Client() 1 which expects a kubeconfig to be in the config before being set. There is no call to cfg.Client() before cg.WithKubeConfigFile() in CreateCluster.

What did you expect to happen?

The call before initialization looks like a sideeffect. Not sure if it is wanted.

How can we reproduce it (as minimally and precisely as possible)?


Anything elese we need to know?

No response

E2E Provider Used

kind

e2e-framework Version

0.3.0

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

@maximilianbraun this indeed looks like a bug since cfg.Client() function expects cfg.kubeconfig to be set before calling. Also the cfg.Client().RESTConfig() returns a restconfig which is not used anywhere in that function. Happy to raise a PR to fix it

/assign

@harshanarayana: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.