From c132915dcc3289342bd272aca774947db1158c41 Mon Sep 17 00:00:00 2001 From: Nishant kumar Date: Fri, 25 Jan 2019 16:18:20 +0000 Subject: [PATCH] Enable Armada to acquire Tiller IP from config file This adds a new configuration default to specify the Tiller host IP. This is important to be able to configure in environments where Armada is unable to find a Tiller pod. Change-Id: I12fd9fbd16f2b591620e566affcf19f859ed1855 --- armada/conf/default.py | 4 ++++ armada/handlers/tiller.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/armada/conf/default.py b/armada/conf/default.py index 6418bb3b..ca4967e3 100644 --- a/armada/conf/default.py +++ b/armada/conf/default.py @@ -69,6 +69,10 @@ path to the private key that includes the name of the key itself.""")), 'tiller_namespace', default='kube-system', help=utils.fmt('Namespace for the Tiller pod.')), + cfg.StrOpt( + 'tiller_host', + default=None, + help=utils.fmt('IP/hostname of the Tiller pod.')), cfg.IntOpt( 'tiller_port', default=44134, diff --git a/armada/handlers/tiller.py b/armada/handlers/tiller.py index aaa16b93..ef40fcd0 100644 --- a/armada/handlers/tiller.py +++ b/armada/handlers/tiller.py @@ -82,7 +82,7 @@ class Tiller(object): tiller_namespace=None, bearer_token=None, dry_run=None): - self.tiller_host = tiller_host + self.tiller_host = tiller_host or CONF.tiller_host self.tiller_port = tiller_port or CONF.tiller_port self.tiller_namespace = tiller_namespace or CONF.tiller_namespace self.bearer_token = bearer_token