helm: add support for the K8S_ envvars (#319)

Add support for:

- K8S_AUTH_HOST
- K8S_AUTH_API_KEY
- K8S_AUTH_VERIFY_SSL
- K8S_AUTH_SSL_CA_CERT

This commit also refactor the way we pass K8S related configuration to `helm`:

All the calls are now done in a new module_utils module (`helm.py`).
The handling of the `kube_*` variables has also been moved in this new
module.

We need https://github.com/helm/helm/pull/8622 to be able to ignore the
certificate validation. As a workaround, the generate a temporary
kubeconfig configuration file.

Closes: #279
This commit is contained in:
Gonéri Le Bouder
2020-12-11 11:41:08 -05:00
committed by GitHub
parent 5d3e465672
commit 221631c06a
13 changed files with 340 additions and 126 deletions

1
test-requirements.txt Normal file
View File

@@ -0,0 +1 @@
kubernetes-validate