Skip to content

Commit aac1020

Browse files
committed
Switch to groupified APIs
1 parent 39cc4e3 commit aac1020

File tree

164 files changed

+912
-898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+912
-898
lines changed

examples/deployment/recreate-example.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ items:
1111
targetPort: 8080
1212
selector:
1313
deploymentconfig: recreate-example
14-
- apiVersion: v1
14+
- apiVersion: apps.openshift.io/v1
1515
kind: DeploymentConfig
1616
metadata:
1717
name: recreate-example
@@ -43,13 +43,13 @@ items:
4343
kind: ImageStreamTag
4444
name: recreate-example:latest
4545
type: ImageChange
46-
- apiVersion: v1
46+
- apiVersion: image.openshift.io/v1
4747
kind: ImageStream
4848
metadata:
4949
name: recreate-example
5050
spec:
5151
dockerImageRepository: openshift/deployment-example
52-
- apiVersion: v1
52+
- apiVersion: route.openshift.io/v1
5353
kind: Route
5454
metadata:
5555
name: recreate-example

examples/grafana/grafana.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
kind: Template
3-
apiVersion: v1
3+
apiVersion: template.openshift.io/v1
44
metadata:
55
name: grafana
66
annotations:
@@ -12,7 +12,7 @@ metadata:
1212
parameters:
1313
- description: The location of the grafana image
1414
name: IMAGE_GRAFANA
15-
value: docker.io/grafana/grafana:master
15+
value: docker.io/grafana/grafana:master
1616
- description: The location of the proxy image
1717
name: IMAGE_PROXY
1818
value: openshift/oauth-proxy:v1.0.0

