Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Support kubelet environment file #142

Merged
merged 2 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ansible/roles/kubernetes-common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@
- name: drop extra args kubelet config
template:
backup: True
dest: /etc/systemd/system/kubelet.service.d/09-extra-args.conf
src: etc/systemd/system/kubelet.service.d/09-extra-args.conf
dest: "/etc/{{ 'default' if ansible_os_family == 'Debian' else 'sysconfig' }}/kubelet"
src: etc/default/kubelet
notify:
- restart kubelet
when: kubernetes_common_primary_interface is defined or kubernetes_common_kubelet_extra_args is defined

- name: delete old kubelet extra args unit file
file:
dest: /etc/systemd/system/kubelet.service.d/09-extra-args.conf
state: absent
notify:
- restart kubelet

- name: open kubelet ports
firewalld:
port: "{{ item }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KUBELET_EXTRA_ARGS={% if kubernetes_common_primary_interface is defined %} --node-ip={{kubernetes_node_ip}}{% endif %}{% for k, v in kubernetes_common_kubelet_extra_args.items() %} --{{k}}='{{v}}'{%- endfor %}

This file was deleted.