Skip to content

Commit 1cbc1ef

Browse files
Fix regcache for registry 3.x config loading (#1285)
registry:3 ignores REGISTRY_CONFIGURATION_PATH and serves the built-in /etc/distribution/config.yml, so the pull-through proxy config was never loaded (every pull returned manifest unknown). Pass the config path as an arg instead, and add the age/interval/dryrun/dontcleanuptmpdir fields that 3.x requires when uploadpurging is enabled. Signed-off-by: Arnob Kumar Saha <arnob@appscode.com> Signed-off-by: Tamal Saha <tamal@appscode.com> Co-authored-by: Tamal Saha <tamal@appscode.com>
1 parent 39ea171 commit 1cbc1ef

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

charts/regcache/templates/configmap.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ data:
2121
maintenance:
2222
uploadpurging:
2323
enabled: true
24+
age: 72h
25+
interval: 24h
26+
dryrun: false
27+
dontcleanuptmpdir: false
2428
http:
2529
addr: :5000
2630
headers:

charts/regcache/templates/deployment.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ spec:
4040
{{- end }}
4141
image: "{{ include "regcache.image.registry" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
4242
imagePullPolicy: {{ .Values.image.pullPolicy }}
43+
args: ["serve", "/etc/docker/registry/config.yml"]
4344
ports:
4445
- name: registry
4546
containerPort: 5000
4647
protocol: TCP
47-
env:
48-
- name: REGISTRY_CONFIGURATION_PATH
49-
value: /etc/docker/registry/config.yml
5048
{{- if .Values.username }}
49+
env:
5150
- name: REGISTRY_PROXY_USERNAME
5251
valueFrom:
5352
secretKeyRef:

0 commit comments

Comments
 (0)