summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/upgrades/library
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2015-11-03 11:48:27 -0400
committerDevan Goodwin <dgoodwin@redhat.com>2015-11-03 11:48:27 -0400
commit6b03fcb185c7f37e258dd34ca8b70d5c124cabba (patch)
treefe2c45c60908c34079bc833d08f5b00224d006a4 /playbooks/adhoc/upgrades/library
parentcbf98f53b0975a829a5720c33149c7014d5bd7cd (diff)
downloadopenshift-6b03fcb185c7f37e258dd34ca8b70d5c124cabba.tar.gz
openshift-6b03fcb185c7f37e258dd34ca8b70d5c124cabba.tar.bz2
openshift-6b03fcb185c7f37e258dd34ca8b70d5c124cabba.tar.xz
openshift-6b03fcb185c7f37e258dd34ca8b70d5c124cabba.zip
Add in proxyClientInfo if missing during config upgrade.
Diffstat (limited to 'playbooks/adhoc/upgrades/library')
-rwxr-xr-xplaybooks/adhoc/upgrades/library/openshift_upgrade_config.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/playbooks/adhoc/upgrades/library/openshift_upgrade_config.py b/playbooks/adhoc/upgrades/library/openshift_upgrade_config.py
index f41c6fb59..95c7b1664 100755
--- a/playbooks/adhoc/upgrades/library/openshift_upgrade_config.py
+++ b/playbooks/adhoc/upgrades/library/openshift_upgrade_config.py
@@ -26,6 +26,7 @@ def get_cfg_dir():
cfg_path = '/etc/openshift/'
return cfg_path
+
def upgrade_master_3_0_to_3_1(backup):
changed = False
@@ -42,12 +43,18 @@ def upgrade_master_3_0_to_3_1(backup):
'v1beta3' in config['apiLevels']:
config['apiLevels'].remove('v1beta3')
changed = True
- if 'kubernetesMasterConfig' in config and \
- 'apiLevels' in config['kubernetesMasterConfig'] and \
+ if 'apiLevels' in config['kubernetesMasterConfig'] and \
'v1beta3' in config['kubernetesMasterConfig']['apiLevels']:
config['kubernetesMasterConfig']['apiLevels'].remove('v1beta3')
changed = True
+ # Add the new master proxy client certs:
+ if 'proxyClientInfo' not in config['kubernetesMasterConfig']:
+ config['kubernetesMasterConfig']['proxyClientInfo'] = {
+ 'certFile': 'master.proxy-client.crt',
+ 'keyFile': 'master.proxy-client.key'
+ }
+
if changed:
if backup:
timestamp = datetime.now().strftime('%Y%m%d%H%M%S')
@@ -86,7 +93,6 @@ def main():
supports_check_mode=True,
)
-
from_version = module.params['from_version']
to_version = module.params['to_version']
role = module.params['role']