summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-04-28 11:35:22 -0400
committerScott Dodson <sdodson@redhat.com>2016-04-28 16:27:41 -0400
commitde7caa0eca7e2f80555fc225cfa8b5d24284b3d2 (patch)
tree033ad7b29540353516a7e39baf0ff61063dcbe3c
parentf1fc354da246f9adfe3e25fba79a72fff0cf7b2e (diff)
downloadopenshift-de7caa0eca7e2f80555fc225cfa8b5d24284b3d2.tar.gz
openshift-de7caa0eca7e2f80555fc225cfa8b5d24284b3d2.tar.bz2
openshift-de7caa0eca7e2f80555fc225cfa8b5d24284b3d2.tar.xz
openshift-de7caa0eca7e2f80555fc225cfa8b5d24284b3d2.zip
BuildDefaults are a kube admission controller not an openshift admission
controller Also, improve commenting
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 6697e29e1..643984982 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1389,9 +1389,9 @@ def set_proxy_facts(facts):
facts['common'] = common
if 'builddefaults' in facts:
- facts['master']['admission_plugin_config'] = dict()
builddefaults = facts['builddefaults']
common = facts['common']
+ # Copy values from common to builddefaults
if 'http_proxy' not in builddefaults and 'http_proxy' in common:
builddefaults['http_proxy'] = common['http_proxy']
if 'https_proxy' not in builddefaults and 'https_proxy' in common:
@@ -1402,11 +1402,14 @@ def set_proxy_facts(facts):
builddefaults['git_http_proxy'] = builddefaults['http_proxy']
if 'git_https_proxy' not in builddefaults and 'https_proxy' in builddefaults:
builddefaults['git_https_proxy'] = builddefaults['https_proxy']
- if 'admission_plugin_config' not in builddefaults:
- builddefaults['admission_plugin_config'] = dict()
+ # If we're actually defining a proxy config then create kube_admission_plugin_config
+ # if it doesn't exist, then merge builddefaults[config] structure
+ # into kube_admission_plugin_config
+ if 'kube_admission_plugin_config' not in facts['master']:
+ facts['master']['kube_admission_plugin_config'] = dict()
if 'config' in builddefaults and ('http_proxy' in builddefaults or \
'https_proxy' in builddefaults):
- facts['master']['admission_plugin_config'].update(builddefaults['config'])
+ facts['master']['kube_admission_plugin_config'].update(builddefaults['config'])
facts['builddefaults'] = builddefaults
return facts