Remove hardcoded libexec directory path
[ta/caas-kubernetes.git] / ansible / roles / kubelet / templates / kubelet.service
1 {#
2 Copyright 2019 Nokia
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 #}
16 [Unit]
17 Description=Kubelet
18 After=docker.service
19 BindsTo=docker.service
20 Before=kubelet_healthcheck.service
21
22 [Service]
23 Slice=podruntime.slice
24 MemoryAccounting=true
25 CPUAccounting=true
26 BlockIOAccounting=true
27 TasksAccounting=true
28 Type=simple
29 User=root
30 TimeoutStartSec=0
31 TimeoutStopSec=45s
32 RestartSec=10s
33 EnvironmentFile=/etc/kubernetes/env.list
34
35 ExecStartPre={{ caas.libexec_dir }}/kubelet_start.sh
36
37 ExecStart=/usr/bin/kubelet {{ kubelet_params | join(' ') }}
38
39 ExecStop={{ caas.libexec_dir }}/kubelet_stop.sh
40
41 Restart=always
42 LimitNOFILE=65536
43
44 [Install]
45 WantedBy=multi-user.target