Merge "Add support of Helm client."
diff --git a/kubernetes/_common.sls b/kubernetes/_common.sls
index 7e2e1b8..3d59fbf 100644
--- a/kubernetes/_common.sls
+++ b/kubernetes/_common.sls
@@ -319,3 +319,28 @@
- archive_format: tar
- overwrite: true
{%- endif %}
+
+{%- if common.addons.get('helm', {'enabled': False}).enabled %}
+extract_helm:
+ archive.extracted:
+ - name: /tmp/helm
+ - source: {{ common.addons.helm.client.source }}
+ - source_hash: {{ common.addons.helm.client.hash }}
+ {%- if grains['saltversioninfo'] < [2017, 7] %}
+ - tar_options: xzf
+ {%- else %}
+ - options: xzf
+ {%- endif %}
+ - archive_format: tar
+ - keep: true
+
+/usr/local/bin/helm:
+ file.managed:
+ - source: /tmp/helm/linux-amd64/helm
+ - mode: 755
+ - owner: root
+ - group: root
+ - require:
+ - archive: extract_helm
+
+{%- endif %}
diff --git a/tests/pillar/master_cluster.sls b/tests/pillar/master_cluster.sls
index 6a6a85c..197ab52 100644
--- a/tests/pillar/master_cluster.sls
+++ b/tests/pillar/master_cluster.sls
@@ -23,6 +23,9 @@
helm:
enabled: true
tiller_image: gcr.io/kubernetes-helm/tiller:v2.2.3
+ client:
+ source: https://storage.googleapis.com/kubernetes-helm/helm-v2.12.3-linux-amd64.tar.gz
+ hash: sha256=3425a1b37954dabdf2ba37d5d8a0bd24a225bb8454a06f12b115c55907809107
netchecker:
enabled: true
namespace: netchecker
diff --git a/tests/pillar/master_contrail4_0.sls b/tests/pillar/master_contrail4_0.sls
index ce6e5ed..2d4c1c9 100644
--- a/tests/pillar/master_contrail4_0.sls
+++ b/tests/pillar/master_contrail4_0.sls
@@ -23,6 +23,9 @@
helm:
enabled: true
tiller_image: gcr.io/kubernetes-helm/tiller:v2.2.3
+ client:
+ source: https://storage.googleapis.com/kubernetes-helm/helm-v2.12.3-linux-amd64.tar.gz
+ hash: sha256=3425a1b37954dabdf2ba37d5d8a0bd24a225bb8454a06f12b115c55907809107
netchecker:
enabled: true
namespace: netchecker