Skip to content

Commit

Permalink
Merge pull request kubernetes#18198 from brendandburns/aws2
Browse files Browse the repository at this point in the history
Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Dec 11, 2015
2 parents 6b8eb90 + 9c0897e commit eb2fc23
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion cluster/saltbase/salt/kube-node-unpacker/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,29 @@
- group: root
- mode: 755

{% if grains.cloud is defined and grains.cloud == 'gce' %}
node-docker-image-tags:
file.touch:
- name: /srv/pillar/docker-images.sls
{% else %}
kube-proxy-tar:
file.managed:
- name: /srv/salt/kube-bins/kube-proxy.tar
- source: salt://kube-bins/kube-proxy.tar
- makedirs: True
- user: root
- group: root
- mode: 755
{% endif %}

{% if pillar.get('is_systemd') %}
{% set is_helium = '0' %}
# Super annoying, the salt version on GCE is old enough that 'salt.cmd.run'
# isn't supported
{% if grains.cloud is defined and grains.cloud == 'aws' %}
{% set is_helium = salt.cmd.run('salt --version | grep -c Helium') %}
{% endif %}
# Salt Helium doesn't support systemd modules for service running
{% if pillar.get('is_systemd') and is_helium == '0' %}

{{ pillar.get('systemd_system_path') }}/kube-node-unpacker.service:
file.managed:
Expand All @@ -20,7 +38,11 @@ node-docker-image-tags:
cmd.wait:
- name: /opt/kubernetes/helpers/services bounce kube-node-unpacker
- watch:
{% if grains.cloud is defined and grains.cloud == 'gce' %}
- file: node-docker-image-tags
{% else %}
- file: kube-proxy-tar
{% endif %}
- file: /etc/kubernetes/kube-node-unpacker.sh
- file: {{ pillar.get('systemd_system_path') }}/kube-node-unpacker.service

Expand All @@ -38,7 +60,11 @@ kube-node-unpacker:
- enable: True
- restart: True
- watch:
{% if grains.cloud is defined and grains.cloud == 'gce' %}
- file: node-docker-image-tags
{% else %}
- file: kube-proxy-tar
{% endif %}
- file: /etc/kubernetes/kube-node-unpacker.sh

{% endif %}

0 comments on commit eb2fc23

Please sign in to comment.