Add cluster directory and health-monitor.sh.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -35,7 +35,6 @@ write_files:
|
||||
shim = "/home/cri-containerd/usr/local/bin/containerd-shim"
|
||||
runtime = "/home/cri-containerd/usr/local/sbin/runc"
|
||||
|
||||
# TODO(random-liu): Add health monitor for containerd/cri-containerd.
|
||||
- path: /etc/systemd/system/containerd.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
@@ -90,6 +89,25 @@ write_files:
|
||||
[Install]
|
||||
WantedBy=cri-containerd.target
|
||||
|
||||
- path: /etc/systemd/system/cri-containerd-monitor.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes health monitoring for cri-containerd and containerd
|
||||
After=containerd.service cri-containerd.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/cri-containerd/opt/cri-containerd/cluster/health-monitor.sh
|
||||
ExecStart=/home/cri-containerd/opt/cri-containerd/cluster/health-monitor.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=cri-containerd.target
|
||||
|
||||
# TODO(random-liu): Guarantee order.
|
||||
- path: /etc/systemd/system/cri-containerd.target
|
||||
permissions: 0644
|
||||
@@ -202,6 +220,7 @@ runcmd:
|
||||
- systemctl enable containerd.service
|
||||
- systemctl enable cri-containerd-installation.service
|
||||
- systemctl enable cri-containerd.service
|
||||
- systemctl enable cri-containerd-monitor.service
|
||||
- systemctl enable cri-containerd.target
|
||||
- systemctl enable kube-master-installation.service
|
||||
- systemctl enable kube-master-configuration.service
|
||||
|
||||
@@ -93,6 +93,25 @@ write_files:
|
||||
[Install]
|
||||
WantedBy=cri-containerd.target
|
||||
|
||||
- path: /etc/systemd/system/cri-containerd-monitor.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes health monitoring for cri-containerd and containerd
|
||||
After=containerd.service cri-containerd.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/cri-containerd/opt/cri-containerd/cluster/health-monitor.sh
|
||||
ExecStart=/home/cri-containerd/opt/cri-containerd/cluster/health-monitor.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=cri-containerd.target
|
||||
|
||||
- path: /etc/systemd/system/cri-containerd.target
|
||||
permissions: 0644
|
||||
owner: root
|
||||
@@ -204,6 +223,7 @@ runcmd:
|
||||
- systemctl enable containerd.service
|
||||
- systemctl enable cri-containerd-installation.service
|
||||
- systemctl enable cri-containerd.service
|
||||
- systemctl enable cri-containerd-monitor.service
|
||||
- systemctl enable cri-containerd.target
|
||||
- systemctl enable kube-node-installation.service
|
||||
- systemctl enable kube-node-configuration.service
|
||||
|
||||
Reference in New Issue
Block a user