From 084e3ea9eef7ea57bed7bdb36ebc7e3fe45fb9c4 Mon Sep 17 00:00:00 2001 From: Gan Huang Date: Wed, 10 Aug 2016 15:21:48 +0800 Subject: docker-registry's middleware stanza should contain 'registry' and 'storage' by default --- roles/openshift_hosted/templates/registry_config.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/openshift_hosted/templates/registry_config.j2 b/roles/openshift_hosted/templates/registry_config.j2 index ea5626642..5aa7d025f 100644 --- a/roles/openshift_hosted/templates/registry_config.j2 +++ b/roles/openshift_hosted/templates/registry_config.j2 @@ -58,6 +58,8 @@ auth: openshift: realm: openshift middleware: + registry: + - name: openshift repository: - name: openshift options: @@ -69,4 +71,7 @@ middleware: baseurl: {{ openshift.hosted.registry.storage.s3.cloudfront.baseurl }} privatekey: {{ openshift.hosted.registry.storage.s3.cloudfront.privatekeyfile }} keypairid: {{ openshift.hosted.registry.storage.s3.cloudfront.keypairid }} +{% else %} + storage: + - name: openshift {% endif -%} -- cgit v1.2.3 From 55fa3aafb3028c93fe2c5721217c3d71cf0bfe1a Mon Sep 17 00:00:00 2001 From: Gan Huang Date: Wed, 10 Aug 2016 21:13:36 +0800 Subject: Restrict the middleware stanza contains 'registry' and 'storage' at least on 3.3 --- roles/openshift_hosted/templates/registry_config.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/openshift_hosted/templates/registry_config.j2 b/roles/openshift_hosted/templates/registry_config.j2 index 5aa7d025f..71539775d 100644 --- a/roles/openshift_hosted/templates/registry_config.j2 +++ b/roles/openshift_hosted/templates/registry_config.j2 @@ -58,8 +58,10 @@ auth: openshift: realm: openshift middleware: +{% if openshift.common.version_gte_3_3_or_1_3 | bool %} registry: - name: openshift +{% endif -%} repository: - name: openshift options: @@ -71,7 +73,7 @@ middleware: baseurl: {{ openshift.hosted.registry.storage.s3.cloudfront.baseurl }} privatekey: {{ openshift.hosted.registry.storage.s3.cloudfront.privatekeyfile }} keypairid: {{ openshift.hosted.registry.storage.s3.cloudfront.keypairid }} -{% else %} +{% elif openshift.common.version_gte_3_3_or_1_3 | bool %} storage: - name: openshift {% endif -%} -- cgit v1.2.3