Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

EM: Add restart on-failure for metadata service #1362

Merged
merged 4 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down Expand Up @@ -97,6 +99,8 @@ systemd:
[Unit]
Description=Waiting to delete Kubernetes node on shutdown
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down Expand Up @@ -82,6 +84,8 @@ systemd:
[Unit]
Description=Waiting to delete Kubernetes node on shutdown
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down Expand Up @@ -76,6 +78,8 @@ systemd:
[Unit]
Description=Waiting to delete Kubernetes node on shutdown
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down Expand Up @@ -85,6 +87,8 @@ systemd:
[Unit]
Description=Waiting to delete Kubernetes node on shutdown
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
Expand Down
4 changes: 4 additions & 0 deletions assets/terraform-modules/node/templates/node.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'
Expand Down Expand Up @@ -90,6 +92,8 @@ systemd:
[Unit]
Description=Waiting to delete Kubernetes node on shutdown
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service etcd-member.service bootkube.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done; /opt/wait-for-dns ${dns_zone} ${cluster_name}-private 3600'
Expand Down Expand Up @@ -76,9 +78,11 @@ systemd:
enable: true
contents: |
[Unit]
Description=Flatcar Metadata Agent
Description=Flatcar Container Linux Metadata Agent
[Service]
Type=oneshot
Restart=on-failure
RestartSec=10s
Environment=COREOS_METADATA_OPT_PROVIDER=--cmdline
ExecStart=/usr/bin/coreos-metadata $${COREOS_METADATA_OPT_PROVIDER} --attributes=/run/metadata/flatcar
[Install]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ systemd:
Wants=systemd-resolved.service
Before=kubelet.service
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done; /opt/wait-for-dns ${dns_zone} ${cluster_name}-private 3600'
Expand All @@ -41,6 +43,8 @@ systemd:
Description=Flatcar Container Linux Metadata Agent
[Service]
Type=oneshot
Restart=on-failure
RestartSec=10s
Environment=COREOS_METADATA_OPT_PROVIDER=--cmdline
ExecStart=/usr/bin/coreos-metadata $${COREOS_METADATA_OPT_PROVIDER} --attributes=/run/metadata/flatcar
[Install]
Expand Down Expand Up @@ -125,6 +129,8 @@ systemd:
[Unit]
Description=Waiting to delete Kubernetes node on shutdown
[Service]
Restart=on-failure
RestartSec=5s
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
Expand Down
60 changes: 30 additions & 30 deletions pkg/assets/generated_assets.go

Large diffs are not rendered by default.