examples/hello-openshift/hello-project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"kind": "Project",
3-
"apiVersion": "v1",
3+
"apiVersion": "project.openshift.io/v1",
44
"metadata": {
55
"name": "hello-openshift-project",
66
"creationTimestamp": null,

examples/helm/tiller-template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
kind: Template
2-
apiVersion: v1
2+
apiVersion: template.openshift.io/v1
33
metadata:
44
name: tiller
55
objects:

examples/image-streams/image-streams-centos7.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"kind": "ImageStreamList",
2+
"kind": "List",
33
"apiVersion": "v1",
44
"items": [
55
{
@@ -1846,7 +1846,7 @@
18461846
},
18471847
{
18481848
"kind": "ImageStream",
1849-
"apiVersion": "v1",
1849+
"apiVersion": "image.openshift.io/v1",
18501850
"metadata": {
18511851
"name": "wildfly",
18521852
"creationTimestamp": null,

examples/jenkins/application-template.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"kind": "Template",
3-
"apiVersion": "v1",
3+
"apiVersion": "template.openshift.io/v1",
44
"metadata": {
55
"name": "nodejs-helloworld-sample",
66
"annotations": {
@@ -38,7 +38,7 @@
3838
},
3939
{
4040
"kind": "Route",
41-
"apiVersion": "v1",
41+
"apiVersion": "route.openshift.io/v1",
4242
"metadata": {
4343
"name": "frontend"
4444
},
@@ -54,7 +54,7 @@
5454
},
5555
{
5656
"kind": "DeploymentConfig",
57-
"apiVersion": "v1",
57+
"apiVersion": "apps.openshift.io/v1",
5858
"metadata": {
5959
"name": "frontend-prod"
6060
},
@@ -150,28 +150,28 @@
150150
},
151151
{
152152
"kind": "ImageStream",
153-
"apiVersion": "v1",
153+
"apiVersion": "image.openshift.io/v1",
154154
"metadata": {
155155
"name": "origin-nodejs-sample"
156156
}
157157
},
158158
{
159159
"kind": "ImageStream",
160-
"apiVersion": "v1",
160+
"apiVersion": "image.openshift.io/v1",
161161
"metadata": {
162162
"name": "origin-nodejs-sample2"
163163
}
164164
},
165165
{
166166
"kind": "ImageStream",
167-
"apiVersion": "v1",
167+
"apiVersion": "image.openshift.io/v1",
168168
"metadata": {
169169
"name": "origin-nodejs-sample3"
170170
}
171171
},
172172
{
173173
"kind": "ImageStream",
174-
"apiVersion": "v1",
174+
"apiVersion": "image.openshift.io/v1",
175175
"metadata": {
176176
"name": "nodejs-010-centos7"
177177
},
@@ -181,7 +181,7 @@
181181
},
182182
{
183183
"kind": "BuildConfig",
184-
"apiVersion": "v1",
184+
"apiVersion": "build.openshift.io/v1",
185185
"metadata": {
186186
"name": "frontend",
187187
"labels": {
@@ -229,7 +229,7 @@
229229
},
230230
{
231231
"kind": "DeploymentConfig",
232-
"apiVersion": "v1",
232+
"apiVersion": "apps.openshift.io/v1",
233233
"metadata": {
234234
"name": "frontend"
235235
},

examples/jenkins/pipeline/bluegreen-pipeline.yaml

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: v1
1+
apiVersion: template.openshift.io/v1
22
kind: Template
33
labels:
44
template: bluegreen-pipeline
@@ -13,7 +13,7 @@ metadata:
1313
tags: instant-app,jenkins
1414
name: bluegreen-pipeline
1515
objects:
16-
- apiVersion: v1
16+
- apiVersion: build.openshift.io/v1
1717
kind: BuildConfig
1818
metadata:
1919
annotations:
@@ -33,7 +33,7 @@ objects:
3333
def tag="blue"
3434
def altTag="green"
3535
def verbose="${VERBOSE}"
36-
36+
3737
node {
3838
project = env.PROJECT_NAME
3939
stage("Initialize") {
@@ -46,7 +46,7 @@ objects:
4646
sh "oc get route ${tag}-${appName} -n ${project} -o jsonpath='{ .spec.host }' --loglevel=4 > routehost"
4747
routeHost = readFile('routehost').trim()
4848
}
49-
49+
5050
openshift.withCluster() {
5151
openshift.withProject() {
5252
stage("Build") {
@@ -55,19 +55,19 @@ objects:
5555
bld.untilEach {
5656
return it.object().status.phase == "Running"
5757
}
58-
bld.logs('-f')
58+
bld.logs('-f')
5959
}
60-
60+
6161
stage("Deploy Test") {
6262
openshift.tag("${appName}:latest", "${appName}:${tag}")
6363
def dc = openshift.selector('dc', "${appName}-${tag}")
6464
dc.rollout().status()
6565
}
66-
66+
6767
stage("Test") {
6868
input message: "Test deployment: http://${routeHost}. Approve?", id: "approval"
6969
}
70-
70+
7171
stage("Go Live") {
7272
sh "oc set -n ${project} route-backends ${appName} ${appName}-${tag}=100 ${appName}-${altTag}=0 --loglevel=4"
7373
}
@@ -81,7 +81,7 @@ objects:
8181
echo "Caught: ${err}"
8282
currentBuild.result = 'FAILURE'
8383
throw err
84-
}
84+
}
8585
type: JenkinsPipeline
8686
triggers:
8787
- github:
@@ -98,23 +98,23 @@ objects:
9898
database-admin-password: ${DATABASE_ADMIN_PASSWORD}
9999
database-password: ${DATABASE_PASSWORD}
100100
database-user: ${DATABASE_USER}
101-
- apiVersion: v1
101+
- apiVersion: route.openshift.io/v1
102102
kind: Route
103103
metadata:
104104
name: blue-${NAME}
105105
spec:
106106
to:
107107
kind: Service
108108
name: ${NAME}-blue
109-
- apiVersion: v1
109+
- apiVersion: route.openshift.io/v1
110110
kind: Route
111111
metadata:
112112
name: green-${NAME}
113113
spec:
114114
to:
115115
kind: Service
116116
name: ${NAME}-green
117-
- apiVersion: v1
117+
- apiVersion: route.openshift.io/v1
118118
kind: Route
119119
metadata:
120120
name: ${NAME}
@@ -126,13 +126,13 @@ objects:
126126
kind: Service
127127
name: ${NAME}-blue
128128
weight: 100
129-
- apiVersion: v1
129+
- apiVersion: image.openshift.io/v1
130130
kind: ImageStream
131131
metadata:
132132
annotations:
133133
description: Keeps track of changes in the application image
134134
name: ${NAME}
135-
- apiVersion: v1
135+
- apiVersion: build.openshift.io/v1
136136
kind: BuildConfig
137137
metadata:
138138
annotations:
@@ -181,7 +181,7 @@ objects:
181181
targetPort: 8080
182182
selector:
183183
name: ${NAME}-blue
184-
- apiVersion: v1
184+
- apiVersion: apps.openshift.io/v1
185185
kind: DeploymentConfig
186186
metadata:
187187
annotations:
@@ -253,7 +253,7 @@ objects:
253253
targetPort: 8080
254254
selector:
255255
name: ${NAME}-green
256-
- apiVersion: v1
256+
- apiVersion: apps.openshift.io/v1
257257
kind: DeploymentConfig
258258
metadata:
259259
annotations:
@@ -332,7 +332,7 @@ objects:
332332
targetPort: 5432
333333
selector:
334334
name: ${DATABASE_SERVICE_NAME}
335-
- apiVersion: v1
335+
- apiVersion: apps.openshift.io/v1
336336
kind: DeploymentConfig
337337
metadata:
338338
annotations:

examples/jenkins/pipeline/maven-pipeline.yaml

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: v1
1+
apiVersion: template.openshift.io/v1
22
kind: Template
33
metadata:
44
name: maven-pipeline
@@ -31,7 +31,7 @@ parameters:
3131
name: GENERIC_WEBHOOK_SECRET
3232
required: true
3333
objects:
34-
- apiVersion: v1
34+
- apiVersion: image.openshift.io/v1
3535
kind: ImageStream
3636
metadata:
3737
labels:
@@ -40,7 +40,7 @@ objects:
4040
spec: {}
4141
status:
4242
dockerImageRepository: ""
43-
- apiVersion: v1
43+
- apiVersion: image.openshift.io/fv1
4444
kind: ImageStream
4545
metadata:
4646
name: wildfly
@@ -61,7 +61,7 @@ objects:
6161
kind: ImageStreamTag
6262
name: "10.1"
6363
name: latest
64-
- apiVersion: v1
64+
- apiVersion: build.openshift.io/v1
6565
kind: BuildConfig
6666
metadata:
6767
annotations:
@@ -101,21 +101,21 @@ objects:
101101
def status = sh(returnStdout: true, script: "oc start-build ${appName}-docker --from-file=target/ROOT.war -n ${project}")
102102
103103
def result = status.split("\n").find{ it.matches("^build.*started") }
104-
104+
105105
if(!result) {
106106
echo "ERROR: No started build found for ${appName}"
107107
currentBuild.result = 'FAILURE'
108108
return
109109
}
110-
110+
111111
// result can be:
112112
// - build "build-name" started
113113
// - build build.build.openshift.io/build-name started
114114
// - build "build.build.openshift.io/build-name" started
115115
// Goal is to isolate "build-name"
116116
def startedBuild = result.replaceAll("build [^0-9a-zA-Z]*", "").replaceAll("[^0-9a-zA-Z]* started", "").replaceFirst("^.*/", "")
117117
echo "Build ${startedBuild} has started. Now watching it ..."
118-
118+
119119
timeout(time: 20, unit: 'MINUTES') {
120120
openshift.withCluster() {
121121
openshift.withProject() {
@@ -128,7 +128,7 @@ objects:
128128
return object.status.phase == "Complete"
129129
}
130130
}
131-
}
131+
}
132132
}
133133
}
134134
stage("Deploy") {
@@ -155,7 +155,7 @@ objects:
155155
- generic:
156156
secret: "${GENERIC_WEBHOOK_SECRET}"
157157
type: Generic
158-
- apiVersion: v1
158+
- apiVersion: build.openshift.io/v1
159159
kind: BuildConfig
160160
metadata:
161161
labels:
@@ -184,7 +184,7 @@ objects:
184184
name: wildfly:latest
185185
type: Docker
186186
triggers: []
187-
- apiVersion: v1
187+
- apiVersion: apps.openshift.io/v1
188188
kind: DeploymentConfig
189189
metadata:
190190
labels:
@@ -275,7 +275,7 @@ objects:
275275
type: ClusterIP
276276
status:
277277
loadBalancer: {}
278-
- apiVersion: v1
278+
- apiVersion: route.openshift.io/v1
279279
kind: Route
280280
metadata:
281281
name: ${APP_NAME}

examples/jenkins/pipeline/nodejs-sample-pipeline.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
kind: "BuildConfig"
2-
apiVersion: "v1"
2+
apiVersion: "build.openshift.io/v1"
33
metadata:
44
name: "nodejs-sample-pipeline"
55
spec:

examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: v1
1+
apiVersion: build.openshift.io/v1
22
kind: BuildConfig
33
metadata:
44
labels:

0 commit comments

Comments
 (0)