From f2a5e9371bcc47301c0263ba04de6e59c283b1aa Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Thu, 11 Jun 2015 17:38:57 +0200 Subject: [PATCH] Update template to API v1 --- openshift/templates/nodejs.json | 93 +++++++++------------------------ 1 file changed, 25 insertions(+), 68 deletions(-) diff --git a/openshift/templates/nodejs.json b/openshift/templates/nodejs.json index 0b1db87..c89fd8e 100644 --- a/openshift/templates/nodejs.json +++ b/openshift/templates/nodejs.json @@ -1,9 +1,8 @@ { "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.", "iconClass": "icon-nodejs", @@ -13,38 +12,28 @@ "objects": [ { "kind": "Service", - "apiVersion": "v1beta3", + "apiVersion": "v1", "metadata": { - "name": "nodejs-frontend", - "creationTimestamp": null + "name": "nodejs-frontend" }, "spec": { "ports": [ { "name": "web", - "protocol": "TCP", "port": 8080, - "targetPort": 8080, - "nodePort": 0 + "targetPort": 8080 } ], "selector": { "name": "nodejs-frontend" - }, - "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,26 +72,25 @@ "spec": { "triggers": [ { - "type": "github", + "type": "GitHub", "github": { "secret": "secret101" } }, { - "type": "generic", + "type": "Generic", "generic": { "secret": "secret101" } }, { - "type": "imageChange", - "imageChange": {} + "type": "ImageChange" } ], "source": { "type": "Git", "git": { - "uri": "${GITHUB_URL}" + "uri": "${SOURCE_REPOSITORY_URL}" } }, "strategy": { @@ -130,19 +108,14 @@ "kind": "ImageStreamTag", "name": "nodejs-example:latest" } - }, - "resources": {} - }, - "status": { - "lastVersion": 0 + } } }, { "kind": "DeploymentConfig", - "apiVersion": "v1beta3", + "apiVersion": "v1", "metadata": { - "name": "nodejs-frontend", - "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-frontend" } @@ -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": [ @@ -226,4 +184,3 @@ "template": "nodejs-example" } } -