Skip to content

Commit 858fbbf

Browse files
committed
Merge pull request #5 from sspeiche/alignment
Parameterize service and routes consistently
2 parents 0324c24 + 340ed41 commit 858fbbf

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

openshift/templates/nodejs.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"metadata": {
55
"name": "nodejs-example",
66
"annotations": {
7-
"description": "A simple Node.js application that responds with information about the server.",
7+
"description": "A simple Node.js application with no database",
88
"iconClass": "icon-nodejs",
99
"tags": "instant-app,nodejs"
1010
}
@@ -14,7 +14,7 @@
1414
"kind": "Service",
1515
"apiVersion": "v1",
1616
"metadata": {
17-
"name": "nodejs-frontend"
17+
"name": "${FRONTEND_SERVICE_NAME}"
1818
},
1919
"spec": {
2020
"ports": [
@@ -25,21 +25,21 @@
2525
}
2626
],
2727
"selector": {
28-
"name": "nodejs-frontend"
28+
"name": "${FRONTEND_SERVICE_NAME}"
2929
}
3030
}
3131
},
3232
{
3333
"kind": "Route",
3434
"apiVersion": "v1",
3535
"metadata": {
36-
"name": "frontend-route"
36+
"name": "${FRONTEND_ROUTE}"
3737
},
3838
"spec": {
3939
"host" : "${FRONTEND_ROUTE}",
4040
"to": {
4141
"kind" : "Service",
42-
"name" : "nodejs-frontend"
42+
"name" : "${FRONTEND_SERVICE_NAME}"
4343
}
4444
}
4545
},
@@ -143,12 +143,12 @@
143143
],
144144
"replicas": 1,
145145
"selector": {
146-
"name": "nodejs-frontend"
146+
"name": "nodejs-example"
147147
},
148148
"template": {
149149
"metadata": {
150150
"labels": {
151-
"name": "nodejs-frontend"
151+
"name": "nodejs-example"
152152
}
153153
},
154154
"spec": {
@@ -171,14 +171,19 @@
171171
"parameters": [
172172
{
173173
"name": "SOURCE_REPOSITORY_URL",
174-
"description": "The URL with your Node.js application source code.",
174+
"description": "The URL with your Node.js application source code",
175175
"value": "https://github.com/openshift/nodejs-ex.git"
176176
},
177+
{
178+
"name": "FRONTEND_SERVICE_NAME",
179+
"description": "Frontend service name",
180+
"value": "nodejs"
181+
},
177182
{
178183
"name": "FRONTEND_ROUTE",
179-
"description": "The exposed hostname that will route to the Node.js service.",
184+
"description": "The exposed hostname that will route to the Node.js service",
180185
"value": "nodejs.apps"
181-
}
186+
}
182187
],
183188
"labels": {
184189
"template": "nodejs-example"

0 commit comments

Comments
 (0)