Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference full vars for registry object storage. #2624

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions roles/openshift_hosted/templates/registry_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,55 @@ storage:
enabled: true
cache:
blobdescriptor: inmemory
{% if openshift.hosted.registry.storage.provider == 's3' %}
{% if openshift_hosted_registry_storage_provider | default('') == 's3' %}
s3:
accesskey: {{ openshift.hosted.registry.storage.s3.accesskey }}
secretkey: {{ openshift.hosted.registry.storage.s3.secretkey }}
region: {{ openshift.hosted.registry.storage.s3.region }}
{% if 'regionendpoint' in openshift.hosted.registry.storage.s3 %}
regionendpoint: {{ openshift.hosted.registry.storage.s3.regionendpoint }}
accesskey: {{ openshift_hosted_registry_storage_s3_accesskey }}
secretkey: {{ openshift_hosted_registry_storage_s3_secretkey }}
region: {{ openshift_hosted_registry_storage_s3_region }}
{% if openshift_hosted_registry_storage_s3_regionendpoint is defined %}
regionendpoint: {{ openshift_hosted_registry_storage_s3_regionendpoint }}
{% endif %}
bucket: {{ openshift.hosted.registry.storage.s3.bucket }}
bucket: {{ openshift_hosted_registry_storage_s3_bucket }}
encrypt: false
secure: true
v4auth: true
rootdirectory: {{ openshift.hosted.registry.storage.s3.rootdirectory | default('/registry') }}
chunksize: "{{ openshift.hosted.registry.storage.s3.chunksize | default(26214400) }}"
{% elif openshift.hosted.registry.storage.provider == 'azure_blob' %}
rootdirectory: {{ openshift_hosted_registry_storage_s3_rootdirectory | default('/registry') }}
chunksize: "{{ openshift_hosted_registry_storage_s3_chunksize | default(26214400) }}"
{% elif openshift_hosted_registry_storage_provider | default('') == 'azure_blob' %}
azure:
accountname: {{ openshift.hosted.registry.storage.azure_blob.accountname }}
accountkey: {{ openshift.hosted.registry.storage.azure_blob.accountkey }}
container: {{ openshift.hosted.registry.storage.azure_blob.container }}
realm: {{ openshift.hosted.registry.storage.azure_blob.realm }}
{% elif openshift.hosted.registry.storage.provider == 'swift' %}
accountname: {{ openshift_hosted_registry_storage_azure_blob_accountname }}
accountkey: {{ openshift_hosted_registry_storage_azure_blob_accountkey }}
container: {{ openshift_hosted_registry_storage_azure_blob_container }}
realm: {{ openshift_hosted_registry_storage_azure_blob_realm }}
{% elif openshift_hosted_registry_storage_provider | default('') == 'swift' %}
swift:
authurl: {{ openshift.hosted.registry.storage.swift.authurl }}
username: {{ openshift.hosted.registry.storage.swift.username }}
password: {{ openshift.hosted.registry.storage.swift.password }}
container: {{ openshift.hosted.registry.storage.swift.container }}
{% if 'region' in openshift.hosted.registry.storage.swift %}
region: {{ openshift.hosted.registry.storage.swift.region }}
authurl: {{ openshift_hosted_registry_storage_swift_authurl }}
username: {{ openshift_hosted_registry_storage_swift_username }}
password: {{ openshift_hosted_registry_storage_swift_password }}
container: {{ openshift_hosted_registry_storage_swift_container }}
{% if openshift_hosted_registry_storage_swift_region is defined %}
region: {{ openshift_hosted_registry_storage_swift_region }}
{% endif -%}
{% if 'tenant' in openshift.hosted.registry.storage.swift %}
tenant: {{ openshift.hosted.registry.storage.swift.tenant }}
{% if openshift_hosted_registry_storage_swift_tenant is defined %}
tenant: {{ openshift_hosted_registry_storage_swift_tenant }}
{% endif -%}
{% if 'tenantid' in openshift.hosted.registry.storage.swift %}
tenantid: {{ openshift.hosted.registry.storage.swift.tenantid }}
{% if openshift_hosted_registry_storage_swift_tenantid is defined %}
tenantid: {{ openshift_hosted_registry_storage_swift_tenantid }}
{% endif -%}
{% if 'domain' in openshift.hosted.registry.storage.swift %}
domain: {{ openshift.hosted.registry.storage.swift.domain }}
{% if openshift_hosted_registry_storage_swift_domain is defined %}
domain: {{ openshift_hosted_registry_storage_swift_domain }}
{% endif -%}
{% if 'domainid' in openshift.hosted.registry.storage.swift %}
domainid: {{ openshift.hosted.registry.storage.swift.domainid }}
{% if openshift_hosted_registry_storage_swift_domainid %}
domainid: {{ openshift_hosted_registry_storage_swift_domainid }}
{% endif -%}
{% elif openshift.hosted.registry.storage.provider == 'gcs' %}
{% elif openshift_hosted_registry_storage_provider | default('') == 'gcs' %}
gcs:
bucket: {{ openshift.hosted.registry.storage.gcs.bucket }}
{% if 'keyfile' in openshift.hosted.registry.storage.gcs %}
keyfile: {{ openshift.hosted.registry.storage.gcs.keyfile }}
bucket: {{ openshift_hosted_registry_storage_gcs_bucket }}
{% if openshift_hosted_registry_storage_gcs_keyfile is defined %}
keyfile: {{ openshift_hosted_registry_storage_gcs_keyfile }}
{% endif -%}
{% if 'rootdirectory' in openshift.hosted.registry.storage.gcs %}
rootdirectory: {{ openshift.hosted.registry.storage.gcs.rootdirectory }}
{% if openshift_hosted_registry_storage_gcs_rootdirectory is defined %}
rootdirectory: {{ openshift_hosted_registry_storage_gcs_rootdirectory }}
{% endif -%}
{% endif -%}
auth:
Expand All @@ -70,16 +70,16 @@ middleware:
repository:
- name: openshift
options:
pullthrough: {{ openshift.hosted.registry.pullthrough | default(true) }}
acceptschema2: {{ openshift.hosted.registry.acceptschema2 | default(false) }}
enforcequota: {{ openshift.hosted.registry.enforcequota | default(false) }}
{% if openshift.hosted.registry.storage.provider == 's3' and 'cloudfront' in openshift.hosted.registry.storage.s3 %}
pullthrough: {{ openshift_hosted_registry_pullthrough | default(true) }}
acceptschema2: {{ openshift_hosted_registry_acceptschema2 | default(false) }}
enforcequota: {{ openshift_hosted_registry_enforcequota | default(false) }}
{% if openshift_hosted_registry_storage_provider | default('') == 's3' and openshift_hosted_registry_storage_s3_cloudfront_baseurl is defined %}
storage:
- name: cloudfront
options:
baseurl: {{ openshift.hosted.registry.storage.s3.cloudfront.baseurl }}
privatekey: {{ openshift.hosted.registry.storage.s3.cloudfront.privatekeyfile }}
keypairid: {{ openshift.hosted.registry.storage.s3.cloudfront.keypairid }}
baseurl: {{ openshift_hosted_registry_storage_s3_cloudfront_baseurl }}
privatekey: {{ openshift_hosted_registry_storage_s3_cloudfront_privatekeyfile }}
keypairid: {{ openshift_hosted_registry_storage_s3_cloudfront_keypairid }}
{% elif openshift.common.version_gte_3_3_or_1_3 | bool %}
storage:
- name: openshift
Expand Down