Skip to content

Commit 65a69ea

Browse files
committed
feat(registry): add initContainers
1 parent 7524539 commit 65a69ea

1 file changed

Lines changed: 40 additions & 31 deletions

File tree

charts/registry/templates/registry-deployment.yaml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,53 @@ spec:
2323
app: drycc-registry
2424
spec:
2525
serviceAccount: drycc-registry
26+
initContainers:
27+
- name: drycc-registry-init
28+
image: docker.io/drycc/python-dev:latest
29+
imagePullPolicy: {{.Values.image_pull_policy}}
30+
command:
31+
- netcat
32+
- -v
33+
- -a
34+
- $(DRYCC_MINIO_SERVICE_HOST):$(DRYCC_MINIO_SERVICE_PORT)
2635
containers:
27-
- name: drycc-registry
28-
image: {{.Values.image_registry}}/{{.Values.image_org}}/registry:{{.Values.image_tag}}
29-
imagePullPolicy: {{.Values.image_pull_policy}}
36+
- name: drycc-registry
37+
image: {{.Values.image_registry}}/{{.Values.image_org}}/registry:{{.Values.image_tag}}
38+
imagePullPolicy: {{.Values.image_pull_policy}}
3039
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
31-
resources:
32-
limits:
40+
resources:
41+
limits:
3342
{{- if (.Values.limits_cpu) }}
34-
cpu: {{.Values.limits_cpu}}
43+
cpu: {{.Values.limits_cpu}}
3544
{{- end}}
3645
{{- if (.Values.limits_memory) }}
37-
memory: {{.Values.limits_memory}}
46+
memory: {{.Values.limits_memory}}
3847
{{- end}}
3948
{{- end}}
40-
livenessProbe:
41-
httpGet:
42-
path: /v2/
43-
port: 5000
44-
initialDelaySeconds: 1
45-
timeoutSeconds: 1
46-
readinessProbe:
47-
httpGet:
48-
path: /v2/
49-
port: 5000
50-
initialDelaySeconds: 1
51-
timeoutSeconds: 1
52-
env:
53-
- name: REGISTRY_STORAGE_DELETE_ENABLED
54-
value: "true"
55-
- name: REGISTRY_LOG_LEVEL
56-
value: info
57-
ports:
58-
- containerPort: 5000
59-
volumeMounts:
60-
- name: registry-storage
61-
mountPath: /var/lib/registry
62-
- name: objectstorage-creds
63-
mountPath: /var/run/secrets/drycc/objectstore/creds
49+
livenessProbe:
50+
httpGet:
51+
path: /v2/
52+
port: 5000
53+
initialDelaySeconds: 1
54+
timeoutSeconds: 1
55+
readinessProbe:
56+
httpGet:
57+
path: /v2/
58+
port: 5000
59+
initialDelaySeconds: 1
60+
timeoutSeconds: 1
61+
env:
62+
- name: REGISTRY_STORAGE_DELETE_ENABLED
63+
value: "true"
64+
- name: REGISTRY_LOG_LEVEL
65+
value: info
66+
ports:
67+
- containerPort: 5000
68+
volumeMounts:
69+
- name: registry-storage
70+
mountPath: /var/lib/registry
71+
- name: objectstorage-creds
72+
mountPath: /var/run/secrets/drycc/objectstore/creds
6473
volumes:
6574
- name: registry-storage
6675
emptyDir: {}

0 commit comments

Comments
 (0)