Allow to provide custom kubectl config
Allows to connect to any cluster, not just local one.
Change-Id: I75f17ac26a72d7f9ef555e53d3bbe6a08beec15d
diff --git a/_states/helm_release.py b/_states/helm_release.py
index e60c6dc..464e6d6 100644
--- a/_states/helm_release.py
+++ b/_states/helm_release.py
@@ -13,10 +13,12 @@
def present(name, chart_name, namespace, version=None, values=None,
- tiller_namespace='kube-system', tiller_host=None):
+ tiller_namespace='kube-system', tiller_host=None,
+ kube_config=None):
tiller_args = {
'tiller_namespace': tiller_namespace,
'tiller_host': tiller_host,
+ 'kube_config': kube_config,
}
exists = __salt__['helm.release_exists'](name, namespace, **tiller_args)
if not exists:
@@ -58,10 +60,12 @@
}
-def absent(name, namespace, tiller_namespace='kube-system', tiller_host=None):
+def absent(name, namespace, tiller_namespace='kube-system', tiller_host=None,
+ kube_config=None):
tiller_args = {
'tiller_namespace': tiller_namespace,
'tiller_host': tiller_host,
+ 'kube_config': kube_config,
}
exists = __salt__['helm.release_exists'](name, namespace, **tiller_args)
if not exists: