Skip to content

Commit 95b5e27

Browse files
committed
update docs to remove v1beta1
1 parent fd1d27d commit 95b5e27

32 files changed

+382
-355
lines changed

docs/deployments.md

+50-44
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,63 @@ A `deploymentConfig` in OpenShift is a REST object which can be POSTed to the AP
2222

2323
```
2424
{
25+
"kind": "DeploymentConfig",
26+
"apiVersion": "v1beta3",
2527
"metadata": {
2628
"name": "frontend"
2729
},
28-
"kind": "DeploymentConfig",
29-
"apiVersion": "v1beta1",
30-
"triggers": [
31-
{
32-
"type": "ImageChange",
33-
"imageChangeParams": {
34-
"automatic": true,
35-
"containerNames": [
36-
"helloworld"
37-
],
38-
"repositoryName": "openshift/origin-ruby-sample",
39-
"tag": "latest"
40-
}
41-
}
42-
],
43-
"template": {
30+
"spec": {
4431
"strategy": {
45-
"type": "Recreate"
32+
"type": "Recreate",
33+
"resources": {}
34+
},
35+
"triggers": [
36+
{
37+
"type": "ImageChange",
38+
"imageChangeParams": {
39+
"automatic": true,
40+
"containerNames": [
41+
"helloworld"
42+
],
43+
"from": {},
44+
"lastTriggeredImage": ""
45+
}
46+
}
47+
],
48+
"replicas": 1,
49+
"selector": {
50+
"name": "frontend"
4651
},
47-
"controllerTemplate": {
48-
"replicas": 1,
49-
"replicaSelector": {
50-
"name": "frontend"
52+
"template": {
53+
"metadata": {
54+
"creationTimestamp": null,
55+
"labels": {
56+
"name": "frontend"
57+
}
5158
},
52-
"podTemplate": {
53-
"desiredState": {
54-
"manifest": {
55-
"version": "v1beta1",
56-
"containers": [
59+
"spec": {
60+
"containers": [
61+
{
62+
"name": "helloworld",
63+
"image": "openshift/openshift/origin-ruby-sample",
64+
"ports": [
5765
{
58-
"name": "helloworld",
59-
"image": "openshift/openshift/origin-ruby-sample",
60-
"ports": [
61-
{
62-
"containerPort": 8080
63-
}
64-
]
66+
"containerPort": 8080,
67+
"protocol": "TCP"
6568
}
66-
]
69+
],
70+
"resources": {},
71+
"terminationMessagePath": "/dev/termination-log",
72+
"imagePullPolicy": "IfNotPresent",
73+
"capabilities": {},
74+
"securityContext": {
75+
"capabilities": {},
76+
"privileged": false
77+
}
6778
}
68-
},
69-
"labels": {
70-
"name": "frontend"
71-
}
79+
],
80+
"restartPolicy": "Always",
81+
"dnsPolicy": "ClusterFirst"
7282
}
7383
}
7484
}
@@ -176,18 +186,14 @@ The `rollback` API object configures the generation process and provides the sco
176186

177187
```
178188
{
179-
"metadata": {
180-
"name": "rollback-1",
181-
"namespace": "default"
182-
},
183189
"kind": "DeploymentConfigRollback",
184-
"apiVersion": "v1beta1",
190+
"apiVersion": "v1beta3",
185191
"spec": {
186192
"from": {
187193
"name": "deployment-1"
188194
},
189-
"includeTemplate": true,
190195
"includeTriggers": false,
196+
"includeTemplate": true,
191197
"includeReplicationMeta": false,
192198
"includeStrategy": true
193199
}

docs/proposals/post-deployment-hooks.md

+56-50
Original file line numberDiff line numberDiff line change
@@ -282,75 +282,81 @@ A database is exposed to the application using a service:
282282
```json
283283
{
284284
"kind": "Service",
285-
"apiVersion": "v1beta1",
286-
"id": "mysql",
287-
"containerPort": 3306,
288-
"port": 5434,
289-
"selector": {
285+
"apiVersion": "v1beta3",
286+
"metadata": {
290287
"name": "mysql"
288+
},
289+
"spec": {
290+
"ports": [
291+
{
292+
"protocol": "TCP",
293+
"port": 5434,
294+
"targetPort": 3306,
295+
"nodePort": 0
296+
}
297+
],
298+
"selector": {
299+
"name": "mysql"
300+
},
301+
"portalIP": "",
302+
"type": "ClusterIP",
303+
"sessionAffinity": "None"
291304
}
292-
},
305+
}
293306
```
294307

295308
A deployment configuration describes the template for application deployments:
296309

297310
```json
298311
{
299312
"kind": "DeploymentConfig",
300-
"apiVersion": "v1beta1",
313+
"apiVersion": "v1beta3",
301314
"metadata": {
302-
"name": "rails",
303-
"description": "A sample Rails application."
315+
"name": "rails"
304316
},
305-
"triggers": [
306-
{
307-
"type": "ConfigChange"
308-
}
309-
],
310-
"template": {
317+
"spec": {
311318
"strategy": {
312319
"type": "Recreate",
313-
"lifecycle": {
314-
"pre": {
315-
"execNewPod": {
316-
"container": "rails",
317-
"command": ["rake", "db:migrate"],
318-
"env": [
319-
{
320-
"name": "CUSTOM_VAR",
321-
"value": "custom_value"
322-
},
323-
]
324-
},
325-
"failurePolicy": "Retry"
326-
}
320+
"resources": {}
321+
},
322+
"triggers": [
323+
{
324+
"type": "ConfigChange"
327325
}
326+
],
327+
"replicas": 1,
328+
"selector": {
329+
"name": "rails"
328330
},
329-
"controllerTemplate": {
330-
"replicas": 1,
331-
"replicaSelector": {
332-
"name": "rails"
331+
"template": {
332+
"metadata": {
333+
"labels": {
334+
"name": "rails"
335+
}
333336
},
334-
"podTemplate": {
335-
"desiredState": {
336-
"manifest": {
337-
"version": "v1beta1",
338-
"containers": [
337+
"spec": {
338+
"containers": [
339+
{
340+
"name": "rails",
341+
"image": "example/rails",
342+
"ports": [
339343
{
340-
"name": "rails",
341-
"image": "example/rails",
342-
"ports": [
343-
{
344-
"containerPort": 8080
345-
}
346-
]
344+
"containerPort": 8080,
345+
"protocol": "TCP"
347346
}
348-
]
347+
],
348+
"resources": {},
349+
"terminationMessagePath": "/dev/termination-log",
350+
"imagePullPolicy": "IfNotPresent",
351+
"capabilities": {},
352+
"securityContext": {
353+
"capabilities": {},
354+
"privileged": false
355+
}
349356
}
350-
},
351-
"labels": {
352-
"name": "rails"
353-
}
357+
],
358+
"restartPolicy": "Always",
359+
"dnsPolicy": "ClusterFirst"
354360
}
355361
}
356362
}

docs/routing.md

+55-24
Original file line numberDiff line numberDiff line change
@@ -109,49 +109,80 @@ Configuration files (to be created in the vagrant home directory)
109109
pod.json
110110

111111
{
112-
"id": "hello-pod",
113112
"kind": "Pod",
114-
"apiVersion": "v1beta1",
115-
"desiredState": {
116-
"manifest": {
117-
"version": "v1beta1",
118-
"id": "hello-openshift",
119-
"containers": [{
120-
"name": "hello-openshift",
121-
"image": "openshift/hello-openshift",
122-
"ports": [{
123-
"containerPort": 8080
124-
}]
125-
}]
113+
"apiVersion": "v1beta3",
114+
"metadata": {
115+
"name": "hello-pod",
116+
"labels": {
117+
"name": "hello-openshift"
126118
}
127119
},
128-
"labels": {
129-
"name": "hello-openshift"
120+
"spec": {
121+
"containers": [
122+
{
123+
"name": "hello-openshift",
124+
"image": "openshift/hello-openshift",
125+
"ports": [
126+
{
127+
"containerPort": 8080,
128+
"protocol": "TCP"
129+
}
130+
],
131+
"resources": {},
132+
"terminationMessagePath": "/dev/termination-log",
133+
"imagePullPolicy": "IfNotPresent",
134+
"capabilities": {},
135+
"securityContext": {
136+
"capabilities": {},
137+
"privileged": false
138+
}
139+
}
140+
],
141+
"restartPolicy": "Always",
142+
"dnsPolicy": "ClusterFirst"
130143
}
131144
}
132145

133146
service.json
134147

135148
{
136-
"id": "hello-openshift",
137149
"kind": "Service",
138-
"apiVersion": "v1beta1",
139-
"port": 27017,
140-
"selector": {
150+
"apiVersion": "v1beta3",
151+
"metadata": {
141152
"name": "hello-openshift"
153+
},
154+
"spec": {
155+
"ports": [
156+
{
157+
"protocol": "TCP",
158+
"port": 27017,
159+
"targetPort": 0,
160+
"nodePort": 0
161+
}
162+
],
163+
"selector": {
164+
"name": "hello-openshift"
165+
},
166+
"portalIP": "",
167+
"type": "ClusterIP",
168+
"sessionAffinity": "None"
142169
}
143170
}
144-
171+
145172
route.json
146173

147174
{
148-
"id": "hello-route",
149175
"kind": "Route",
150-
"apiVersion": "v1beta1",
151-
"host": "hello-openshift.v3.rhcloud.com",
152-
"serviceName": "hello-openshift",
176+
"apiVersion": "v1beta3",
153177
"metadata": {
154178
"name": "hello-route"
179+
},
180+
"spec": {
181+
"host": "hello-openshift.v3.rhcloud.com",
182+
"to": {
183+
"kind": "Service",
184+
"name": "hello-openshift"
185+
}
155186
}
156187
}
157188

0 commit comments

Comments
 (0)