att-comdev / armada

This project has moved to OpenStack.
https://www.airshipit.org/
Apache License 2.0
78 stars 35 forks source link

feat: Ability to access tiller in another k8s cluster #192

Open robertchoi80 opened 6 years ago

robertchoi80 commented 6 years ago

Is this a bug report or feature request? (choose one): feature

Python Version (output of python --version): python3.6

Development or Deployment Environment?: Both

Release Tag or Master: Master

In current implementation, when armada cli is running inside k8s cluster, it looks for incluster-config first and if it fails, then it tries to load kube config. In our use case, that's not right behavior because the cli need to connect to tiller in another k8s cluster. We have a k8s cluster on which armada client pod is running, and we create a new VM that has a new k8s cluster in it. Every time the VM is created, the armada cli needs to connect to tiller in the new k8s cluster. (That tiller is created by "helm init" command.)

Having said that, there are two things that need to be done. Of course, these two things are closely related each other.

  1. Load right config It should be able to load kube config even though it's running inside a k8s cluster. For example, we can make load_kube_config() have higher priority than load_incluster_config().

  2. Port Forwarding feature to access Tiller With current implementation, we must specify tiller host and port and that requires the tiller service is exposed as some way like NodePort. That's not always possible. By adding port forwarding feature for tiller service (just like Helm does), this can be solved.