234 lines
5.5 KiB
JSON
234 lines
5.5 KiB
JSON
{
|
|
"kind": "Template",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "nodejs-example",
|
|
"creationTimestamp": null,
|
|
"annotations": {
|
|
"description": "A simple Node.js application that responds with information about the server.",
|
|
"iconClass": "icon-nodejs",
|
|
"tags": "instant-app,nodejs"
|
|
}
|
|
},
|
|
"objects": [
|
|
{
|
|
"kind": "Service",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "${FRONTEND_SERVICE_NAME}",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "web",
|
|
"protocol": "TCP",
|
|
"port": 8080,
|
|
"targetPort": 8080,
|
|
"nodePort": 0
|
|
}
|
|
],
|
|
"selector": {
|
|
"name": "${FRONTEND_SERVICE_NAME}"
|
|
},
|
|
"portalIP": "",
|
|
"type": "ClusterIP",
|
|
"sessionAffinity": "None"
|
|
},
|
|
"status": {
|
|
"loadBalancer": {}
|
|
}
|
|
},
|
|
{
|
|
"kind": "Route",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "${FRONTEND_ROUTE}",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {
|
|
"host" : "${FRONTEND_ROUTE}",
|
|
"to": {
|
|
"kind" : "Service",
|
|
"name" : "${FRONTEND_SERVICE_NAME}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"kind": "ImageStream",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "nodejs-example",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {},
|
|
"status": {
|
|
"dockerImageRepository": ""
|
|
}
|
|
},
|
|
{
|
|
"kind": "ImageStream",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "nodejs-010-centos7",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {
|
|
"dockerImageRepository": "openshift/nodejs-010-centos7"
|
|
},
|
|
"status": {
|
|
"dockerImageRepository": ""
|
|
}
|
|
},
|
|
{
|
|
"kind": "BuildConfig",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "nodejs-example",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"name": "nodejs-example"
|
|
}
|
|
},
|
|
"spec": {
|
|
"triggers": [
|
|
{
|
|
"type": "github",
|
|
"github": {
|
|
"secret": "secret101"
|
|
}
|
|
},
|
|
{
|
|
"type": "generic",
|
|
"generic": {
|
|
"secret": "secret101"
|
|
}
|
|
},
|
|
{
|
|
"type": "imageChange",
|
|
"imageChange": {}
|
|
}
|
|
],
|
|
"source": {
|
|
"type": "Git",
|
|
"git": {
|
|
"uri": "${SOURCE_REPOSITORY_URL}"
|
|
}
|
|
},
|
|
"strategy": {
|
|
"type": "Source",
|
|
"sourceStrategy": {
|
|
"from": {
|
|
"kind": "ImageStreamTag",
|
|
"name": "nodejs-010-centos7:latest"
|
|
},
|
|
"incremental": true
|
|
}
|
|
},
|
|
"output": {
|
|
"to": {
|
|
"kind": "ImageStreamTag",
|
|
"name": "nodejs-example:latest"
|
|
}
|
|
},
|
|
"resources": {}
|
|
},
|
|
"status": {
|
|
"lastVersion": 0
|
|
}
|
|
},
|
|
{
|
|
"kind": "DeploymentConfig",
|
|
"apiVersion": "v1beta3",
|
|
"metadata": {
|
|
"name": "nodejs-example",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {
|
|
"strategy": {
|
|
"type": "Rolling",
|
|
"rollingParams": {
|
|
"updatePeriodSeconds": 1,
|
|
"intervalSeconds": 1,
|
|
"timeoutSeconds": 120
|
|
},
|
|
"resources": {}
|
|
},
|
|
"triggers": [
|
|
{
|
|
"type": "ImageChange",
|
|
"imageChangeParams": {
|
|
"automatic": true,
|
|
"containerNames": [
|
|
"nodejs-example"
|
|
],
|
|
"from": {
|
|
"kind": "ImageStreamTag",
|
|
"name": "nodejs-example:latest"
|
|
},
|
|
"lastTriggeredImage": ""
|
|
}
|
|
}
|
|
],
|
|
"replicas": 1,
|
|
"selector": {
|
|
"name": "nodejs-example"
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"name": "nodejs-example"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "nodejs-example",
|
|
"image": "nodejs-example",
|
|
"ports": [
|
|
{
|
|
"containerPort": 8080,
|
|
"protocol": "TCP"
|
|
}
|
|
],
|
|
"resources": {},
|
|
"terminationMessagePath": "/dev/termination-log",
|
|
"imagePullPolicy": "IfNotPresent",
|
|
"capabilities": {},
|
|
"securityContext": {
|
|
"capabilities": {},
|
|
"privileged": false
|
|
}
|
|
}
|
|
],
|
|
"restartPolicy": "Always",
|
|
"dnsPolicy": "ClusterFirst"
|
|
}
|
|
}
|
|
},
|
|
"status": {}
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "SOURCE_REPOSITORY_URL",
|
|
"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",
|
|
"value": "nodejs.apps"
|
|
}
|
|
],
|
|
"labels": {
|
|
"template": "nodejs-example"
|
|
}
|
|
}
|
|
|