summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inventory/byo/hosts.example5
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py2
-rw-r--r--roles/openshift_node/tasks/main.yml1
-rw-r--r--roles/openshift_node/templates/node.yaml.v1.j22
4 files changed, 9 insertions, 1 deletions
diff --git a/inventory/byo/hosts.example b/inventory/byo/hosts.example
index 423581281..50a683cfc 100644
--- a/inventory/byo/hosts.example
+++ b/inventory/byo/hosts.example
@@ -144,6 +144,11 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
# configure how often node iptables rules are refreshed
#openshift_node_iptables_sync_period=5s
+# Configure nodeIP in the node config
+# This is needed in cases where node traffic is desired to go over an
+# interface other than the default network interface.
+#openshift_node_set_node_ip=True
+
# host group for masters
[masters]
ose3-master[1:3]-ansible.test.example.com
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 6006bfa9d..b60e42c71 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1074,7 +1074,7 @@ class OpenShiftFacts(object):
if 'node' in roles:
node = dict(labels={}, annotations={}, portal_net='172.30.0.0/16',
- iptables_sync_period='5s')
+ iptables_sync_period='5s', set_node_ip=False)
defaults['node'] = node
return defaults
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index d11bc5123..42d984a09 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -34,6 +34,7 @@
schedulable: "{{ openshift_schedulable | default(openshift_scheduleable) | default(None) }}"
sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"
storage_plugin_deps: "{{ osn_storage_plugin_deps | default(None) }}"
+ set_node_ip: "{{ openshift_set_node_ip | default(None) }}"
# We have to add tuned-profiles in the same transaction otherwise we run into depsolving
# problems because the rpms don't pin the version properly.
diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2
index 7d2f506e3..41a303dee 100644
--- a/roles/openshift_node/templates/node.yaml.v1.j2
+++ b/roles/openshift_node/templates/node.yaml.v1.j2
@@ -23,7 +23,9 @@ networkConfig:
{% if openshift.common.use_openshift_sdn %}
networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
{% endif %}
+{% if openshift.node.set_node_ip | bool %}
nodeIP: {{ openshift.common.ip }}
+{% endif %}
nodeName: {{ openshift.common.hostname | lower }}
podManifestConfig:
servingInfo: