In the context of parallelizing my tests more in the future, I'd like the ability for kubetest to work on different remote Kubernetes clusters during the same pytest run.
At the moment, the kube fixture relies on the global kubeconfig discovered by the kubernetes client module, as in:
client.CoreV1Api().list_node()
What I would like is the ability to instantiate a api_client somewhere and pass that down to the kube fixture somehow, so that it would for instance use this to list nodes:
client.CoreV1Api(api_client=self.api_client).list_node()
That definitely requires more thinking about how to instantiate many clients and keep them available for fixtures.
Right now I have a parent fixture that generates different kubernetes clients and use that in a child fixture for the rest of my tests. If I could pass the kubeconfig path to the kubetest client then I could return that and use a different fixture name later instead of the default kube. Or perhaps there's a better way to accomplish that and keep the standardized kube name.
In the context of parallelizing my tests more in the future, I'd like the ability for kubetest to work on different remote Kubernetes clusters during the same pytest run.
At the moment, the
kubefixture relies on the global kubeconfig discovered by the kubernetes client module, as in:What I would like is the ability to instantiate a
api_clientsomewhere and pass that down to the kube fixture somehow, so that it would for instance use this to list nodes:That definitely requires more thinking about how to instantiate many clients and keep them available for fixtures.
Right now I have a parent fixture that generates different kubernetes clients and use that in a child fixture for the rest of my tests. If I could pass the kubeconfig path to the kubetest client then I could return that and use a different fixture name later instead of the default
kube. Or perhaps there's a better way to accomplish that and keep the standardizedkubename.