summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-04-28 17:07:51 -0400
committerJason DeTiberus <detiber@gmail.com>2016-04-28 17:07:51 -0400
commit5fb00afb62c1247a3de83893cfefdfaac323f13d (patch)
tree66fb2be2eb6eb813cdbf4ac6c2de75b5aa6c46aa /roles
parenta33eab007abdbea46c2f914af2d8c01195701cf0 (diff)
parentde7caa0eca7e2f80555fc225cfa8b5d24284b3d2 (diff)
downloadopenshift-5fb00afb62c1247a3de83893cfefdfaac323f13d.tar.gz
openshift-5fb00afb62c1247a3de83893cfefdfaac323f13d.tar.bz2
openshift-5fb00afb62c1247a3de83893cfefdfaac323f13d.tar.xz
openshift-5fb00afb62c1247a3de83893cfefdfaac323f13d.zip
Merge pull request #1835 from sdodson/bz1331346
BuildDefaults are a kube admission controller not an openshift admission
Diffstat (limited to 'roles')
-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