File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,25 +51,6 @@ write_files:
5151 [Install]
5252 WantedBy=containerd.target
5353
54- - path : /etc/systemd/system/containerd-monitor.service
55- permissions : 0644
56- owner : root
57- content : |
58- [Unit]
59- Description=Kubernetes health monitoring for containerd
60- After=containerd.service
61-
62- [Service]
63- Restart=always
64- RestartSec=10
65- RemainAfterExit=yes
66- ExecStartPre=/bin/chmod 544 /home/containerd/opt/containerd/cluster/health-monitor.sh
67- ExecStart=/bin/bash -c 'CRICTL=/home/containerd/usr/local/bin/crictl \
68- /home/containerd/opt/containerd/cluster/health-monitor.sh'
69-
70- [Install]
71- WantedBy=containerd.target
72-
7354 - path : /etc/systemd/system/containerd.target
7455 permissions : 0644
7556 owner : root
@@ -119,6 +100,23 @@ write_files:
119100 [Install]
120101 WantedBy=kubernetes.target
121102
103+ - path : /etc/systemd/system/kube-container-runtime-monitor.service
104+ permissions : 0644
105+ owner : root
106+ content : |
107+ [Unit]
108+ Description=Kubernetes health monitoring for container runtime
109+ After=kube-master-configuration.service
110+ [Service]
111+ Restart=always
112+ RestartSec=10
113+ RemainAfterExit=yes
114+ RemainAfterExit=yes
115+ ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
116+ ExecStart=/home/kubernetes/bin/health-monitor.sh container-runtime
117+ [Install]
118+ WantedBy=kubernetes.target
119+
122120 - path : /etc/systemd/system/kubelet-monitor.service
123121 permissions : 0644
124122 owner : root
Original file line number Diff line number Diff line change @@ -51,25 +51,6 @@ write_files:
5151 [Install]
5252 WantedBy=containerd.target
5353
54- - path : /etc/systemd/system/containerd-monitor.service
55- permissions : 0644
56- owner : root
57- content : |
58- [Unit]
59- Description=Kubernetes health monitoring for containerd
60- After=containerd.service
61-
62- [Service]
63- Restart=always
64- RestartSec=10
65- RemainAfterExit=yes
66- ExecStartPre=/bin/chmod 544 /home/containerd/opt/containerd/cluster/health-monitor.sh
67- ExecStart=/bin/bash -c 'CRICTL=/home/containerd/usr/local/bin/crictl \
68- /home/containerd/opt/containerd/cluster/health-monitor.sh'
69-
70- [Install]
71- WantedBy=containerd.target
72-
7354 - path : /etc/systemd/system/containerd.target
7455 permissions : 0644
7556 owner : root
@@ -119,6 +100,23 @@ write_files:
119100 [Install]
120101 WantedBy=kubernetes.target
121102
103+ - path : /etc/systemd/system/kube-container-runtime-monitor.service
104+ permissions : 0644
105+ owner : root
106+ content : |
107+ [Unit]
108+ Description=Kubernetes health monitoring for container runtime
109+ After=kube-node-configuration.service
110+ [Service]
111+ Restart=always
112+ RestartSec=10
113+ RemainAfterExit=yes
114+ RemainAfterExit=yes
115+ ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
116+ ExecStart=/home/kubernetes/bin/health-monitor.sh container-runtime
117+ [Install]
118+ WantedBy=kubernetes.target
119+
122120 - path : /etc/systemd/system/kubelet-monitor.service
123121 permissions : 0644
124122 owner : root
Original file line number Diff line number Diff line change @@ -133,14 +133,14 @@ else
133133 # Download and untar the release tar ball.
134134 curl -f --ipv4 -Lo " ${TARBALL} " --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 " ${TARBALL_GCS_PATH} "
135135 tar xvf " ${TARBALL} "
136+ # Use crictl installed by kube-up.sh.
137+ # TODO(random-liu): Create release tarball for GCE, and do not package crictl.
138+ rm " ${CONTAINERD_HOME} /usr/local/bin/crictl"
139+ rm " ${CONTAINERD_HOME} /etc/crictl.yaml"
136140 rm -f " ${TARBALL} "
137141 fi
138142fi
139143
140- # Configure containerd.
141- # Copy crictl config.
142- cp " ${CONTAINERD_HOME} /etc/crictl.yaml" /etc
143-
144144# Generate containerd config
145145config_path=" ${CONTAINERD_CONFIG_PATH:- " /etc/containerd/config.toml" } "
146146mkdir -p $( dirname ${config_path} )
Original file line number Diff line number Diff line change 1717set -o nounset
1818set -o pipefail
1919
20+ # TODO(#780): This file is not used by kube-up.sh on
21+ # GCE anymore. We'll get rid of this file in 1.12 release.
22+ # Please stop relying on this script if you are.
23+
2024# CRICTL is the path of crictl
2125CRICTL=${CRICTL:- " crictl" }
2226# INITIAL_WAIT_ATTEMPTS is the number to attempt, before start
You can’t perform that action at this time.
0 commit comments