From 6b03fcb185c7f37e258dd34ca8b70d5c124cabba Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Tue, 3 Nov 2015 11:48:27 -0400 Subject: Add in proxyClientInfo if missing during config upgrade. --- playbooks/adhoc/upgrades/library/openshift_upgrade_config.py | 12 +++++++++--- 1 file 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'] -- cgit v1.2.3