Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
health-monitor script doesn’t require docker (#4028)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Oct 17, 2018
1 parent 76b06ad commit 5e50930
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 111 deletions.
74 changes: 37 additions & 37 deletions parts/k8s/kubernetesagentcustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,43 @@ write_files:
content: !!binary |
{{WrapAsVariable "provisionConfigs"}}

- path: "/usr/local/bin/health-monitor.sh"
permissions: "0544"
encoding: gzip
owner: "root"
content: !!binary |
{{WrapAsVariable "healthMonitorScript"}}

- path: "/etc/systemd/system/kubelet-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks kubelet health and restarts if needed
After=kubelet.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh kubelet
[Install]
WantedBy=multi-user.target
- path: "/etc/systemd/system/docker-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks docker health and restarts if needed
After=docker.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh container-runtime
[Install]
WantedBy=multi-user.target
{{if .KubernetesConfig.RequiresDocker}}
{{if not .IsCoreOS}}
- path: "/etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf"
Expand Down Expand Up @@ -72,43 +109,6 @@ write_files:
}
}{{end}}{{end}}
}
- path: "/usr/local/bin/health-monitor.sh"
permissions: "0544"
encoding: gzip
owner: "root"
content: !!binary |
{{WrapAsVariable "healthMonitorScript"}}

- path: "/etc/systemd/system/docker-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks docker health and restarts if needed
After=docker.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh container-runtime
[Install]
WantedBy=multi-user.target
- path: "/etc/systemd/system/kubelet-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks kubelet health and restarts if needed
After=kubelet.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh kubelet
[Install]
WantedBy=multi-user.target
{{end}}

{{if IsNSeriesSKU .}}
Expand Down
74 changes: 37 additions & 37 deletions parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,43 @@ write_files:
content: !!binary |
{{WrapAsVariable "provisionConfigs"}}

- path: "/usr/local/bin/health-monitor.sh"
permissions: "0544"
encoding: gzip
owner: "root"
content: !!binary |
{{WrapAsVariable "healthMonitorScript"}}

- path: "/etc/systemd/system/kubelet-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks kubelet health and restarts if needed
After=kubelet.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh kubelet
[Install]
WantedBy=multi-user.target
- path: "/etc/systemd/system/docker-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks docker health and restarts if needed
After=docker.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh container-runtime
[Install]
WantedBy=multi-user.target
{{if .OrchestratorProfile.KubernetesConfig.RequiresDocker}}
{{if not .MasterProfile.IsCoreOS}}
- path: "/etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf"
Expand Down Expand Up @@ -75,43 +112,6 @@ write_files:
"max-file": "5"
}
}
- path: "/usr/local/bin/health-monitor.sh"
permissions: "0544"
encoding: gzip
owner: "root"
content: !!binary |
{{WrapAsVariable "healthMonitorScript"}}

- path: "/etc/systemd/system/docker-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks docker health and restarts if needed
After=docker.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh container-runtime
[Install]
WantedBy=multi-user.target
- path: "/etc/systemd/system/kubelet-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks kubelet health and restarts if needed
After=kubelet.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh kubelet
[Install]
WantedBy=multi-user.target
{{end}}

- path: "/etc/kubernetes/certs/ca.crt"
Expand Down
74 changes: 37 additions & 37 deletions parts/k8s/kubernetesmastercustomdatavmss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,43 @@ write_files:
content: !!binary |
{{WrapAsVariable "provisionConfigs"}}

- path: "/usr/local/bin/health-monitor.sh"
permissions: "0544"
encoding: gzip
owner: "root"
content: !!binary |
{{WrapAsVariable "healthMonitorScript"}}

- path: "/etc/systemd/system/kubelet-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks kubelet health and restarts if needed
After=kubelet.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh kubelet
[Install]
WantedBy=multi-user.target
- path: "/etc/systemd/system/docker-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks docker health and restarts if needed
After=docker.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh container-runtime
[Install]
WantedBy=multi-user.target
{{if .OrchestratorProfile.KubernetesConfig.RequiresDocker}}
{{if not .MasterProfile.IsCoreOS}}
- path: "/etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf"
Expand Down Expand Up @@ -75,43 +112,6 @@ write_files:
"max-file": "5"
}
}
- path: "/usr/local/bin/health-monitor.sh"
permissions: "0544"
encoding: gzip
owner: "root"
content: !!binary |
{{WrapAsVariable "healthMonitorScript"}}

- path: "/etc/systemd/system/docker-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks docker health and restarts if needed
After=docker.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh container-runtime
[Install]
WantedBy=multi-user.target
- path: "/etc/systemd/system/kubelet-monitor.service"
permissions: "0644"
owner: "root"
content: |
[Unit]
Description=a script that checks kubelet health and restarts if needed
After=kubelet.service
[Service]
Restart=always
RestartSec=10
RemainAfterExit=yes
ExecStart=/usr/local/bin/health-monitor.sh kubelet
[Install]
WantedBy=multi-user.target
{{end}}

- path: "/etc/kubernetes/certs/ca.crt"
Expand Down

0 comments on commit 5e50930

Please sign in to comment.