From 60842c155ce4ec6ddec4a6f86cf31d189602e8ef Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Wed, 7 Sep 2016 13:46:49 -0700 Subject: [PATCH] examples/ignition: Set reboot strategy to etcd-lock * locksmithd should use etcd to lock for reboots * The default best-effort strategy uses the reboot strategy if etcd isn't running for some reason --- examples/ignition/bootkube-controller.yaml | 6 ++++++ examples/ignition/bootkube-worker.yaml | 6 ++++++ examples/ignition/etcd-proxy.yaml | 6 ++++++ examples/ignition/etcd.yaml | 6 ++++++ examples/ignition/etcd3-proxy.yaml | 6 ++++++ examples/ignition/etcd3.yaml | 6 ++++++ examples/ignition/k8s-controller.yaml | 6 ++++++ examples/ignition/k8s-worker.yaml | 6 ++++++ examples/ignition/rktnetes-controller.yaml | 6 ++++++ examples/ignition/rktnetes-worker.yaml | 6 ++++++ 10 files changed, 60 insertions(+) diff --git a/examples/ignition/bootkube-controller.yaml b/examples/ignition/bootkube-controller.yaml index 0bbe8a27..32c7fa43 100644 --- a/examples/ignition/bootkube-controller.yaml +++ b/examples/ignition/bootkube-controller.yaml @@ -29,6 +29,12 @@ systemd: [Unit] Requires=flanneld.service After=flanneld.service + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" - name: kubelet.path enable: true contents: | diff --git a/examples/ignition/bootkube-worker.yaml b/examples/ignition/bootkube-worker.yaml index 920f97fe..30e4c80a 100644 --- a/examples/ignition/bootkube-worker.yaml +++ b/examples/ignition/bootkube-worker.yaml @@ -20,6 +20,12 @@ systemd: [Unit] Requires=flanneld.service After=flanneld.service + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" - name: kubelet.path enable: true contents: | diff --git a/examples/ignition/etcd-proxy.yaml b/examples/ignition/etcd-proxy.yaml index 29fbc3cc..7d7e06a8 100644 --- a/examples/ignition/etcd-proxy.yaml +++ b/examples/ignition/etcd-proxy.yaml @@ -10,6 +10,12 @@ systemd: Environment="ETCD_PROXY=on" Environment="ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379" Environment="ETCD_INITIAL_CLUSTER={{.etcd_initial_cluster}}" + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" {{ if index . "ssh_authorized_keys" }} passwd: diff --git a/examples/ignition/etcd.yaml b/examples/ignition/etcd.yaml index d99c4b40..f8645db7 100644 --- a/examples/ignition/etcd.yaml +++ b/examples/ignition/etcd.yaml @@ -14,6 +14,12 @@ systemd: Environment="ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380" Environment="ETCD_INITIAL_CLUSTER={{.etcd_initial_cluster}}" Environment="ETCD_STRICT_RECONFIG_CHECK=true" + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" {{ if index . "ssh_authorized_keys" }} passwd: diff --git a/examples/ignition/etcd3-proxy.yaml b/examples/ignition/etcd3-proxy.yaml index 364ddc24..b52fe068 100644 --- a/examples/ignition/etcd3-proxy.yaml +++ b/examples/ignition/etcd3-proxy.yaml @@ -27,6 +27,12 @@ systemd: TimeoutStartSec=0 [Install] WantedBy=multi-user.target + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" {{ if index . "ssh_authorized_keys" }} passwd: diff --git a/examples/ignition/etcd3.yaml b/examples/ignition/etcd3.yaml index 046ab96f..1e28040f 100644 --- a/examples/ignition/etcd3.yaml +++ b/examples/ignition/etcd3.yaml @@ -31,6 +31,12 @@ systemd: TimeoutStartSec=0 [Install] WantedBy=multi-user.target + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" {{ if index . "ssh_authorized_keys" }} passwd: diff --git a/examples/ignition/k8s-controller.yaml b/examples/ignition/k8s-controller.yaml index e6815664..d5c95831 100644 --- a/examples/ignition/k8s-controller.yaml +++ b/examples/ignition/k8s-controller.yaml @@ -30,6 +30,12 @@ systemd: After=flanneld.service [Service] EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" - name: k8s-certs@.service contents: | [Unit] diff --git a/examples/ignition/k8s-worker.yaml b/examples/ignition/k8s-worker.yaml index 4b64082d..bacaa997 100644 --- a/examples/ignition/k8s-worker.yaml +++ b/examples/ignition/k8s-worker.yaml @@ -25,6 +25,12 @@ systemd: After=flanneld.service [Service] EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" - name: k8s-certs@.service contents: | [Unit] diff --git a/examples/ignition/rktnetes-controller.yaml b/examples/ignition/rktnetes-controller.yaml index b7136d05..1fbb8b47 100644 --- a/examples/ignition/rktnetes-controller.yaml +++ b/examples/ignition/rktnetes-controller.yaml @@ -30,6 +30,12 @@ systemd: After=flanneld.service [Service] EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" - name: k8s-certs@.service contents: | [Unit] diff --git a/examples/ignition/rktnetes-worker.yaml b/examples/ignition/rktnetes-worker.yaml index d7f77a41..e24dfece 100644 --- a/examples/ignition/rktnetes-worker.yaml +++ b/examples/ignition/rktnetes-worker.yaml @@ -25,6 +25,12 @@ systemd: After=flanneld.service [Service] EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env + - name: locksmithd.service + dropins: + - name: 40-etcd-lock.conf + contents: | + [Service] + Environment="REBOOT_STRATEGY=etcd-lock" - name: k8s-certs@.service contents: | [Unit]