From 9f5a3cc0f7a952c35c355dc08cd66e08d527378e Mon Sep 17 00:00:00 2001 From: sspeiche Date: Wed, 10 Jun 2015 14:43:33 -0400 Subject: [PATCH] Parameterize service and routes consistently --- openshift/templates/nodejs.json | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/openshift/templates/nodejs.json b/openshift/templates/nodejs.json index 0b1db87..31dc36e 100644 --- a/openshift/templates/nodejs.json +++ b/openshift/templates/nodejs.json @@ -15,7 +15,7 @@ "kind": "Service", "apiVersion": "v1beta3", "metadata": { - "name": "nodejs-frontend", + "name": "${FRONTEND_SERVICE_NAME}", "creationTimestamp": null }, "spec": { @@ -29,7 +29,7 @@ } ], "selector": { - "name": "nodejs-frontend" + "name": "${FRONTEND_SERVICE_NAME}" }, "portalIP": "", "type": "ClusterIP", @@ -43,14 +43,14 @@ "kind": "Route", "apiVersion": "v1beta3", "metadata": { - "name": "frontend-route", + "name": "${FRONTEND_ROUTE}", "creationTimestamp": null }, "spec": { "host" : "${FRONTEND_ROUTE}", "to": { "kind" : "Service", - "name" : "nodejs-frontend" + "name" : "${FRONTEND_SERVICE_NAME}" } } }, @@ -112,7 +112,7 @@ "source": { "type": "Git", "git": { - "uri": "${GITHUB_URL}" + "uri": "${SOURCE_REPOSITORY_URL}" } }, "strategy": { @@ -141,7 +141,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1beta3", "metadata": { - "name": "nodejs-frontend", + "name": "nodejs-example", "creationTimestamp": null }, "spec": { @@ -172,13 +172,13 @@ ], "replicas": 1, "selector": { - "name": "nodejs-frontend" + "name": "nodejs-example" }, "template": { "metadata": { "creationTimestamp": null, "labels": { - "name": "nodejs-frontend" + "name": "nodejs-example" } }, "spec": { @@ -213,14 +213,19 @@ "parameters": [ { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL with your Node.js application source code.", + "description": "The URL with your Node.js application source code", "value": "https://github.com/openshift/nodejs-ex.git" }, + { + "name": "FRONTEND_SERVICE_NAME", + "description": "Frontend service name", + "value": "nodejs" + }, { "name": "FRONTEND_ROUTE", - "description": "The exposed hostname that will route to the Node.js service.", + "description": "The exposed hostname that will route to the Node.js service", "value": "nodejs.apps" - } + } ], "labels": { "template": "nodejs-example"