Skip to content

Commit 73717c7

Browse files
env file added to configmap, replaces registry viewer env vars.
Signed-off-by: Michael Valdron <[email protected]>
1 parent 2e2daae commit 73717c7

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.ci/deploy/devfile-registry.yaml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ objects:
4949
items:
5050
- key: registry-config.yml
5151
path: config.yml
52+
- name: viewer-env-file
53+
configMap:
54+
name: devfile-registry
55+
items:
56+
- key: .env.registry-viewer
57+
path: .env.local
5258
containers:
5359
- image: ${DEVFILE_INDEX_IMAGE}:${IMAGE_TAG}
5460
imagePullPolicy: "${DEVFILE_INDEX_PULL_POLICY}"
@@ -128,16 +134,10 @@ objects:
128134
limits:
129135
cpu: 250m
130136
memory: ${REGISTRY_VIEWER_MEMORY_LIMIT}
131-
env:
132-
- name: NEXT_PUBLIC_BASE_PATH
133-
value: "/viewer"
134-
- name: NEXT_PUBLIC_DEVFILE_REGISTRIES
135-
valueFrom:
136-
configMapKeyRef:
137-
name: devfile-registry
138-
key: devfile-registry-hosts.json
139-
- name: NEXT_PUBLIC_ANALYTICS_WRITE_KEY
140-
value: ${ANALYTICS_WRITE_KEY}
137+
volumeMounts:
138+
- name: viewer-env-file
139+
mountPath: /app/apps/registry-viewer/.env.local
140+
subPath: .env.local
141141
- image: ${OCI_REGISTRY_IMAGE}:${OCI_REGISTRY_IMAGE_TAG}
142142
imagePullPolicy: "${OCI_REGISTRY_PULL_POLICY}"
143143
name: oci-registry
@@ -225,14 +225,10 @@ objects:
225225
enabled: true
226226
path: /metrics
227227
228-
devfile-registry-hosts.json: |
229-
[
230-
{
231-
"name": "Community",
232-
"url": "http://localhost:8080",
233-
"fqdn": "${REGISTRY_HOST_ALIAS}"
234-
}
235-
]
228+
.env.registry-viewer: |
229+
ANALYTICS_WRITE_KEY=${ANALYTICS_WRITE_KEY}
230+
DEVFILE_REGISTRIES=[{"name":"Community","url":"http://localhost:8080","fqdn":"${REGISTRY_HOST_ALIAS}"}]
231+
236232
- apiVersion: v1
237233
kind: ServiceAccount
238234
metadata:

0 commit comments

Comments
 (0)