registry_config.j2 4.2 KB

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