Browse Source

Restrict the middleware stanza contains 'registry' and 'storage' at least on 3.3

Gan Huang 8 years ago
parent
commit
55fa3aafb3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      roles/openshift_hosted/templates/registry_config.j2

+ 3 - 1
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 -%}