summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-11-21 14:12:41 -0500
committerScott Dodson <sdodson@redhat.com>2018-01-24 17:15:44 -0500
commit2bbdf2984c5b4d59ecdc773ed8e40aa340092922 (patch)
tree4cd095604992267c4f3718556a25617b60e0c2c1 /roles
parent54ee60a3e9d162aedd28af7396975dc7fbaef662 (diff)
downloadopenshift-2bbdf2984c5b4d59ecdc773ed8e40aa340092922.tar.gz
openshift-2bbdf2984c5b4d59ecdc773ed8e40aa340092922.tar.bz2
openshift-2bbdf2984c5b4d59ecdc773ed8e40aa340092922.tar.xz
openshift-2bbdf2984c5b4d59ecdc773ed8e40aa340092922.zip
Add kube service ipaddress to no_proxy list
Computed as the first ip address in the portal_net
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 26f0525e9..16b6ea53c 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -15,6 +15,7 @@ import os
import yaml
import struct
import socket
+import ipaddress
from distutils.util import strtobool
from distutils.version import LooseVersion
from ansible.module_utils.six import string_types
@@ -1146,6 +1147,8 @@ def set_proxy_facts(facts):
if 'no_proxy_internal_hostnames' in common:
common['no_proxy'].extend(common['no_proxy_internal_hostnames'].split(','))
# We always add local dns domain and ourselves no matter what
+ kube_svc_ip = ipaddress.ip_network(unicode(common['portal_net']))[1]
+ common['no_proxy'].append(kube_svc_ip)
common['no_proxy'].append('.' + common['dns_domain'])
common['no_proxy'].append('.svc')
common['no_proxy'].append(common['hostname'])