summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted/templates/registry_config.j2
blob: dc8a9f089390d4bea5bfefe0ebd7dd4623431f84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: 0.1
log:
  level: debug
http:
  addr: :5000
storage:
  delete:
    enabled: true
  cache:
    blobdescriptor: inmemory
{% if openshift_hosted_registry_storage_provider | default('') == 's3' %}
  s3:
{%   if openshift_hosted_registry_storage_s3_accesskey is defined %}
    accesskey: {{ openshift_hosted_registry_storage_s3_accesskey }}
{%   endif %}
{%   if openshift_hosted_registry_storage_s3_secretkey is defined %}
    secretkey: {{ openshift_hosted_registry_storage_s3_secretkey }}
{%   endif %}
    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 }}
    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 | 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 | 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 openshift_hosted_registry_storage_swift_region is defined %}
    region: {{ openshift_hosted_registry_storage_swift_region }}
{%   endif -%}
{%   if openshift_hosted_registry_storage_swift_tenant is defined %}
    tenant: {{ openshift_hosted_registry_storage_swift_tenant }}
{%   endif -%}
{%   if openshift_hosted_registry_storage_swift_tenantid is defined %}
    tenantid: {{ openshift_hosted_registry_storage_swift_tenantid }}
{%   endif -%}
{%   if openshift_hosted_registry_storage_swift_domain is defined %}
    domain: {{ openshift_hosted_registry_storage_swift_domain }}
{%   endif -%}
{%   if openshift_hosted_registry_storage_swift_domainid %}
    domainid: {{ openshift_hosted_registry_storage_swift_domainid }}
{%   endif -%}
{% elif openshift_hosted_registry_storage_provider | default('') == 'gcs' %}
  gcs:
    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 openshift_hosted_registry_storage_gcs_rootdirectory is defined %}
    rootdirectory: {{ openshift_hosted_registry_storage_gcs_rootdirectory }}
{%   endif -%}
{% endif -%}
auth:
  openshift:
    realm: openshift
middleware:
{% if openshift.common.version_gte_3_3_or_1_3 | bool %}
  registry:
  - name: openshift
{% endif %}
  repository:
  - name: openshift
    options:
      pullthrough: {{ openshift_hosted_registry_pullthrough | default(true) }}
      acceptschema2: {{ openshift_hosted_registry_acceptschema2 | default(true) }}
      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: /etc/origin/cloudfront.pem
      keypairid: {{ openshift_hosted_registry_storage_s3_cloudfront_keypairid }}
{% elif openshift.common.version_gte_3_3_or_1_3 | bool %}
  storage:
  - name: openshift
{% endif -%}