-
Notifications
You must be signed in to change notification settings - Fork 401
/
kubelet.service.yaml
53 lines (49 loc) · 2.04 KB
/
kubelet.service.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: kubelet.service
enabled: true
contents: |
[Unit]
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target
Requires=crio.service kubelet-auto-node-size.service
After=network-online.target crio.service kubelet-auto-node-size.service
After=ostree-finalize-staged.service
[Service]
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
ExecStartPre=/bin/rm -f /var/lib/kubelet/memory_manager_state
{{- if eq .IPFamilies "IPv6"}}
Environment="KUBELET_NODE_IP=::"
{{- end}}
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env
EnvironmentFile=/etc/node-sizing.env
ExecStart=/usr/local/bin/kubenswrapper \
/usr/bin/kubelet \
--config=/etc/kubernetes/kubelet.conf \
--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--runtime-cgroups=/system.slice/crio.service \
--node-labels=node-role.kubernetes.io/control-plane,node-role.kubernetes.io/master,node.openshift.io/os_id=${ID} \
{{- if eq .IPFamilies "DualStack"}}
--node-ip=${KUBELET_NODE_IPS} \
{{- else}}
--node-ip=${KUBELET_NODE_IP} \
{{- end}}
--minimum-container-ttl-duration=6m0s \
--cloud-provider={{cloudProvider .}} \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
{{cloudConfigFlag . }} \
--hostname-override=${KUBELET_NODE_NAME} \
--provider-id=${KUBELET_PROVIDERID} \
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
--pod-infra-container-image={{.Images.infraImageKey}} \
--system-reserved=cpu=${SYSTEM_RESERVED_CPU},memory=${SYSTEM_RESERVED_MEMORY},ephemeral-storage=${SYSTEM_RESERVED_ES} \
--v=${KUBELET_LOG_LEVEL}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target