Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit b65dfce

Browse files
authored
Merge pull request #7 from johnmcollier/updateTemplates
Update OpenShift templates for registry
2 parents 3c51c2d + 23a8559 commit b65dfce

File tree

3 files changed

+106
-10
lines changed

3 files changed

+106
-10
lines changed

.ci/deploy/devfile-registry.yaml

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ objects:
4242
items:
4343
- key: registry-config.yml
4444
path: config.yml
45+
- name: viewer-config
46+
configMap:
47+
name: devfile-registry
48+
items:
49+
- key: devfile-registry-hosts.json
50+
path: devfile-registry-hosts.json
4551
containers:
4652
- image: ${DEVFILE_INDEX_IMAGE}:${DEVFILE_INDEX_IMAGE_TAG}
4753
imagePullPolicy: "${DEVFILE_INDEX_PULL_POLICY}"
@@ -50,38 +56,59 @@ objects:
5056
- containerPort: 8080
5157
livenessProbe:
5258
httpGet:
53-
path: /
59+
path: /health
5460
port: 8080
55-
initialDelaySeconds: 30
61+
scheme: HTTP
62+
initialDelaySeconds: 15
5663
periodSeconds: 10
5764
timeoutSeconds: 3
5865
readinessProbe:
5966
httpGet:
60-
path: /
67+
path: /health
6168
port: 8080
62-
initialDelaySeconds: 3
69+
scheme: HTTP
70+
initialDelaySeconds: 15
6371
periodSeconds: 10
6472
timeoutSeconds: 3
73+
startupProbe:
74+
httpGet:
75+
path: /viewer
76+
port: 8080
77+
scheme: HTTP
78+
initialDelaySeconds: 30
79+
periodSeconds: 10
80+
timeoutSeconds: 10
6581
resources:
6682
requests:
67-
cpu: 1m
68-
memory: 5Mi
69-
limits:
7083
cpu: 100m
84+
memory: 64Mi
85+
limits:
86+
cpu: 250m
7187
memory: ${DEVFILE_INDEX_MEMORY_LIMIT}
88+
env:
89+
- name: DEVFILE_VIEWER_ROOT
90+
value: "/viewer"
91+
- name: ENABLE_TELEMETRY
92+
value: ${ENABLE_TELEMETRY}
93+
- name: REGISTRY_NAME
94+
value: ${REGISTRY_NAME}
95+
volumeMounts:
96+
- name: viewer-config
97+
mountPath: "/app/config"
98+
readOnly: false
7299
- image: ${OCI_REGISTRY_IMAGE}:${OCI_REGISTRY_IMAGE_TAG}
73100
imagePullPolicy: "${OCI_REGISTRY_PULL_POLICY}"
74101
name: oci-registry
75102
livenessProbe:
76103
httpGet:
77-
path: /v2/
104+
path: /v2
78105
port: 5000
79106
initialDelaySeconds: 30
80107
periodSeconds: 10
81108
timeoutSeconds: 3
82109
readinessProbe:
83110
httpGet:
84-
path: /v2/
111+
path: /v2
85112
port: 5000
86113
initialDelaySeconds: 3
87114
periodSeconds: 10
@@ -148,6 +175,13 @@ objects:
148175
enabled: true
149176
path: /metrics
150177
178+
devfile-registry-hosts.json: |
179+
{
180+
"Community": {
181+
"url": "http://localhost:8080"
182+
}
183+
}
184+
151185
parameters:
152186
- name: DEVFILE_INDEX_IMAGE
153187
value: quay.io/app-sre/product-devfile-index
@@ -184,4 +218,12 @@ parameters:
184218
- name: REPLICAS
185219
value: "1"
186220
displayName: Devfile registry replicas
187-
description: The number of replicas for the hosted devfile registry service
221+
description: The number of replicas for the hosted devfile registry service
222+
- name: ENABLE_TELEMETRY
223+
value: "false"
224+
displayName: Devfile registry telemetry enablement
225+
description: Option to opt in or opt out devfile registry telemetry
226+
- name: REGISTRY_NAME
227+
value: devfile-community-registry
228+
displayName: Devfile registry name
229+
description: The registry name that is used as identifier for devfile telemetry

.ci/deploy/route.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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: v1
16+
kind: Route
17+
metadata:
18+
labels:
19+
app: devfile-registry
20+
name: devfile-registry
21+
spec:
22+
host: ${DEVFILE_REGISTRY_HOST}
23+
to:
24+
kind: Service
25+
name: devfile-registry
26+
weight: 100
27+
port:
28+
targetPort: 8080
29+
- apiVersion: v1
30+
kind: Route
31+
metadata:
32+
labels:
33+
app: devfile-registry
34+
name: oci-registry
35+
spec:
36+
host: ${DEVFILE_REGISTRY_HOST}
37+
path: /v2
38+
to:
39+
kind: Service
40+
name: devfile-registry
41+
weight: 100
42+
port:
43+
targetPort: 8080
44+
45+
parameters:
46+
- name: DEVFILE_REGISTRY_HOST
47+
value: ""
48+
displayName: Devfile registry hostname
49+
description: Hostname for the devfile registry service. Defaults to cluster's router.
50+
required: false

stacks/java-jboss-eap-xp-bootable-jar/devfile.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ schemaVersion: 2.0.0
22
metadata:
33
name: java-jboss-eap-xp-bootable-jar
44
version: 1.0.0
5+
displayName: JBoss EAP XP
6+
tags: ["Java", "JBoss"]
7+
projectType: "jboss"
8+
language: "java"
59
website: https://access.redhat.com/products/red-hat-jboss-enterprise-application-platform/
610
starterProjects:
711
- name: microprofile-config

0 commit comments

Comments
 (0)