mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
kube-master-installation: reboot on failure.
Also some minor reliability tweaks.
This commit is contained in:
parent
0d0d1889ed
commit
05bcc72dc2
@ -37,6 +37,7 @@ write_files:
|
|||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Download and install k8s binaries and configurations
|
Description=Download and install k8s binaries and configurations
|
||||||
|
Requires=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@ -45,7 +46,7 @@ write_files:
|
|||||||
ExecStartPre=/bin/mkdir -p /home/kubernetes/bin
|
ExecStartPre=/bin/mkdir -p /home/kubernetes/bin
|
||||||
ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin
|
ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin
|
||||||
ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin
|
ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin
|
||||||
ExecStartPre=/usr/bin/curl --fail --retry 5 --retry-delay 3 --retry-connrefused --silent --show-error -H "X-Google-Metadata-Request: True" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
ExecStartPre=/usr/bin/curl --fail --retry 600 --retry-delay 3 --retry-connrefused --silent --show-error -H "X-Google-Metadata-Request: True" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh
|
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh
|
||||||
ExecStart=/home/kubernetes/bin/configure.sh
|
ExecStart=/home/kubernetes/bin/configure.sh
|
||||||
|
|
||||||
@ -58,12 +59,13 @@ write_files:
|
|||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Configure kube internal route
|
Description=Configure kube internal route
|
||||||
|
Requires=kube-master-installation.service
|
||||||
After=kube-master-installation.service
|
After=kube-master-installation.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStartPre=/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error -H "X-Google-Metadata-Request: True" -o /home/kubernetes/bin/kube-master-internal-route.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-master-internal-route
|
ExecStartPre=/usr/bin/curl --fail --retry 5 --retry-delay 3 --retry-connrefused --silent --show-error -H "X-Google-Metadata-Request: True" -o /home/kubernetes/bin/kube-master-internal-route.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-master-internal-route
|
||||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/kube-master-internal-route.sh
|
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/kube-master-internal-route.sh
|
||||||
ExecStart=/home/kubernetes/bin/kube-master-internal-route.sh
|
ExecStart=/home/kubernetes/bin/kube-master-internal-route.sh
|
||||||
|
|
||||||
@ -76,6 +78,7 @@ write_files:
|
|||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Configure kubernetes master
|
Description=Configure kubernetes master
|
||||||
|
Requires=kube-master-installation.service
|
||||||
After=kube-master-installation.service
|
After=kube-master-installation.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@ -100,7 +103,6 @@ write_files:
|
|||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
RemainAfterExit=yes
|
|
||||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
||||||
ExecStart=/home/kubernetes/bin/health-monitor.sh container-runtime
|
ExecStart=/home/kubernetes/bin/health-monitor.sh container-runtime
|
||||||
|
|
||||||
@ -119,7 +121,6 @@ write_files:
|
|||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
RemainAfterExit=yes
|
|
||||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
||||||
ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet
|
ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user