forked from Project31/ansible-kubernetes-openshift-pi3
-
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.
+ some work on flannel integration, not completed yet. See also flannel-io/flannel#799 for an issue why iptables rules need to be changed.
- Loading branch information
Showing
4 changed files
with
32 additions
and
7 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
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 |
---|---|---|
@@ -1,7 +1,32 @@ | ||
- name: Create flannel resources | ||
# Please note, this is still work in progress | ||
# Especially saving of the iptables rules needs to be fixed | ||
|
||
- name: flannel | Install iptables support package | ||
apt: | ||
name: iptables-persistent | ||
force: yes | ||
state: present | ||
|
||
- name: flannel | Get iptables rules | ||
shell: iptables -L | ||
register: iptablesrules | ||
check_mode: no | ||
|
||
- name: flannel | Add flannel iptable rules (in) | ||
command: /sbin/iptables -A FORWARD -i cni0 -j ACCEPT -m comment --comment "Flannel" | ||
when: iptablesrules.stdout.find("Flannel") == -1 | ||
|
||
- name: flannel | Add flannel iptable rules (out) | ||
command: /sbin/iptables -A FORWARD -o cni0 -j ACCEPT -m comment --comment "Flannel" | ||
when: iptablesrules.stdout.find("Flannel") == -1 | ||
|
||
- name: flannel | Save iptables | ||
command: service iptables-persistent save | ||
|
||
- name: flannel | Create flannel resources | ||
template: src=cni/flannel.yml dest=/etc/kubernetes/kube-flannel.yml | ||
|
||
- name: Create flannel resources | ||
- name: flannel | Create flannel resources | ||
environment: | ||
KUBECONFIG: /etc/kubernetes/admin.conf | ||
command: kubectl create -f /etc/kubernetes/kube-flannel.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
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