@@ -49,12 +49,12 @@ objects:
4949 items :
5050 - key : registry-config.yml
5151 path : config.yml
52- - name : viewer-config
52+ - name : viewer-env-file
5353 configMap :
5454 name : devfile-registry
5555 items :
56- - key : devfile- registry-hosts.json
57- path : devfile-registry-hosts.json
56+ - key : .env. registry-viewer
57+ path : .env.local
5858 containers :
5959 - image : ${DEVFILE_INDEX_IMAGE}:${IMAGE_TAG}
6060 imagePullPolicy : " ${DEVFILE_INDEX_PULL_POLICY}"
@@ -84,14 +84,6 @@ objects:
8484 initialDelaySeconds : 15
8585 periodSeconds : 10
8686 timeoutSeconds : 3
87- startupProbe :
88- httpGet :
89- path : /viewer
90- port : 8080
91- scheme : HTTP
92- initialDelaySeconds : 30
93- periodSeconds : 10
94- timeoutSeconds : 10
9587 resources :
9688 requests :
9789 cpu : 100m
@@ -100,20 +92,60 @@ objects:
10092 cpu : 250m
10193 memory : ${DEVFILE_INDEX_MEMORY_LIMIT}
10294 env :
103- - name : DEVFILE_VIEWER_ROOT
104- value : " /viewer"
10595 - name : ENABLE_TELEMETRY
10696 value : ${ENABLE_TELEMETRY}
10797 - name : REGISTRY_NAME
10898 value : ${REGISTRY_NAME}
109- - name : ANALYTICS_WRITE_KEY
110- value : ${ANALYTICS_WRITE_KEY}
11199 - name : TELEMETRY_KEY
112100 value : ${TELEMETRY_KEY}
101+ - image : ${REGISTRY_VIEWER_IMAGE}:${IMAGE_TAG}
102+ imagePullPolicy : " ${REGISTRY_VIEWER_PULL_POLICY}"
103+ name : devfile-registry-viewer
104+ ports :
105+ - containerPort : 3000
106+ securityContext :
107+ allowPrivilegeEscalation : false
108+ runAsNonRoot : true
109+ capabilities :
110+ drop : ["ALL"]
111+ seccompProfile :
112+ type : " RuntimeDefault"
113+ livenessProbe :
114+ httpGet :
115+ path : /viewer
116+ port : 3000
117+ scheme : HTTP
118+ initialDelaySeconds : 15
119+ periodSeconds : 10
120+ timeoutSeconds : 3
121+ readinessProbe :
122+ httpGet :
123+ path : /viewer
124+ port : 3000
125+ scheme : HTTP
126+ initialDelaySeconds : 15
127+ periodSeconds : 10
128+ timeoutSeconds : 3
129+ startupProbe :
130+ httpGet :
131+ path : /viewer
132+ port : 3000
133+ scheme : HTTP
134+ initialDelaySeconds : 30
135+ periodSeconds : 10
136+ timeoutSeconds : 10
137+ resources :
138+ requests :
139+ cpu : 100m
140+ memory : 64Mi
141+ limits :
142+ cpu : 250m
143+ memory : ${REGISTRY_VIEWER_MEMORY_LIMIT}
113144 volumeMounts :
114- - name : viewer-config
115- mountPath : " /app/config"
116- readOnly : false
145+ - name : viewer-env-file
146+ mountPath : /app/apps/registry-viewer/.env.local
147+ subPath : .env.local
148+ readOnly : true
117149 - image : ${OCI_REGISTRY_IMAGE}:${OCI_REGISTRY_IMAGE_TAG}
118150 imagePullPolicy : " ${OCI_REGISTRY_PULL_POLICY}"
119151 name : oci-registry
@@ -201,13 +233,10 @@ objects:
201233 enabled: true
202234 path: /metrics
203235
204- devfile-registry-hosts.json : |
205- {
206- "Community": {
207- "url": "http://localhost:8080",
208- "alias": "${REGISTRY_HOST_ALIAS}"
209- }
210- }
236+ .env.registry-viewer : |
237+ ANALYTICS_WRITE_KEY=${ANALYTICS_WRITE_KEY}
238+ DEVFILE_REGISTRIES=[{"name":"Community","url":"http://localhost:8080","fqdn":"${REGISTRY_HOST_ALIAS}"}]
239+
211240 - apiVersion : v1
212241 kind : ServiceAccount
213242 metadata :
@@ -219,10 +248,10 @@ parameters:
219248 value : quay.io/devfile/devfile-index
220249 displayName : Devfile registry index image
221250 description : Devfile registry index docker image. Defaults to quay.io/devfile/devfile-index
222- - name : DEVFILE_INDEX_IMAGE_TAG
223- value : next
224- displayName : Devfile registry version
225- description : Devfile registry version which defaults to next
251+ - name : REGISTRY_VIEWER_IMAGE
252+ value : quay.io/devfile/registry-viewer
253+ displayName : Devfile registry viewer image
254+ description : Devfile registry viewer docker image. Defaults to quay.io/devfile/registry-viewer
226255- name : IMAGE_TAG
227256 value : next
228257 displayName : Devfile registry version
@@ -235,6 +264,14 @@ parameters:
235264 value : Always
236265 displayName : Devfile registry image pull policy
237266 description : Always pull by default. Can be IfNotPresent
267+ - name : REGISTRY_VIEWER_MEMORY_LIMIT
268+ value : 256Mi
269+ displayName : Memory Limit
270+ description : Maximum amount of memory the registry viewer container can use. Defaults 256Mi
271+ - name : REGISTRY_VIEWER_PULL_POLICY
272+ value : Always
273+ displayName : Devfile registry viewer image pull policy
274+ description : Always pull by default. Can be IfNotPresent
238275- name : OCI_REGISTRY_IMAGE
239276 value : quay.io/devfile/oci-registry
240277 displayName : OCI registry index image
@@ -249,7 +286,7 @@ parameters:
249286 description : Maximum amount of memory the OCI registry container can use. Defaults 256Mi
250287- name : OCI_REGISTRY_PULL_POLICY
251288 value : Always
252- displayName : Devfile registry image pull policy
289+ displayName : OCI registry image pull policy
253290 description : Always pull by default. Can be IfNotPresent
254291- name : REPLICAS
255292 value : " 1"
0 commit comments