diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-08-19 03:06:46 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-08-19 03:06:46 +0000 |
commit | d03ccb088b49af4736b542f35383a3e698fd1c64 (patch) | |
tree | 5f45756a263b7e707a589c7a0f1b48104b7d0761 /manifests/profile/base | |
parent | c34163c79b14eee8b67fb1fbfb4eadd820b45166 (diff) | |
parent | 8c39646bc2822181bd2f60aa9ae5fffef496698e (diff) |
Merge "Allow configuring multiple insecure registries"
Diffstat (limited to 'manifests/profile/base')
-rw-r--r-- | manifests/profile/base/docker.pp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/manifests/profile/base/docker.pp b/manifests/profile/base/docker.pp index d230366..8cb4cdd 100644 --- a/manifests/profile/base/docker.pp +++ b/manifests/profile/base/docker.pp @@ -19,10 +19,11 @@ # # === Parameters # -# [*insecure_registry_address*] -# The host/port combiniation of the insecure registry. This is used to configure -# /etc/sysconfig/docker so that a local (insecure) registry can be accessed. -# Example: 127.0.0.1:8787 (defaults to unset) +# [*insecure_registries*] +# An array of host/port combiniations of insecure registries. This is used to configure +# /etc/sysconfig/docker so that local (insecure) registries can be accessed. +# Example: ['127.0.0.1:8787'] +# (defaults to unset) # # [*registry_mirror*] # Configure a registry-mirror in the /etc/docker/daemon.json file. @@ -45,6 +46,11 @@ # # DEPRECATED PARAMETERS # +# [*insecure_registry_address*] +# DEPRECATED: The host/port combiniation of the insecure registry. This is used to configure +# /etc/sysconfig/docker so that a local (insecure) registry can be accessed. +# Example: 127.0.0.1:8787 (defaults to unset) +# # [*docker_namespace*] # DEPRECATED: The namespace to be used when setting INSECURE_REGISTRY # this will be split on "/" to derive the docker registry @@ -55,13 +61,14 @@ # is enabled (defaults to false) # class tripleo::profile::base::docker ( - $insecure_registry_address = undef, + $insecure_registries = undef, $registry_mirror = false, $docker_options = '--log-driver=journald --signature-verification=false --iptables=false', $configure_storage = true, $storage_options = '-s overlay2', $step = Integer(hiera('step')), # DEPRECATED PARAMETERS + $insecure_registry_address = undef, $docker_namespace = undef, $insecure_registry = false, ) { @@ -92,14 +99,19 @@ class tripleo::profile::base::docker ( } if $insecure_registry { - warning('The $insecure_registry and $docker_namespace are deprecated. Use $insecure_registry_address instead.') + warning('The $insecure_registry and $docker_namespace are deprecated. Use $insecure_registries instead.') if $docker_namespace == undef { fail('You must provide a $docker_namespace in order to configure insecure registry') } $namespace = strip($docker_namespace.split('/')[0]) $registry_changes = [ "set INSECURE_REGISTRY '\"--insecure-registry ${namespace}\"'" ] } elsif $insecure_registry_address { + warning('The $insecure_registry_address parameter is deprecated. Use $insecure_registries instead.') $registry_changes = [ "set INSECURE_REGISTRY '\"--insecure-registry ${insecure_registry_address}\"'" ] + } elsif $insecure_registries { + $registry_changes = [ join(['set INSECURE_REGISTRY \'"--insecure-registry ', + join($insecure_registries, ' --insecure-registry '), + '"\''], '') ] } else { $registry_changes = [ 'rm INSECURE_REGISTRY' ] } |