Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
fb591bf2
Commit
fb591bf2
authored
5 years ago
by
Matthew Mosesohn
Committed by
Kubernetes Prow Robot
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Apply workaround for NetworkManager and calico (#5230)
Change-Id: I5cb2bdf1a57707c1b8da3e5ac0c80e5c353480a4
parent
a43e0d3f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.ansible-lint
+1
-0
1 addition, 0 deletions
.ansible-lint
roles/network_plugin/calico/handlers/main.yml
+6
-0
6 additions, 0 deletions
roles/network_plugin/calico/handlers/main.yml
roles/network_plugin/calico/tasks/install.yml
+22
-0
22 additions, 0 deletions
roles/network_plugin/calico/tasks/install.yml
with
29 additions
and
0 deletions
.ansible-lint
+
1
−
0
View file @
fb591bf2
...
@@ -6,6 +6,7 @@ skip_list:
...
@@ -6,6 +6,7 @@ skip_list:
# These either still need to be corrected in the repository and the rules re-enabled or documented why they are skipped on purpose.
# These either still need to be corrected in the repository and the rules re-enabled or documented why they are skipped on purpose.
- '301'
- '301'
- '302'
- '302'
- '303'
- '305'
- '305'
- '306'
- '306'
- '404'
- '404'
...
...
This diff is collapsed.
Click to expand it.
roles/network_plugin/calico/handlers/main.yml
+
6
−
0
View file @
fb591bf2
...
@@ -18,3 +18,9 @@
...
@@ -18,3 +18,9 @@
-
name
:
containerd | delete calico-node containers
-
name
:
containerd | delete calico-node containers
shell
:
'
crictl
pods
--name
calico-node-*
-q
|
xargs
-I%
--no-run-if-empty
bash
-c
"crictl
stopp
%
&&
crictl
rmp
%"'
shell
:
'
crictl
pods
--name
calico-node-*
-q
|
xargs
-I%
--no-run-if-empty
bash
-c
"crictl
stopp
%
&&
crictl
rmp
%"'
when
:
container_manager in ["crio", "containerd"]
when
:
container_manager in ["crio", "containerd"]
-
name
:
Calico | Reload NetworkManager
service
:
name
:
NetworkManager
state
:
reloaded
when
:
'
"running"
in
nm_check.stdout'
This diff is collapsed.
Click to expand it.
roles/network_plugin/calico/tasks/install.yml
+
22
−
0
View file @
fb591bf2
...
@@ -6,6 +6,28 @@
...
@@ -6,6 +6,28 @@
mode
:
0755
mode
:
0755
remote_src
:
yes
remote_src
:
yes
-
name
:
Calico | Check if host has NetworkManager
command
:
systemctl show NetworkManager
register
:
nm_check
failed_when
:
false
changed_when
:
false
-
name
:
Calico | Ensure NetworkManager conf.d dir
file
:
path
:
"
/etc/NetworkManager/conf.d"
state
:
directory
recurse
:
yes
when
:
nm_check.rc ==
0
-
name
:
Calico | Prevent NetworkManager from managing Calico interfaces
copy
:
content
:
|
[keyfile]
unmanaged-devices=interface-name:cali*;interface-name:tunl*
dest
:
/etc/NetworkManager/conf.d/calico.conf
when
:
nm_check.rc ==
0
notify
:
Calico | Reload NetworkManager
-
name
:
Calico | Write Calico cni config
-
name
:
Calico | Write Calico cni config
template
:
template
:
src
:
"
cni-calico.conflist.j2"
src
:
"
cni-calico.conflist.j2"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment