File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 value: " true"
55- name: REGISTRY_LOG_LEVEL
66 value: info
7- - name: " REGISTRY_HTTP_SECRET"
8- valueFrom:
9- secretKeyRef:
10- name: registry-secret
11- key: secret
127- name: " DRYCC_REGISTRY_REDIRECT"
138 valueFrom:
149 secretKeyRef:
2419 secretKeyRef:
2520 name: registry-secret
2621 key: password
22+ {{- if (.Values.storageEndpoint ) }}
2723- name: " DRYCC_STORAGE_LOOKUP"
2824 valueFrom:
2925 secretKeyRef:
30- name: storage-creds
31- key: lookup
26+ name: registry-secret
27+ key: storage- lookup
3228- name: " DRYCC_STORAGE_BUCKET"
3329 valueFrom:
3430 secretKeyRef:
35- name: storage-creds
36- key: registry -bucket
31+ name: registry-secret
32+ key: storage -bucket
3733- name: " DRYCC_STORAGE_ENDPOINT"
3834 valueFrom:
3935 secretKeyRef:
40- name: storage-creds
41- key: endpoint
36+ name: registry-secret
37+ key: storage-endpoint
38+ - name: " DRYCC_STORAGE_ACCESSKEY"
39+ valueFrom:
40+ secretKeyRef:
41+ name: registry-secret
42+ key: storage-accesskey
43+ - name: " DRYCC_STORAGE_SECRETKEY"
44+ valueFrom:
45+ secretKeyRef:
46+ name: registry-secret
47+ key: storage-secretkey
48+ {{- else if .Values.storage.enabled }}
49+ - name: " DRYCC_STORAGE_LOOKUP"
50+ value: " path"
51+ - name: " DRYCC_STORAGE_BUCKET"
52+ value: " registry"
53+ - name: " DRYCC_STORAGE_ENDPOINT"
54+ value: {{ printf " http://drycc-storage.%s .svc.%s :9000" .Release.Namespace .Values.global.clusterDomain }}
4255- name: " DRYCC_STORAGE_ACCESSKEY"
4356 valueFrom:
4457 secretKeyRef:
5063 name: storage-creds
5164 key: secretkey
5265{{- end }}
66+ {{- end }}
5367
5468{{/* Generate registry deployment limits */ }}
5569{{- define " registry.limits" -}}
Original file line number Diff line number Diff line change 1- {{- if eq .Values.global.registryLocation "on-cluster" }}
21apiVersion : batch/v1
32kind : CronJob
43metadata :
4544 boot garbage-collect ${DRYCC_REGISTRY_CONFIG} --dry-run --delete-untagged
4645 {{- end }}
4746 {{- include "registry.envs" . | indent 12 }}
48- {{- end }}
Original file line number Diff line number Diff line change 1- {{- if eq .Values.global.registryLocation "on-cluster" }}
21apiVersion : apps/v1
32kind : Deployment
43metadata :
9190 volumes :
9291 - name : registry-storage
9392 emptyDir : {}
94- {{- end }}
Original file line number Diff line number Diff line change 1- {{- if eq .Values.global.registryLocation "on-cluster" }}
21apiVersion : apps/v1
32kind : DaemonSet
43metadata :
3635 - $(DRYCC_REGISTRY_HOST)
3736 env :
3837 - name : " DRYCC_REGISTRY_HOST"
39- valueFrom :
40- secretKeyRef :
41- name : registry-secret
42- key : host
38+ value : {{ printf "drycc-registry.%s.svc.%s:5000" .Release.Namespace .Values.global.clusterDomain }}
4339 containers :
4440 - name : drycc-registry-proxy
4541 image : {{.Values.imageRegistry}}/{{.Values.imageOrg}}/registry:{{.Values.imageTag}}
9288 {{- end }}
9389 env :
9490 - name : " DRYCC_REGISTRY_HOST"
95- valueFrom :
96- secretKeyRef :
97- name : registry-secret
98- key : host
91+ value : {{ printf "drycc-registry.%s.svc.%s:5000" .Release.Namespace .Values.global.clusterDomain }}
9992 - name : " DRYCC_REGISTRY_USERNAME"
10093 valueFrom :
10194 secretKeyRef :
@@ -109,4 +102,3 @@ spec:
109102 ports :
110103 - containerPort : 8080
111104 hostPort : {{.Values.proxyPort}}
112- {{- end }}
Original file line number Diff line number Diff line change @@ -4,17 +4,15 @@ metadata:
44 name : registry-secret
55 labels :
66 heritage : drycc
7- annotations :
8- drycc.cc/registry-location : " {{ .Values.global.registryLocation }}"
97type : Opaque
108data :
11- {{- if eq .Values.global.registryLocation "on-cluster" }}
12- host : {{ printf "drycc-registry.%s.svc.%s:5000" .Release.Namespace .Values.global.clusterDomain | b64enc }}
13- secret : {{ include "common.secrets.lookup" (dict "secret" "registry-secret" "key" "secret" "defaultValue" (randAlphaNum 32) "context" $) }}
14- {{- else }}
15- host : {{ .Values.host | b64enc }}
16- organization : {{ .Values.organization | b64enc }}
17- {{- end }}
189 username : {{ include "common.secrets.lookup" (dict "secret" "registry-secret" "key" "username" "defaultValue" (.Values.username | default (randAlphaNum 32)) "context" $) }}
1910 password : {{ include "common.secrets.lookup" (dict "secret" "registry-secret" "key" "password" "defaultValue" (.Values.password | default (randAlphaNum 32)) "context" $) }}
2011 redirect : {{ .Values.redirect | b64enc }}
12+ {{- if (.Values.storageEndpoint) }}
13+ storage-lookup : {{ .Values.storageLookup | b64enc }}
14+ storage-bucket : {{ .Values.storageBucket | b64enc }}
15+ storage-endpoint : {{ .Values.storageEndpoint | b64enc }}
16+ storage-accesskey : {{ .Values.storageAccesskey | b64enc }}
17+ storage-secretkey : {{ .Values.storageSecretkey | b64enc }}
18+ {{- end }}
Original file line number Diff line number Diff line change 1- {{- if eq .Values.global.registryLocation "on-cluster" }}
21apiVersion : v1
32kind : ServiceAccount
43metadata :
54 name : drycc-registry
65 labels :
76 heritage : drycc
8- {{- end }}
Original file line number Diff line number Diff line change 1- {{- if eq .Values.global.registryLocation "on-cluster" }}
21apiVersion : v1
32kind : Service
43metadata :
1413 selector :
1514 app : drycc-registry
1615 sessionAffinity : ClientIP
17- {{- end }}
Original file line number Diff line number Diff line change @@ -45,10 +45,17 @@ proxyPort: 5555
4545
4646concurrencyPolicy : " Replace"
4747
48+ # The following parameters will no longer use the built-in storage component.
49+ storageLookup : " auto"
50+ storageBucket : " builder"
51+ storageEndpoint : " "
52+ storageAccesskey : " "
53+ storageSecretkey : " "
54+
55+ storage :
56+ enabled : true
57+
4858# Service
4959service :
5060 # Provide any additional service annotations
5161 annotations : {}
52-
53- global :
54- registryLocation : " on-cluster"
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ echo -e "\\033[32m---> S3 service ${STORAGE_IP}:9000 ready...\\033[0m"
1919podman logs " ${STORAGE_JOB} "
2020
2121REGISTRY_JOB=$( podman run -d --rm \
22- -e REGISTRY_HTTP_SECRET=drycc \
2322 -e DRYCC_REGISTRY_REDIRECT=false \
2423 -e DRYCC_REGISTRY_USERNAME=admin \
2524 -e DRYCC_REGISTRY_PASSWORD=admin \
You can’t perform that action at this time.
0 commit comments