Parameterize service and routes consistently

This commit is contained in:
sspeiche 2015-06-10 14:43:33 -04:00
parent 9fd79a0ad4
commit 9f5a3cc0f7

View file

@ -15,7 +15,7 @@
"kind": "Service", "kind": "Service",
"apiVersion": "v1beta3", "apiVersion": "v1beta3",
"metadata": { "metadata": {
"name": "nodejs-frontend", "name": "${FRONTEND_SERVICE_NAME}",
"creationTimestamp": null "creationTimestamp": null
}, },
"spec": { "spec": {
@ -29,7 +29,7 @@
} }
], ],
"selector": { "selector": {
"name": "nodejs-frontend" "name": "${FRONTEND_SERVICE_NAME}"
}, },
"portalIP": "", "portalIP": "",
"type": "ClusterIP", "type": "ClusterIP",
@ -43,14 +43,14 @@
"kind": "Route", "kind": "Route",
"apiVersion": "v1beta3", "apiVersion": "v1beta3",
"metadata": { "metadata": {
"name": "frontend-route", "name": "${FRONTEND_ROUTE}",
"creationTimestamp": null "creationTimestamp": null
}, },
"spec": { "spec": {
"host" : "${FRONTEND_ROUTE}", "host" : "${FRONTEND_ROUTE}",
"to": { "to": {
"kind" : "Service", "kind" : "Service",
"name" : "nodejs-frontend" "name" : "${FRONTEND_SERVICE_NAME}"
} }
} }
}, },
@ -112,7 +112,7 @@
"source": { "source": {
"type": "Git", "type": "Git",
"git": { "git": {
"uri": "${GITHUB_URL}" "uri": "${SOURCE_REPOSITORY_URL}"
} }
}, },
"strategy": { "strategy": {
@ -141,7 +141,7 @@
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1beta3", "apiVersion": "v1beta3",
"metadata": { "metadata": {
"name": "nodejs-frontend", "name": "nodejs-example",
"creationTimestamp": null "creationTimestamp": null
}, },
"spec": { "spec": {
@ -172,13 +172,13 @@
], ],
"replicas": 1, "replicas": 1,
"selector": { "selector": {
"name": "nodejs-frontend" "name": "nodejs-example"
}, },
"template": { "template": {
"metadata": { "metadata": {
"creationTimestamp": null, "creationTimestamp": null,
"labels": { "labels": {
"name": "nodejs-frontend" "name": "nodejs-example"
} }
}, },
"spec": { "spec": {
@ -213,12 +213,17 @@
"parameters": [ "parameters": [
{ {
"name": "SOURCE_REPOSITORY_URL", "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" "value": "https://github.com/openshift/nodejs-ex.git"
}, },
{
"name": "FRONTEND_SERVICE_NAME",
"description": "Frontend service name",
"value": "nodejs"
},
{ {
"name": "FRONTEND_ROUTE", "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" "value": "nodejs.apps"
} }
], ],