maclof / kubernetes-client

A simple yet elegant client for accessing and controlling a Kubernetes cluster (https://github.com/kubernetes/kubernetes)
MIT License
232 stars 82 forks source link

Fix Issue 81, some method call sites #96

Closed michaelbutler closed 2 years ago

michaelbutler commented 2 years ago

This should fix Issue 81, but please don't merge yet. I'd like to test it more.

https://github.com/maclof/kubernetes-client/issues/81

Interestingly due to use of empty(), a non-existent variable was ignored so if watch => true was passed into $requestOptions it would have never been checked.

I also update some method calls to sendRequest which seemed to be the intention, but I'm not sure. Before, it was passing $options into the $query parameter, but I'm guessing it should have been passed as $requestOptions.

maclof commented 2 years ago

/apis appears to be correct as per https://kubernetes.io/docs/reference/using-api/#api-groups

michaelbutler commented 2 years ago

@maclof alright this should be ready to go, i manually tested the stuff. so as not to affect any downstream consumers I left logs, exec as is, just renamed the variables more clearly.