registry_config.j2 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. version: 0.1
  2. log:
  3. level: debug
  4. http:
  5. addr: :5000
  6. storage:
  7. delete:
  8. enabled: true
  9. cache:
  10. blobdescriptor: inmemory
  11. {% if openshift_hosted_registry_storage_provider | default('') == 's3' %}
  12. s3:
  13. accesskey: {{ openshift_hosted_registry_storage_s3_accesskey }}
  14. secretkey: {{ openshift_hosted_registry_storage_s3_secretkey }}
  15. region: {{ openshift_hosted_registry_storage_s3_region }}
  16. {% if openshift_hosted_registry_storage_s3_regionendpoint is defined %}
  17. regionendpoint: {{ openshift_hosted_registry_storage_s3_regionendpoint }}
  18. {% endif %}
  19. bucket: {{ openshift_hosted_registry_storage_s3_bucket }}
  20. encrypt: false
  21. secure: true
  22. v4auth: true
  23. rootdirectory: {{ openshift_hosted_registry_storage_s3_rootdirectory | default('/registry') }}
  24. chunksize: "{{ openshift_hosted_registry_storage_s3_chunksize | default(26214400) }}"
  25. {% elif openshift_hosted_registry_storage_provider | default('') == 'azure_blob' %}
  26. azure:
  27. accountname: {{ openshift_hosted_registry_storage_azure_blob_accountname }}
  28. accountkey: {{ openshift_hosted_registry_storage_azure_blob_accountkey }}
  29. container: {{ openshift_hosted_registry_storage_azure_blob_container }}
  30. realm: {{ openshift_hosted_registry_storage_azure_blob_realm }}
  31. {% elif openshift_hosted_registry_storage_provider | default('') == 'swift' %}
  32. swift:
  33. authurl: {{ openshift_hosted_registry_storage_swift_authurl }}
  34. username: {{ openshift_hosted_registry_storage_swift_username }}
  35. password: {{ openshift_hosted_registry_storage_swift_password }}
  36. container: {{ openshift_hosted_registry_storage_swift_container }}
  37. {% if openshift_hosted_registry_storage_swift_region is defined %}
  38. region: {{ openshift_hosted_registry_storage_swift_region }}
  39. {% endif -%}
  40. {% if openshift_hosted_registry_storage_swift_tenant is defined %}
  41. tenant: {{ openshift_hosted_registry_storage_swift_tenant }}
  42. {% endif -%}
  43. {% if openshift_hosted_registry_storage_swift_tenantid is defined %}
  44. tenantid: {{ openshift_hosted_registry_storage_swift_tenantid }}
  45. {% endif -%}
  46. {% if openshift_hosted_registry_storage_swift_domain is defined %}
  47. domain: {{ openshift_hosted_registry_storage_swift_domain }}
  48. {% endif -%}
  49. {% if openshift_hosted_registry_storage_swift_domainid %}
  50. domainid: {{ openshift_hosted_registry_storage_swift_domainid }}
  51. {% endif -%}
  52. {% elif openshift_hosted_registry_storage_provider | default('') == 'gcs' %}
  53. gcs:
  54. bucket: {{ openshift_hosted_registry_storage_gcs_bucket }}
  55. {% if openshift_hosted_registry_storage_gcs_keyfile is defined %}
  56. keyfile: {{ openshift_hosted_registry_storage_gcs_keyfile }}
  57. {% endif -%}
  58. {% if openshift_hosted_registry_storage_gcs_rootdirectory is defined %}
  59. rootdirectory: {{ openshift_hosted_registry_storage_gcs_rootdirectory }}
  60. {% endif -%}
  61. {% endif -%}
  62. auth:
  63. openshift:
  64. realm: openshift
  65. middleware:
  66. {% if openshift.common.version_gte_3_3_or_1_3 | bool %}
  67. registry:
  68. - name: openshift
  69. {% endif %}
  70. repository:
  71. - name: openshift
  72. options:
  73. pullthrough: {{ openshift_hosted_registry_pullthrough | default(true) }}
  74. acceptschema2: {{ openshift_hosted_registry_acceptschema2 | default(false) }}
  75. enforcequota: {{ openshift_hosted_registry_enforcequota | default(false) }}
  76. {% if openshift_hosted_registry_storage_provider | default('') == 's3' and openshift_hosted_registry_storage_s3_cloudfront_baseurl is defined %}
  77. storage:
  78. - name: cloudfront
  79. options:
  80. baseurl: {{ openshift_hosted_registry_storage_s3_cloudfront_baseurl }}
  81. privatekey: /etc/origin/cloudfront.pem
  82. keypairid: {{ openshift_hosted_registry_storage_s3_cloudfront_keypairid }}
  83. {% elif openshift.common.version_gte_3_3_or_1_3 | bool %}
  84. storage:
  85. - name: openshift
  86. {% endif -%}