Skip to content

Commit

Permalink
Make master-addon service depend on both docker and kubelet service
Browse files Browse the repository at this point in the history
in salt.
  • Loading branch information
dchen1107 committed Jun 23, 2015
1 parent 23200d3 commit 8d76d4e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cluster/saltbase/salt/kube-master-addons/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@ master-docker-image-tags:
file.touch:
- name: /srv/pillar/docker-images.sls

# Current containervm image by default has both docker and kubelet
# running. But during cluster creation stage, docker and kubelet
# could be overwritten completely, or restarted due flag changes.
# The ordering of salt states for service docker, kubelet and
# master-addon below is very important to avoid the race between
# salt restart docker or kubelet and kubelet start master components.
kube-master-addons:
service.running:
- enable: True
- restart: True
- require:
- service: docker
- service: kubelet
- watch:
- file: master-docker-image-tags
- file: /etc/kubernetes/kube-master-addons.sh

0 comments on commit 8d76d4e

Please sign in to comment.