Skip to content

Commit

Permalink
Add openshift_node_open_ports to allow arbitrary firewall exposure
Browse files Browse the repository at this point in the history
It should be possible for an admin to define an arbitrary set of ports
to be exposed on each node that will relate to the cluster function.
This adds a new global variable for the node that supports

    Array(Object{'service':<name>,'port':<port_spec>,'cond':<boolean>})

which is the same format accepted by the firewall role.
  • Loading branch information
smarterclayton committed Sep 12, 2017
1 parent 33d254a commit 3f10259
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roles/openshift_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ openshift_deployment_type: origin
openshift_node_bootstrap: False

r_openshift_node_os_firewall_deny: []
r_openshift_node_os_firewall_allow:
default_r_openshift_node_os_firewall_allow:
- service: Kubernetes kubelet
port: 10250/tcp
- service: http
Expand All @@ -79,6 +79,8 @@ r_openshift_node_os_firewall_allow:
- service: Kubernetes service NodePort UDP
port: "{{ openshift_node_port_range | default('') }}/udp"
cond: "{{ openshift_node_port_range is defined }}"
# Allow multiple port ranges to be added to the role
r_openshift_node_os_firewall_allow: "{{ default_r_openshift_node_os_firewall_allow | union(openshift_node_open_ports | default([])) }}"

oreg_url: ''
oreg_host: "{{ oreg_url.split('/')[0] if '.' in oreg_url.split('/')[0] else '' }}"
Expand Down

0 comments on commit 3f10259

Please sign in to comment.