Merge "Allow operators to override docker_insecure_registries"

This commit is contained in:
Zuul 2018-07-26 09:23:45 +00:00 committed by Gerrit Code Review
commit 80ac3b941b
2 changed files with 15 additions and 6 deletions

View File

@ -0,0 +1,7 @@
---
features:
- |
Allow the operators to override the INSECURE_REGISTRY parameter without
hardcoding the local_ip and the admin VIP in all the cases.
If the operators want to override the whole parameter, they now can with
docker_insecure_registries parameter in undercloud.conf.

View File

@ -312,12 +312,14 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False,
env_data['NeutronDnsDomain'] = CONF['overcloud_domain_name']
deploy_args.append('--local-domain=%s' % CONF['overcloud_domain_name'])
env_data['DockerInsecureRegistryAddress'] = [
'%s:8787' % CONF['local_ip'].split('/')[0]]
env_data['DockerInsecureRegistryAddress'].append(
'%s:8787' % CONF['undercloud_admin_host'])
env_data['DockerInsecureRegistryAddress'].extend(
CONF['docker_insecure_registries'])
if CONF.get('docker_insecure_registries'):
env_data['DockerInsecureRegistryAddress'] = (
CONF['docker_insecure_registries'])
else:
env_data['DockerInsecureRegistryAddress'] = [
'%s:8787' % CONF['local_ip'].split('/')[0]]
env_data['DockerInsecureRegistryAddress'].append(
'%s:8787' % CONF['undercloud_admin_host'])
if CONF.get('docker_registry_mirror', None):
env_data['DockerRegistryMirror'] = CONF['docker_registry_mirror']