1+ #
2+ # Copyright (c) 2021 Red Hat, Inc.
3+ # This program and the accompanying materials are made
4+ # available under the terms of the Eclipse Public License 2.0
5+ # which is available at https://www.eclipse.org/legal/epl-2.0/
6+ #
7+ # SPDX-License-Identifier: EPL-2.0
8+ #
9+ ---
10+ apiVersion : v1
11+ kind : Template
12+ metadata :
13+ name : devfile-registry
14+ objects :
15+ - apiVersion : apps/v1
16+ kind : Deployment
17+ metadata :
18+ labels :
19+ app : devfile-registry
20+ name : devfile-registry
21+ spec :
22+ replicas : ${{REPLICAS}}
23+ selector :
24+ matchLabels :
25+ app : devfile-registry
26+ strategy :
27+ type : RollingUpdate
28+ rollingUpdate :
29+ maxSurge : 25%
30+ maxUnavailable : 25%
31+ template :
32+ metadata :
33+ labels :
34+ app : devfile-registry
35+ spec :
36+ volumes :
37+ - name : devfile-registry-storage
38+ emptyDir : {}
39+ - name : config
40+ configMap :
41+ name : devfile-registry
42+ items :
43+ - key : registry-config.yml
44+ path : config.yml
45+ containers :
46+ - image : ${DEVFILE_INDEX_IMAGE}:${DEVFILE_INDEX_IMAGE_TAG}
47+ imagePullPolicy : " ${DEVFILE_INDEX_PULL_POLICY}"
48+ name : devfile-registry
49+ ports :
50+ - containerPort : 8080
51+ livenessProbe :
52+ httpGet :
53+ path : /
54+ port : 8080
55+ initialDelaySeconds : 30
56+ periodSeconds : 10
57+ timeoutSeconds : 3
58+ readinessProbe :
59+ httpGet :
60+ path : /
61+ port : 8080
62+ initialDelaySeconds : 3
63+ periodSeconds : 10
64+ timeoutSeconds : 3
65+ resources :
66+ requests :
67+ cpu : 1m
68+ memory : 5Mi
69+ limits :
70+ cpu : 100m
71+ memory : ${DEVFILE_INDEX_MEMORY_LIMIT}
72+ - image : ${OCI_REGISTRY_IMAGE}:${OCI_REGISTRY_IMAGE_TAG}
73+ imagePullPolicy : " ${OCI_REGISTRY_PULL_POLICY}"
74+ name : oci-registry
75+ livenessProbe :
76+ httpGet :
77+ path : /v2/
78+ port : 5000
79+ initialDelaySeconds : 30
80+ periodSeconds : 10
81+ timeoutSeconds : 3
82+ readinessProbe :
83+ httpGet :
84+ path : /v2/
85+ port : 5000
86+ initialDelaySeconds : 3
87+ periodSeconds : 10
88+ timeoutSeconds : 3
89+ resources :
90+ requests :
91+ cpu : 1m
92+ memory : 5Mi
93+ limits :
94+ cpu : 100m
95+ memory : ${OCI_REGISTRY_MEMORY_LIMIT}
96+ volumeMounts :
97+ - name : devfile-registry-storage
98+ mountPath : " /var/lib/registry"
99+ - name : config
100+ mountPath : " /etc/docker/registry"
101+ readOnly : true
102+ - apiVersion : v1
103+ kind : Service
104+ metadata :
105+ name : devfile-registry
106+ labels :
107+ app : devfile-registry
108+ spec :
109+ ports :
110+ - name : http
111+ protocol : TCP
112+ port : 8080
113+ targetPort : 8080
114+ - name : oci-metrics
115+ protocol : TCP
116+ port : 5001
117+ targetPort : 5001
118+ - name : index-metrics
119+ protocol : TCP
120+ port : 7071
121+ targetPort : 7071
122+ selector :
123+ app : devfile-registry
124+ - apiVersion : v1
125+ kind : ConfigMap
126+ metadata :
127+ name : devfile-registry
128+ annotations :
129+ qontract.recycle : " true"
130+ data :
131+ registry-config.yml : |
132+ version: 0.1
133+ log:
134+ fields:
135+ service: registry
136+ storage:
137+ cache:
138+ blobdescriptor: inmemory
139+ filesystem:
140+ rootdirectory: /var/lib/registry
141+ http:
142+ addr: :5000
143+ headers:
144+ X-Content-Type-Options: [nosniff]
145+ debug:
146+ addr: :5001
147+ prometheus:
148+ enabled: true
149+ path: /metrics
150+
151+ parameters :
152+ - name : DEVFILE_INDEX_IMAGE
153+ value : quay.io/app-sre/product-devfile-index
154+ displayName : Devfile registry index image
155+ description : Devfile registry index docker image. Defaults to quay.io/devfile/devfile-index
156+ - name : DEVFILE_INDEX_IMAGE_TAG
157+ value : next
158+ displayName : Devfile registry version
159+ description : Devfile registry version which defaults to next
160+ - name : DEVFILE_INDEX_MEMORY_LIMIT
161+ value : 256Mi
162+ displayName : Memory Limit
163+ description : Maximum amount of memory the container can use. Defaults 256Mi
164+ - name : DEVFILE_INDEX_PULL_POLICY
165+ value : Always
166+ displayName : Devfile registry image pull policy
167+ description : Always pull by default. Can be IfNotPresent
168+ - name : OCI_REGISTRY_IMAGE
169+ value : quay.io/devfile/oci-registry
170+ displayName : OCI registry index image
171+ description : OCI registry index docker image. Defaults to quay.io/devfile/devfile-index
172+ - name : OCI_REGISTRY_IMAGE_TAG
173+ value : next
174+ displayName : OCI registry version
175+ description : OCI registry version which defaults to next
176+ - name : OCI_REGISTRY_MEMORY_LIMIT
177+ value : 256Mi
178+ displayName : Memory Limit
179+ description : Maximum amount of memory the OCI registry container can use. Defaults 256Mi
180+ - name : OCI_REGISTRY_PULL_POLICY
181+ value : Always
182+ displayName : Devfile registry image pull policy
183+ description : Always pull by default. Can be IfNotPresent
184+ - name : REPLICAS
185+ value : " 1"
186+ displayName : Devfile registry replicas
187+ description : The number of replicas for the hosted devfile registry service
0 commit comments