Commit 35ab4ccc authored by derekwaynecarr's avatar derekwaynecarr

Further vagrant reliability improvements.

parent b583d4ed
...@@ -5,6 +5,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes ...@@ -5,6 +5,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service] [Service]
EnvironmentFile=/etc/sysconfig/kube-apiserver EnvironmentFile=/etc/sysconfig/kube-apiserver
ExecStart=/usr/local/bin/kube-apiserver "$DAEMON_ARGS" ExecStart=/usr/local/bin/kube-apiserver "$DAEMON_ARGS"
Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
...@@ -3,9 +3,9 @@ Description=Kubernetes Controller Manager ...@@ -3,9 +3,9 @@ Description=Kubernetes Controller Manager
Documentation=https://github.com/GoogleCloudPlatform/kubernetes Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service] [Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/kube-controller-manager EnvironmentFile=-/etc/sysconfig/kube-controller-manager
ExecStart=/usr/local/bin/kube-controller-manager "$DAEMON_ARGS" ExecStart=/usr/local/bin/kube-controller-manager "$DAEMON_ARGS"
Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
...@@ -5,6 +5,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes ...@@ -5,6 +5,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service] [Service]
EnvironmentFile=/etc/sysconfig/kube-proxy EnvironmentFile=/etc/sysconfig/kube-proxy
ExecStart=/usr/local/bin/kube-proxy "$DAEMON_ARGS" ExecStart=/usr/local/bin/kube-proxy "$DAEMON_ARGS"
Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
...@@ -6,6 +6,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes ...@@ -6,6 +6,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Type=simple Type=simple
EnvironmentFile=-/etc/sysconfig/kube-scheduler EnvironmentFile=-/etc/sysconfig/kube-scheduler
ExecStart=/usr/local/bin/kube-scheduler "$DAEMON_ARGS" ExecStart=/usr/local/bin/kube-scheduler "$DAEMON_ARGS"
Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
[Unit] [Unit]
Description=Kubernetes Kubelet Server Description=Kubernetes Kubelet Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=docker.service
Requires=docker.service
[Service] [Service]
EnvironmentFile=/etc/sysconfig/kubelet EnvironmentFile=/etc/sysconfig/kubelet
ExecStart=/usr/local/bin/kubelet "$DAEMON_ARGS" ExecStart=/usr/local/bin/kubelet "$DAEMON_ARGS"
Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
\ No newline at end of file
{% if grains.network_mode is defined and grains.network_mode == 'openvswitch' %} {% if grains.network_mode is defined and grains.network_mode == 'openvswitch' %}
sdn: sdn:
cmd.wait: cmd.script:
- name: /kubernetes-vagrant/network_closure.sh - source: /kubernetes-vagrant/network_closure.sh
- watch: - require:
- sls: docker - pkg: docker-io
- cwd: /
- user: root
- group: root
- shell: /bin/bash
{% endif %} {% endif %}
...@@ -31,8 +31,8 @@ cat <<EOF > ${POST_NETWORK_SCRIPT} ...@@ -31,8 +31,8 @@ cat <<EOF > ${POST_NETWORK_SCRIPT}
set -e set -e
# Only do this operation once, otherwise, we get docker.service files output on disk, and the command line arguments get applied multiple times # Only do this operation if the bridge is not defined
grep -q kbr0 /etc/sysconfig/docker || { ifconfig | grep -q kbr0 || {
CONTAINER_SUBNETS=(${MASTER_CONTAINER_SUBNET} ${MINION_CONTAINER_SUBNETS[@]}) CONTAINER_SUBNETS=(${MASTER_CONTAINER_SUBNET} ${MINION_CONTAINER_SUBNETS[@]})
CONTAINER_IPS=(${MASTER_IP} ${MINION_IPS[@]}) CONTAINER_IPS=(${MASTER_IP} ${MINION_IPS[@]})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment