forked from microsoft/pai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-cache-config.yaml.template
More file actions
47 lines (46 loc) · 1.36 KB
/
docker-cache-config.yaml.template
File metadata and controls
47 lines (46 loc) · 1.36 KB
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
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License
apiVersion: v1
kind: ConfigMap
metadata:
name: registry-config
namespace: default
data:
config.yml: |
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
delete:
enabled: true
{%- if cluster_cfg["docker-cache"]["storage_backend"] == "azure" %}
azure:
accountname: {{ cluster_cfg["docker-cache"]["azure_account_name"] }}
accountkey: {{ cluster_cfg["docker-cache"]["azure_account_key"] }}
container: {{ cluster_cfg["docker-cache"]["azure_container_name"] }}
# realm: core.windows.net
{%- elif cluster_cfg["docker-cache"]["storage_backend"] == "filesystem" %}
filesystem:
rootdirectory: {{ cluster_cfg["docker-cache"]["fs_mount_path"] }}
{%- else %}
{%- endif %}
http:
addr: {{ cluster_cfg["docker-cache"]["registry_listener"] }}
headers:
X-Content-Type-Options: [nosniff]
{%- if cluster_cfg["docker-cache"]["registry-htpasswd"] != '' %}
auth:
htpasswd:
realm: basic-realm
path: /auth/htpasswd # /etc/registry
{%- endif %}
proxy:
remoteurl: {{ cluster_cfg["docker-cache"]["remote_url"] }}
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3