helm / acceptance-testing

Acceptance test suite for the Helm client
Apache License 2.0
24 stars 24 forks source link

Replace kubectl with Kubernetes Python client #3

Open jdolitsky opened 5 years ago

jdolitsky commented 5 years ago

Instead of shelling out to kubectl, should just import and use the Python library: https://github.com/kubernetes-client/python

akashshinde commented 4 years ago

/assign

marckhouzam commented 4 years ago

I wonder if such a change would actually cause the code to be harder to maintain? With the use of our Sh.py package, it is often straightforward to use kubectl. Such as:

Should pass  kubectl get nodes
Sh.Run  kubectl get pods --namespace=default

@jdolitsky do you still see this issue as a valuable improvement?

jdolitsky commented 4 years ago

@marckhouzam I think for commands which require counting number of results etc. this would simply alot

For example this function: https://github.com/helm/acceptance-testing/blob/master/lib/Kubectl.py#L17

marckhouzam commented 4 years ago

Agreed