Skip to content

Commit

Permalink
Merge pull request #24 from xtao/dev
Browse files Browse the repository at this point in the history
Allow 8080 & 8443 for webrouter
  • Loading branch information
sunyi00 committed May 24, 2016
2 parents 27fad4b + 054e66f commit dd0dc4d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 10 additions & 8 deletions playbooks/roles/calico/tasks/profile.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
- name: remove calico default pool
shell: calicoctl pool remove 192.168.0.0/16
environment:
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
changed_when: False
ignore_errors: yes

- name: check if lain pool exists
shell: calicoctl pool show --ipv4 | grep "{{ calico_default_network }}"
environment:
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
register: result
changed_when: False
ignore_errors: yes

- name: add lain pool
shell: calicoctl pool add {{ calico_default_network }} --nat-outgoing
environment:
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
when: result|failed and not calico_ipip|bool

- name: add lain pool with ipip
shell: calicoctl pool add {{ calico_default_network }} --nat-outgoing --ipip
environment:
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
when: result|failed and calico_ipip|bool

Expand Down Expand Up @@ -69,22 +69,24 @@

- name: add tinydns rules allow to udp 53
command: calicoctl profile tinydns rule add inbound --at=1 allow udp to ports 53
environment:
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
when: result|failed

- name: add webrouter rules allow to tcp 80 and 443
- name: add webrouter rules allow to tcp 80, 443, 8080, 8443
command: calicoctl profile webrouter rule add inbound --at=1 allow tcp to ports {{ item }}
with_items:
- "80"
- "443"
environment:
- "8080"
- "8443"
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
when: result|failed

- name: add lain tag to webrouter profile
command: calicoctl profile webrouter tag add lain
environment:
environment:
ETCD_AUTHORITY: 127.0.0.1:{{ etcd_client_port }}
when: result|failed

Expand Down
2 changes: 2 additions & 0 deletions playbooks/roles/webrouter-start/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
with_items:
- 80
- 443
- 8080
- 8443

- meta: flush_handlers

0 comments on commit dd0dc4d

Please sign in to comment.