Merge pull request #4682 from afbjorklund/kubelet-containerd
Fix systemd dependencies when using containerdpull/4688/head
commit
b1648ca2e4
|
@ -71,6 +71,25 @@ Wants=crio.service
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=/var/run/crio/crio.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=/var/run/crio/crio.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m
|
ExecStart=/usr/bin/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=/var/run/crio/crio.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=/var/run/crio/crio.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
description: "default containerd runtime",
|
||||||
|
cfg: config.KubernetesConfig{
|
||||||
|
NodeIP: "192.168.1.100",
|
||||||
|
KubernetesVersion: constants.DefaultKubernetesVersion,
|
||||||
|
NodeName: "minikube",
|
||||||
|
ContainerRuntime: "containerd",
|
||||||
|
},
|
||||||
|
expected: `
|
||||||
|
[Unit]
|
||||||
|
Wants=containerd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/bin/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=remote --container-runtime-endpoint=unix:///run/containerd/containerd.sock --fail-swap-on=false --hostname-override=minikube --image-service-endpoint=unix:///run/containerd/containerd.sock --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --runtime-request-timeout=15m
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -153,7 +153,7 @@ evictionHard:
|
||||||
|
|
||||||
var kubeletSystemdTemplate = template.Must(template.New("kubeletSystemdTemplate").Parse(`
|
var kubeletSystemdTemplate = template.Must(template.New("kubeletSystemdTemplate").Parse(`
|
||||||
[Unit]
|
[Unit]
|
||||||
{{if or (eq .ContainerRuntime "cri-o") (eq .ContainerRuntime "cri")}}Wants=crio.service{{else}}Wants=docker.socket{{end}}
|
{{if or (eq .ContainerRuntime "cri-o") (eq .ContainerRuntime "cri")}}Wants=crio.service{{else if eq .ContainerRuntime "containerd"}}Wants=containerd.service{{else}}Wants=docker.socket{{end}}
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
|
|
Loading…
Reference in New Issue