summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/meta
diff options
context:
space:
mode:
authorClayton Coleman <ccoleman@redhat.com>2016-12-26 17:00:59 -0500
committerAndrew Butcher <abutcher@redhat.com>2017-01-10 16:22:57 -0500
commitd9fe14e9b53590d7949cbdd53cedb89bbc0ee037 (patch)
tree303145a1f1588bd0231c8b2f3c684c9e6657fb73 /roles/openshift_node/meta
parent15054dfdbe77dddbca393c3559c4858d9a2c5087 (diff)
downloadopenshift-d9fe14e9b53590d7949cbdd53cedb89bbc0ee037.tar.gz
openshift-d9fe14e9b53590d7949cbdd53cedb89bbc0ee037.tar.bz2
openshift-d9fe14e9b53590d7949cbdd53cedb89bbc0ee037.tar.xz
openshift-d9fe14e9b53590d7949cbdd53cedb89bbc0ee037.zip
Support openshift_node_port_range for configuring service NodePorts
Sets the appropriate config field if openshift_node_port_range is set and also configures filewalls on each node. firewalld already supports port ranges like "30000-32000", while iptables needs that value converted to the correct "30000:32000" form for use with `--dport`. If not set, no node ports are opened.
Diffstat (limited to 'roles/openshift_node/meta')
-rw-r--r--roles/openshift_node/meta/main.yml11
1 files changed, 10 insertions, 1 deletions
diff --git a/roles/openshift_node/meta/main.yml b/roles/openshift_node/meta/main.yml
index 56dee2958..91f118191 100644
--- a/roles/openshift_node/meta/main.yml
+++ b/roles/openshift_node/meta/main.yml
@@ -31,6 +31,15 @@ dependencies:
port: 10255/tcp
- service: Openshift kubelet ReadOnlyPort udp
port: 10255/udp
+- role: os_firewall
+ os_firewall_allow:
- service: OpenShift OVS sdn
port: 4789/udp
- when: openshift.node.use_openshift_sdn | bool
+ when: openshift.common.use_openshift_sdn | bool
+- role: os_firewall
+ os_firewall_allow:
+ - service: Kubernetes service NodePort TCP
+ port: "{{ openshift_node_port_range | default('') }}/tcp"
+ - service: Kubernetes service NodePort UDP
+ port: "{{ openshift_node_port_range | default('') }}/udp"
+ when: openshift_node_port_range is defined