Parameterize service name and fix route

This commit is contained in:
sspeiche 2015-06-11 13:43:01 -04:00
commit 340ed41827

View file

@ -1,11 +1,10 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"creationTimestamp": null,
"annotations": {
"description": "A simple Node.js application that responds with information about the server.",
"description": "A simple Node.js application with no database",
"iconClass": "icon-nodejs",
"tags": "instant-app,nodejs"
}
@ -13,38 +12,28 @@
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "${FRONTEND_SERVICE_NAME}",
"creationTimestamp": null
"name": "${FRONTEND_SERVICE_NAME}"
},
"spec": {
"ports": [
{
"name": "web",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080,
"nodePort": 0
"targetPort": 8080
}
],
"selector": {
"name": "${FRONTEND_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
}
},
{
"kind": "Route",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "${FRONTEND_ROUTE}",
"creationTimestamp": null
"name": "${FRONTEND_ROUTE}"
},
"spec": {
"host" : "${FRONTEND_ROUTE}",
@ -56,36 +45,26 @@
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"creationTimestamp": null
},
"spec": {},
"status": {
"dockerImageRepository": ""
"name": "nodejs-example"
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-010-centos7",
"creationTimestamp": null
"name": "nodejs-010-centos7"
},
"spec": {
"dockerImageRepository": "openshift/nodejs-010-centos7"
},
"status": {
"dockerImageRepository": ""
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"creationTimestamp": null,
"labels": {
"name": "nodejs-example"
}
@ -93,20 +72,19 @@
"spec": {
"triggers": [
{
"type": "github",
"type": "GitHub",
"github": {
"secret": "secret101"
}
},
{
"type": "generic",
"type": "Generic",
"generic": {
"secret": "secret101"
}
},
{
"type": "imageChange",
"imageChange": {}
"type": "ImageChange"
}
],
"source": {
@ -130,19 +108,14 @@
"kind": "ImageStreamTag",
"name": "nodejs-example:latest"
}
},
"resources": {}
},
"status": {
"lastVersion": 0
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"creationTimestamp": null
"name": "nodejs-frontend"
},
"spec": {
"strategy": {
@ -151,8 +124,7 @@
"updatePeriodSeconds": 1,
"intervalSeconds": 1,
"timeoutSeconds": 120
},
"resources": {}
}
},
"triggers": [
{
@ -165,8 +137,7 @@
"from": {
"kind": "ImageStreamTag",
"name": "nodejs-example:latest"
},
"lastTriggeredImage": ""
}
}
}
],
@ -176,7 +147,6 @@
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "nodejs-example"
}
@ -188,26 +158,14 @@
"image": "nodejs-example",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
"containerPort": 8080
}
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
]
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
]
}
}
},
"status": {}
}
}
],
"parameters": [
@ -231,4 +189,3 @@
"template": "nodejs-example"
}
}