registry_config.j2 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. {% 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: false
  25. secure: true
  26. v4auth: true
  27. rootdirectory: {{ openshift_hosted_registry_storage_s3_rootdirectory | default('/registry') }}
  28. chunksize: "{{ openshift_hosted_registry_storage_s3_chunksize | default(26214400) }}"
  29. {% elif openshift_hosted_registry_storage_provider | default('') == 'azure_blob' %}
  30. azure:
  31. accountname: {{ openshift_hosted_registry_storage_azure_blob_accountname }}
  32. accountkey: {{ openshift_hosted_registry_storage_azure_blob_accountkey }}
  33. container: {{ openshift_hosted_registry_storage_azure_blob_container }}
  34. realm: {{ openshift_hosted_registry_storage_azure_blob_realm }}
  35. {% elif openshift_hosted_registry_storage_provider | default('') == 'swift' %}
  36. swift:
  37. authurl: {{ openshift_hosted_registry_storage_swift_authurl }}
  38. username: {{ openshift_hosted_registry_storage_swift_username }}
  39. password: {{ openshift_hosted_registry_storage_swift_password }}
  40. container: {{ openshift_hosted_registry_storage_swift_container }}
  41. {% if openshift_hosted_registry_storage_swift_region is defined %}
  42. region: {{ openshift_hosted_registry_storage_swift_region }}
  43. {% endif -%}
  44. {% if openshift_hosted_registry_storage_swift_tenant is defined %}
  45. tenant: {{ openshift_hosted_registry_storage_swift_tenant }}
  46. {% endif -%}
  47. {% if openshift_hosted_registry_storage_swift_tenantid is defined %}
  48. tenantid: {{ openshift_hosted_registry_storage_swift_tenantid }}
  49. {% endif -%}
  50. {% if openshift_hosted_registry_storage_swift_domain is defined %}
  51. domain: {{ openshift_hosted_registry_storage_swift_domain }}
  52. {% endif -%}
  53. {% if openshift_hosted_registry_storage_swift_domainid %}
  54. domainid: {{ openshift_hosted_registry_storage_swift_domainid }}
  55. {% endif -%}
  56. {% elif openshift_hosted_registry_storage_provider | default('') == 'gcs' %}
  57. gcs:
  58. bucket: {{ openshift_hosted_registry_storage_gcs_bucket }}
  59. {% if openshift_hosted_registry_storage_gcs_keyfile is defined %}
  60. keyfile: {{ openshift_hosted_registry_storage_gcs_keyfile }}
  61. {% endif -%}
  62. {% if openshift_hosted_registry_storage_gcs_rootdirectory is defined %}
  63. rootdirectory: {{ openshift_hosted_registry_storage_gcs_rootdirectory }}
  64. {% endif -%}
  65. {% endif -%}
  66. auth:
  67. openshift:
  68. realm: openshift
  69. middleware:
  70. {% if openshift.common.version_gte_3_3_or_1_3 | bool %}
  71. registry:
  72. - name: openshift
  73. {% endif %}
  74. repository:
  75. - name: openshift
  76. options:
  77. pullthrough: {{ openshift_hosted_registry_pullthrough | default(true) }}
  78. acceptschema2: {{ openshift_hosted_registry_acceptschema2 | default(true) }}
  79. enforcequota: {{ openshift_hosted_registry_enforcequota | default(false) }}
  80. {% if openshift_hosted_registry_storage_provider | default('') == 's3' and openshift_hosted_registry_storage_s3_cloudfront_baseurl is defined %}
  81. storage:
  82. - name: cloudfront
  83. options:
  84. baseurl: {{ openshift_hosted_registry_storage_s3_cloudfront_baseurl }}
  85. privatekey: /etc/origin/cloudfront.pem
  86. keypairid: {{ openshift_hosted_registry_storage_s3_cloudfront_keypairid }}
  87. {% elif openshift.common.version_gte_3_3_or_1_3 | bool %}
  88. storage:
  89. - name: openshift
  90. {% endif -%}