Switch hyperkube source to binary instead of docker image.
Since docker going to be removed from k8s formula,
hyperkube should be downloaded as raw binary.
Related story: PROD-23498
Change-Id: I41929df3a43aa8e929e370a2a92c79a00f2572e8
diff --git a/kubernetes/_common.sls b/kubernetes/_common.sls
index 9abdaa3..6827f11 100644
--- a/kubernetes/_common.sls
+++ b/kubernetes/_common.sls
@@ -5,29 +5,15 @@
- names: {{ common.pkgs }}
{%- if common.hyperkube is defined %}
-/tmp/hyperkube:
- file.directory:
- - user: root
- - group: root
-
-hyperkube-copy:
- cmd.run:
- - name: docker run --rm -v /tmp/hyperkube:/tmp/hyperkube --entrypoint cp {{ common.hyperkube.image }} -vr /hyperkube /tmp/hyperkube
- - require:
- - file: /tmp/hyperkube
- {%- if grains.get('noservices') %}
- - onlyif: /bin/false
- {%- endif %}
/usr/bin/hyperkube:
file.managed:
- - source: /tmp/hyperkube/hyperkube
+ - source: {{ common.hyperkube.source }}
- mode: 751
- makedirs: true
- user: root
- group: root
- - require:
- - cmd: hyperkube-copy
+ - source_hash: {{ common.hyperkube.source_hash }}
{%- if grains.get('noservices') %}
- onlyif: /bin/false
{%- endif %}
diff --git a/tests/pillar/master_cluster.sls b/tests/pillar/master_cluster.sls
index a61ce7e..b7b21d3 100644
--- a/tests/pillar/master_cluster.sls
+++ b/tests/pillar/master_cluster.sls
@@ -4,7 +4,8 @@
cluster_name: cluster
hyperkube:
image: hyperkube-amd64:v1.6.4-3
- hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
+ source: hyperkube-amd64:v1.6.4-3
+ source_hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
addons:
dns:
domain: cluster.local
diff --git a/tests/pillar/master_contrail.sls b/tests/pillar/master_contrail.sls
index ced09cb..2b0da6c 100644
--- a/tests/pillar/master_contrail.sls
+++ b/tests/pillar/master_contrail.sls
@@ -4,7 +4,8 @@
cluster_name: cluster
hyperkube:
image: hyperkube-amd64:v1.6.4-3
- hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
+ source: hyperkube-amd64:v1.6.4-3
+ source_hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
addons:
dns:
domain: cluster.local
diff --git a/tests/pillar/master_contrail4_0.sls b/tests/pillar/master_contrail4_0.sls
index 3c5997d..ce6e5ed 100644
--- a/tests/pillar/master_contrail4_0.sls
+++ b/tests/pillar/master_contrail4_0.sls
@@ -4,7 +4,8 @@
cluster_name: cluster
hyperkube:
image: hyperkube-amd64:v1.6.4-3
- hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
+ source: hyperkube-amd64:v1.6.4-3
+ source_hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
addons:
dns:
domain: cluster.local
diff --git a/tests/pillar/pool_cluster.sls b/tests/pillar/pool_cluster.sls
index 5f34de4..3a0eded 100644
--- a/tests/pillar/pool_cluster.sls
+++ b/tests/pillar/pool_cluster.sls
@@ -4,7 +4,8 @@
cluster_name: cluster
hyperkube:
image: hyperkube-amd64:v1.6.4-3
- hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
+ source: hyperkube-amd64:v1.6.4-3
+ source_hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
addons:
dns:
domain: cluster.local
diff --git a/tests/pillar/pool_cluster_with_domain.sls b/tests/pillar/pool_cluster_with_domain.sls
index 4bfc733..018aec3 100644
--- a/tests/pillar/pool_cluster_with_domain.sls
+++ b/tests/pillar/pool_cluster_with_domain.sls
@@ -4,7 +4,8 @@
cluster_name: cluster
hyperkube:
image: hyperkube-amd64:v1.6.4-3
- hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
+ source: hyperkube-amd64:v1.6.4-3
+ source_hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
addons:
dns:
domain: cluster.local
diff --git a/tests/pillar/pool_contrail4_0.sls b/tests/pillar/pool_contrail4_0.sls
index cdb6c6f..c01a85c 100644
--- a/tests/pillar/pool_contrail4_0.sls
+++ b/tests/pillar/pool_contrail4_0.sls
@@ -4,7 +4,8 @@
cluster_name: cluster
hyperkube:
image: hyperkube-amd64:v1.6.4-3
- hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
+ source: hyperkube-amd64:v1.6.4-3
+ source_hash: hnsj0XqABgrSww7Nqo7UVTSZLJUt2XRd
addons:
dns:
domain: cluster.local