StackStorm-Exchange / stackstorm-kubernetes

st2 content pack containing Kubernetes sensors
https://exchange.stackstorm.org/
Apache License 2.0
19 stars 17 forks source link

Avoid empty strings in config files to be used as valid ones #28

Closed aletundo closed 6 years ago

aletundo commented 6 years ago

Hello!

I spent hours dealing with an HTTP 403 error since I filled the cert and key path and I left the user field as an empty string. At line 36 of the actions/lib/k8s.py file the if condition is verified and it tries to use the basic auth rather than set self.clientcert to 1.

The README states: _Only user and password or client_certpath (key is optional) need to be set for this to work. IMHO, it's confusing.

I suggest to update the README or to make the if conditions more conservatives. I can provide a PR if you want :)

LindsayHill commented 6 years ago

@aletundo by all means, please submit a PR. Happy to take PRs and improve things

aletundo commented 6 years ago

@LindsayHill For sure! I just forked the repository. I will provide a PR in a couple of days.