Ajout de la reconnaissance de systemd
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
29bbd3fb70
commit
f160dfa618
3 changed files with 19 additions and 1 deletions
|
|
@ -60,6 +60,8 @@
|
|||
group: root
|
||||
owner: root
|
||||
mode: 0755
|
||||
when:
|
||||
- ansible_service_mgr == "systemd"
|
||||
|
||||
- name: Configure kubelet service
|
||||
template:
|
||||
|
|
@ -71,6 +73,20 @@
|
|||
with_items:
|
||||
- "systemd/system/kubelet.service.d/0-kubelet-extra-args.conf"
|
||||
# - "sysconfig/kubelet"
|
||||
when:
|
||||
- ansible_service_mgr == "systemd"
|
||||
|
||||
- name: Configure kubelet service
|
||||
template:
|
||||
src: "etc/{{ item }}.j2"
|
||||
dest: "/etc/{{ item }}"
|
||||
group: root
|
||||
owner: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- "sysconfig/kubelet"
|
||||
when:
|
||||
- not ansible_service_mgr == "systemd"
|
||||
|
||||
- name: Enable kubelet on boot
|
||||
service:
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates
|
||||
KUBELET_EXTRA_ARGS="--cgroup-driver=systemd --container-runtime=remote --runtime-request-timeout=5m --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_eth0.ipv4.address }}"
|
||||
KUBELET_EXTRA_ARGS="{% if ansible_service_mgr == "systemd" %}--cgroup-driver=systemd {% endif %}--container-runtime=remote --runtime-request-timeout=5m --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_eth0.ipv4.address }}"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ nodeRegistration:
|
|||
effect: "NoSchedule"
|
||||
{% endif %}
|
||||
kubeletExtraArgs:
|
||||
{% if ansible_service_mgr == "systemd" %}
|
||||
cgroup-driver: "systemd"
|
||||
{% endif %}
|
||||
container-runtime: "remote"
|
||||
runtime-request-timeout: "5m"
|
||||
{% if kubernetes_cri == "containerd" %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue