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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
d3f35e12
Commit
d3f35e12
authored
9 years ago
by
Smaine Kahlouch
Browse files
Options
Downloads
Patches
Plain Diff
Simplify docker role, cbr0 for calico isn't required anymore
parent
d7b7db34
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/docker/tasks/configure.yml
+0
-8
0 additions, 8 deletions
roles/docker/tasks/configure.yml
roles/docker/templates/create_cbr.j2
+0
-14
0 additions, 14 deletions
roles/docker/templates/create_cbr.j2
roles/docker/templates/default-docker.j2
+1
-3
1 addition, 3 deletions
roles/docker/templates/default-docker.j2
with
1 addition
and
25 deletions
roles/docker/tasks/configure.yml
+
0
−
8
View file @
d3f35e12
---
-
name
:
Write script for calico/docker bridge configuration
template
:
src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x backup=yes
when
:
kube_network_plugin is defined and kube_network_plugin == "calico"
-
name
:
Configure calico/docker bridge
command
:
/etc/network/if-up.d/create_cbr
when
:
kube_network_plugin is defined and kube_network_plugin == "calico"
-
name
:
enable docker
service
:
name
:
docker
...
...
This diff is collapsed.
Click to expand it.
roles/docker/templates/create_cbr.j2
deleted
100644 → 0
+
0
−
14
View file @
d7b7db34
#!/bin/bash
# Create calico bridge cbr0 if it doesn't exist
ifaces
=
$(
ifconfig
-a
|
sed
's/[ \t].*//;/^\(lo\|\)$/d'
|tr
'\n'
' '
)
if
!
[[
"
${
ifaces
}
"
=
~
"cbr0"
]]
;
then
brctl addbr cbr0
ip
link set
cbr0 up
fi
# Configure calico bridge ip
br_ips
=
$(
ip addr list cbr0 |grep
"inet "
|cut
-d
' '
-f6
)
if
!
[[
"
${
br_ips
}
"
=
~
"{{ br_addr }}/{{ kube_network_node_prefix }}"
]]
;
then
ip a add
{{
br_addr
}}
/
{{
kube_network_node_prefix
}}
dev cbr0
fi
This diff is collapsed.
Click to expand it.
roles/docker/templates/default-docker.j2
+
1
−
3
View file @
d3f35e12
...
...
@@ -4,9 +4,7 @@
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
{% if kube_network_plugin is defined and kube_network_plugin == "calico" %}
DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
{% endif %}
#DOCKER_OPTS=""
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
...
...
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