registry_config.j2 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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: {{ 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 %}
  57. domainid: {{ openshift_hosted_registry_storage_swift_domainid }}
  58. {% endif -%}
  59. {% elif openshift_hosted_registry_storage_provider | default('') == 'gcs' %}
  60. gcs:
  61. bucket: {{ openshift_hosted_registry_storage_gcs_bucket }}
  62. {% if openshift_hosted_registry_storage_gcs_keyfile is defined %}
  63. keyfile: /etc/registry/gcs.json
  64. {% endif -%}
  65. {% if openshift_hosted_registry_storage_gcs_rootdirectory is defined %}
  66. rootdirectory: {{ openshift_hosted_registry_storage_gcs_rootdirectory }}
  67. {% endif -%}
  68. {% endif -%}
  69. auth:
  70. openshift:
  71. realm: openshift
  72. middleware:
  73. {% if openshift.common.version_gte_3_3_or_1_3 | bool %}
  74. registry:
  75. - name: openshift
  76. {% endif %}
  77. repository:
  78. - name: openshift
  79. options:
  80. pullthrough: {{ openshift_hosted_registry_pullthrough | default(true) }}
  81. acceptschema2: {{ openshift_hosted_registry_acceptschema2 | default(true) }}
  82. enforcequota: {{ openshift_hosted_registry_enforcequota | default(false) }}
  83. {% if openshift_hosted_registry_storage_provider | default('') == 's3' and openshift_hosted_registry_storage_s3_cloudfront_baseurl is defined %}
  84. storage:
  85. - name: cloudfront
  86. options:
  87. baseurl: {{ openshift_hosted_registry_storage_s3_cloudfront_baseurl }}
  88. privatekey: /etc/origin/cloudfront.pem
  89. keypairid: {{ openshift_hosted_registry_storage_s3_cloudfront_keypairid }}
  90. {% elif openshift.common.version_gte_3_3_or_1_3 | bool %}
  91. storage:
  92. - name: openshift
  93. {% endif -%}