forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kube-ipvs0/nodelocaldns to NetworkManager unmanaged-devices (kube…
…rnetes-sigs#7315) On CentOS 8 they seem to be ignored by default, but better be extra safe This also make it easy to exclude other network plugin interfaces Signed-off-by: Etienne Champetier <[email protected]>
- Loading branch information
Showing
7 changed files
with
43 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
roles/kubernetes/preinstall/tasks/0062-networkmanager-unmanaged-devices.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: NetworkManager | Check if host has NetworkManager | ||
# noqa 303 Should we use service_facts for this? | ||
command: systemctl is-active --quiet NetworkManager.service | ||
register: nm_check | ||
failed_when: false | ||
changed_when: false | ||
|
||
- name: NetworkManager | Ensure NetworkManager conf.d dir | ||
file: | ||
path: "/etc/NetworkManager/conf.d" | ||
state: directory | ||
recurse: yes | ||
when: nm_check.rc == 0 | ||
|
||
- name: NetworkManager | Prevent NetworkManager from managing Calico interfaces (cali*/tunl*/vxlan.calico) | ||
copy: | ||
content: | | ||
[keyfile] | ||
unmanaged-devices+=interface-name:cali*;interface-name:tunl*;interface-name:vxlan.calico | ||
dest: /etc/NetworkManager/conf.d/calico.conf | ||
when: | ||
- nm_check.rc == 0 | ||
- kube_network_plugin == "calico" | ||
notify: Preinstall | reload NetworkManager | ||
|
||
# TODO: add other network_plugin interfaces | ||
|
||
- name: NetworkManager | Prevent NetworkManager from managing K8S interfaces (kube-ipvs0/nodelocaldns) | ||
copy: | ||
content: | | ||
[keyfile] | ||
unmanaged-devices+=interface-name:kube-ipvs0;interface-name:nodelocaldns | ||
dest: /etc/NetworkManager/conf.d/k8s.conf | ||
when: nm_check.rc == 0 | ||
notify: Preinstall | reload NetworkManager |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters