| ... | ... |
@@ -22,53 +22,63 @@ A `deploymentConfig` in OpenShift is a REST object which can be POSTed to the AP |
| 22 | 22 |
|
| 23 | 23 |
``` |
| 24 | 24 |
{
|
| 25 |
+ "kind": "DeploymentConfig", |
|
| 26 |
+ "apiVersion": "v1beta3", |
|
| 25 | 27 |
"metadata": {
|
| 26 | 28 |
"name": "frontend" |
| 27 | 29 |
}, |
| 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": {
|
|
| 44 | 31 |
"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" |
|
| 46 | 51 |
}, |
| 47 |
- "controllerTemplate": {
|
|
| 48 |
- "replicas": 1, |
|
| 49 |
- "replicaSelector": {
|
|
| 50 |
- "name": "frontend" |
|
| 52 |
+ "template": {
|
|
| 53 |
+ "metadata": {
|
|
| 54 |
+ "creationTimestamp": null, |
|
| 55 |
+ "labels": {
|
|
| 56 |
+ "name": "frontend" |
|
| 57 |
+ } |
|
| 51 | 58 |
}, |
| 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": [ |
|
| 57 | 65 |
{
|
| 58 |
- "name": "helloworld", |
|
| 59 |
- "image": "openshift/openshift/origin-ruby-sample", |
|
| 60 |
- "ports": [ |
|
| 61 |
- {
|
|
| 62 |
- "containerPort": 8080 |
|
| 63 |
- } |
|
| 64 |
- ] |
|
| 66 |
+ "containerPort": 8080, |
|
| 67 |
+ "protocol": "TCP" |
|
| 65 | 68 |
} |
| 66 |
- ] |
|
| 69 |
+ ], |
|
| 70 |
+ "resources": {},
|
|
| 71 |
+ "terminationMessagePath": "/dev/termination-log", |
|
| 72 |
+ "imagePullPolicy": "IfNotPresent", |
|
| 73 |
+ "capabilities": {},
|
|
| 74 |
+ "securityContext": {
|
|
| 75 |
+ "capabilities": {},
|
|
| 76 |
+ "privileged": false |
|
| 77 |
+ } |
|
| 67 | 78 |
} |
| 68 |
- }, |
|
| 69 |
- "labels": {
|
|
| 70 |
- "name": "frontend" |
|
| 71 |
- } |
|
| 79 |
+ ], |
|
| 80 |
+ "restartPolicy": "Always", |
|
| 81 |
+ "dnsPolicy": "ClusterFirst" |
|
| 72 | 82 |
} |
| 73 | 83 |
} |
| 74 | 84 |
} |
| ... | ... |
@@ -176,18 +186,14 @@ The `rollback` API object configures the generation process and provides the sco |
| 176 | 176 |
|
| 177 | 177 |
``` |
| 178 | 178 |
{
|
| 179 |
- "metadata": {
|
|
| 180 |
- "name": "rollback-1", |
|
| 181 |
- "namespace": "default" |
|
| 182 |
- }, |
|
| 183 | 179 |
"kind": "DeploymentConfigRollback", |
| 184 |
- "apiVersion": "v1beta1", |
|
| 180 |
+ "apiVersion": "v1beta3", |
|
| 185 | 181 |
"spec": {
|
| 186 | 182 |
"from": {
|
| 187 | 183 |
"name": "deployment-1" |
| 188 | 184 |
}, |
| 189 |
- "includeTemplate": true, |
|
| 190 | 185 |
"includeTriggers": false, |
| 186 |
+ "includeTemplate": true, |
|
| 191 | 187 |
"includeReplicationMeta": false, |
| 192 | 188 |
"includeStrategy": true |
| 193 | 189 |
} |
| ... | ... |
@@ -282,14 +282,27 @@ A database is exposed to the application using a service: |
| 282 | 282 |
```json |
| 283 | 283 |
{
|
| 284 | 284 |
"kind": "Service", |
| 285 |
- "apiVersion": "v1beta1", |
|
| 286 |
- "id": "mysql", |
|
| 287 |
- "containerPort": 3306, |
|
| 288 |
- "port": 5434, |
|
| 289 |
- "selector": {
|
|
| 285 |
+ "apiVersion": "v1beta3", |
|
| 286 |
+ "metadata": {
|
|
| 290 | 287 |
"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" |
|
| 291 | 304 |
} |
| 292 |
-}, |
|
| 305 |
+} |
|
| 293 | 306 |
``` |
| 294 | 307 |
|
| 295 | 308 |
A deployment configuration describes the template for application deployments: |
| ... | ... |
@@ -297,60 +310,53 @@ A deployment configuration describes the template for application deployments: |
| 297 | 297 |
```json |
| 298 | 298 |
{
|
| 299 | 299 |
"kind": "DeploymentConfig", |
| 300 |
- "apiVersion": "v1beta1", |
|
| 300 |
+ "apiVersion": "v1beta3", |
|
| 301 | 301 |
"metadata": {
|
| 302 |
- "name": "rails", |
|
| 303 |
- "description": "A sample Rails application." |
|
| 302 |
+ "name": "rails" |
|
| 304 | 303 |
}, |
| 305 |
- "triggers": [ |
|
| 306 |
- {
|
|
| 307 |
- "type": "ConfigChange" |
|
| 308 |
- } |
|
| 309 |
- ], |
|
| 310 |
- "template": {
|
|
| 304 |
+ "spec": {
|
|
| 311 | 305 |
"strategy": {
|
| 312 | 306 |
"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 |
- } |
|
| 307 |
+ "resources": {}
|
|
| 308 |
+ }, |
|
| 309 |
+ "triggers": [ |
|
| 310 |
+ {
|
|
| 311 |
+ "type": "ConfigChange" |
|
| 327 | 312 |
} |
| 313 |
+ ], |
|
| 314 |
+ "replicas": 1, |
|
| 315 |
+ "selector": {
|
|
| 316 |
+ "name": "rails" |
|
| 328 | 317 |
}, |
| 329 |
- "controllerTemplate": {
|
|
| 330 |
- "replicas": 1, |
|
| 331 |
- "replicaSelector": {
|
|
| 332 |
- "name": "rails" |
|
| 318 |
+ "template": {
|
|
| 319 |
+ "metadata": {
|
|
| 320 |
+ "labels": {
|
|
| 321 |
+ "name": "rails" |
|
| 322 |
+ } |
|
| 333 | 323 |
}, |
| 334 |
- "podTemplate": {
|
|
| 335 |
- "desiredState": {
|
|
| 336 |
- "manifest": {
|
|
| 337 |
- "version": "v1beta1", |
|
| 338 |
- "containers": [ |
|
| 324 |
+ "spec": {
|
|
| 325 |
+ "containers": [ |
|
| 326 |
+ {
|
|
| 327 |
+ "name": "rails", |
|
| 328 |
+ "image": "example/rails", |
|
| 329 |
+ "ports": [ |
|
| 339 | 330 |
{
|
| 340 |
- "name": "rails", |
|
| 341 |
- "image": "example/rails", |
|
| 342 |
- "ports": [ |
|
| 343 |
- {
|
|
| 344 |
- "containerPort": 8080 |
|
| 345 |
- } |
|
| 346 |
- ] |
|
| 331 |
+ "containerPort": 8080, |
|
| 332 |
+ "protocol": "TCP" |
|
| 347 | 333 |
} |
| 348 |
- ] |
|
| 334 |
+ ], |
|
| 335 |
+ "resources": {},
|
|
| 336 |
+ "terminationMessagePath": "/dev/termination-log", |
|
| 337 |
+ "imagePullPolicy": "IfNotPresent", |
|
| 338 |
+ "capabilities": {},
|
|
| 339 |
+ "securityContext": {
|
|
| 340 |
+ "capabilities": {},
|
|
| 341 |
+ "privileged": false |
|
| 342 |
+ } |
|
| 349 | 343 |
} |
| 350 |
- }, |
|
| 351 |
- "labels": {
|
|
| 352 |
- "name": "rails" |
|
| 353 |
- } |
|
| 344 |
+ ], |
|
| 345 |
+ "restartPolicy": "Always", |
|
| 346 |
+ "dnsPolicy": "ClusterFirst" |
|
| 354 | 347 |
} |
| 355 | 348 |
} |
| 356 | 349 |
} |
| ... | ... |
@@ -109,49 +109,80 @@ Configuration files (to be created in the vagrant home directory) |
| 109 | 109 |
pod.json |
| 110 | 110 |
|
| 111 | 111 |
{
|
| 112 |
- "id": "hello-pod", |
|
| 113 | 112 |
"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" |
|
| 126 | 118 |
} |
| 127 | 119 |
}, |
| 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" |
|
| 130 | 143 |
} |
| 131 | 144 |
} |
| 132 | 145 |
|
| 133 | 146 |
service.json |
| 134 | 147 |
|
| 135 | 148 |
{
|
| 136 |
- "id": "hello-openshift", |
|
| 137 | 149 |
"kind": "Service", |
| 138 |
- "apiVersion": "v1beta1", |
|
| 139 |
- "port": 27017, |
|
| 140 |
- "selector": {
|
|
| 150 |
+ "apiVersion": "v1beta3", |
|
| 151 |
+ "metadata": {
|
|
| 141 | 152 |
"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" |
|
| 142 | 169 |
} |
| 143 | 170 |
} |
| 144 |
- |
|
| 171 |
+ |
|
| 145 | 172 |
route.json |
| 146 | 173 |
|
| 147 | 174 |
{
|
| 148 |
- "id": "hello-route", |
|
| 149 | 175 |
"kind": "Route", |
| 150 |
- "apiVersion": "v1beta1", |
|
| 151 |
- "host": "hello-openshift.v3.rhcloud.com", |
|
| 152 |
- "serviceName": "hello-openshift", |
|
| 176 |
+ "apiVersion": "v1beta3", |
|
| 153 | 177 |
"metadata": {
|
| 154 | 178 |
"name": "hello-route" |
| 179 |
+ }, |
|
| 180 |
+ "spec": {
|
|
| 181 |
+ "host": "hello-openshift.v3.rhcloud.com", |
|
| 182 |
+ "to": {
|
|
| 183 |
+ "kind": "Service", |
|
| 184 |
+ "name": "hello-openshift" |
|
| 185 |
+ } |
|
| 155 | 186 |
} |
| 156 | 187 |
} |
| 157 | 188 |
|
| ... | ... |
@@ -4,61 +4,81 @@ |
| 4 | 4 |
"metadata": {},
|
| 5 | 5 |
"items": [ |
| 6 | 6 |
{
|
| 7 |
- "apiVersion": "v1beta2", |
|
| 8 |
- "containerPort": 8080, |
|
| 9 |
- "creationTimestamp": null, |
|
| 10 |
- "id": "jenkins", |
|
| 11 | 7 |
"kind": "Service", |
| 12 |
- "port": 5002, |
|
| 13 |
- "selector": {
|
|
| 14 |
- "name": "jenkinspod" |
|
| 8 |
+ "apiVersion": "v1beta3", |
|
| 9 |
+ "metadata": {
|
|
| 10 |
+ "name": "jenkins" |
|
| 11 |
+ }, |
|
| 12 |
+ "spec": {
|
|
| 13 |
+ "ports": [ |
|
| 14 |
+ {
|
|
| 15 |
+ "protocol": "TCP", |
|
| 16 |
+ "port": 5002, |
|
| 17 |
+ "targetPort": 8080, |
|
| 18 |
+ "nodePort": 0 |
|
| 19 |
+ } |
|
| 20 |
+ ], |
|
| 21 |
+ "selector": {
|
|
| 22 |
+ "name": "jenkinspod" |
|
| 23 |
+ }, |
|
| 24 |
+ "portalIP": "", |
|
| 25 |
+ "type": "ClusterIP", |
|
| 26 |
+ "sessionAffinity": "None" |
|
| 15 | 27 |
} |
| 16 | 28 |
}, |
| 17 | 29 |
{
|
| 18 |
- "apiVersion": "v1beta1", |
|
| 19 | 30 |
"kind": "DeploymentConfig", |
| 31 |
+ "apiVersion": "v1beta3", |
|
| 20 | 32 |
"metadata": {
|
| 21 | 33 |
"name": "jenkins" |
| 22 | 34 |
}, |
| 23 |
- "template": {
|
|
| 24 |
- "controllerTemplate": {
|
|
| 25 |
- "podTemplate": {
|
|
| 26 |
- "desiredState": {
|
|
| 27 |
- "manifest": {
|
|
| 28 |
- "containers": [ |
|
| 29 |
- {
|
|
| 30 |
- "image": "openshift/jenkins-1-centos", |
|
| 31 |
- "name": "jenkins-container", |
|
| 32 |
- "ports": [ |
|
| 33 |
- {
|
|
| 34 |
- "containerPort": 8080, |
|
| 35 |
- "protocol": "TCP" |
|
| 36 |
- } |
|
| 37 |
- ] |
|
| 38 |
- } |
|
| 39 |
- ], |
|
| 40 |
- "version": "v1beta1" |
|
| 41 |
- }, |
|
| 42 |
- "restartpolicy": {}
|
|
| 43 |
- }, |
|
| 35 |
+ "spec": {
|
|
| 36 |
+ "strategy": {
|
|
| 37 |
+ "type": "Recreate", |
|
| 38 |
+ "resources": {}
|
|
| 39 |
+ }, |
|
| 40 |
+ "triggers": [ |
|
| 41 |
+ {
|
|
| 42 |
+ "type": "ConfigChange" |
|
| 43 |
+ } |
|
| 44 |
+ ], |
|
| 45 |
+ "replicas": 1, |
|
| 46 |
+ "selector": {
|
|
| 47 |
+ "name": "jenkinspod" |
|
| 48 |
+ }, |
|
| 49 |
+ "template": {
|
|
| 50 |
+ "metadata": {
|
|
| 51 |
+ "creationTimestamp": null, |
|
| 44 | 52 |
"labels": {
|
| 45 | 53 |
"name": "jenkinspod" |
| 46 | 54 |
} |
| 47 | 55 |
}, |
| 48 |
- "replicaSelector": {
|
|
| 49 |
- "name": "jenkinspod" |
|
| 50 |
- }, |
|
| 51 |
- "replicas": 1 |
|
| 52 |
- }, |
|
| 53 |
- "strategy": {
|
|
| 54 |
- "type": "Recreate" |
|
| 55 |
- } |
|
| 56 |
- }, |
|
| 57 |
- "triggers": [ |
|
| 58 |
- {
|
|
| 59 |
- "type": "ConfigChange" |
|
| 56 |
+ "spec": {
|
|
| 57 |
+ "containers": [ |
|
| 58 |
+ {
|
|
| 59 |
+ "name": "jenkins-container", |
|
| 60 |
+ "image": "openshift/jenkins-1-centos", |
|
| 61 |
+ "ports": [ |
|
| 62 |
+ {
|
|
| 63 |
+ "containerPort": 8080, |
|
| 64 |
+ "protocol": "TCP" |
|
| 65 |
+ } |
|
| 66 |
+ ], |
|
| 67 |
+ "resources": {},
|
|
| 68 |
+ "terminationMessagePath": "/dev/termination-log", |
|
| 69 |
+ "imagePullPolicy": "IfNotPresent", |
|
| 70 |
+ "capabilities": {},
|
|
| 71 |
+ "securityContext": {
|
|
| 72 |
+ "capabilities": {},
|
|
| 73 |
+ "privileged": false |
|
| 74 |
+ } |
|
| 75 |
+ } |
|
| 76 |
+ ], |
|
| 77 |
+ "restartPolicy": "Always", |
|
| 78 |
+ "dnsPolicy": "ClusterFirst" |
|
| 79 |
+ } |
|
| 60 | 80 |
} |
| 61 |
- ] |
|
| 81 |
+ } |
|
| 62 | 82 |
} |
| 63 | 83 |
] |
| 64 | 84 |
} |
| 65 | 85 |
\ No newline at end of file |
| ... | ... |
@@ -162,9 +162,6 @@ |
| 162 | 162 |
"metadata": {
|
| 163 | 163 |
"name": "frontend", |
| 164 | 164 |
"namespace": "test", |
| 165 |
- "selfLink": "/osapi/v1beta1/deploymentConfigs/frontend?namespace=test", |
|
| 166 |
- "uid": "c61716d8-f03f-11e4-a3ce-28d2444e470d", |
|
| 167 |
- "resourceVersion": "60", |
|
| 168 | 165 |
"creationTimestamp": "2015-05-01T20:22:22Z", |
| 169 | 166 |
"labels": {
|
| 170 | 167 |
"template": "application-template-stibuild" |
| ... | ... |
@@ -328,9 +325,6 @@ |
| 328 | 328 |
"metadata": {
|
| 329 | 329 |
"name": "database", |
| 330 | 330 |
"namespace": "test", |
| 331 |
- "selfLink": "/osapi/v1beta1/deploymentConfigs/database?namespace=test", |
|
| 332 |
- "uid": "c62455ff-f03f-11e4-a3ce-28d2444e470d", |
|
| 333 |
- "resourceVersion": "64", |
|
| 334 | 331 |
"creationTimestamp": "2015-05-01T20:22:22Z", |
| 335 | 332 |
"labels": {
|
| 336 | 333 |
"template": "application-template-stibuild" |
| ... | ... |
@@ -225,7 +225,7 @@ This section covers how to perform all the steps of building, deploying, and upd |
| 225 | 225 |
|
| 226 | 226 |
13. *Optional:* Add the following webhook under the settings in your new GitHub repository: |
| 227 | 227 |
|
| 228 |
- $ https://<host>:8443/osapi/v1beta1/buildConfigHooks/ruby-sample-build/secret101/github?namespace=test |
|
| 228 |
+ $ https://<host>:8443/osapi/v1beta3/namespaces/test/buildconfigs/ruby-sample-build/webhooks/secret101/github |
|
| 229 | 229 |
|
| 230 | 230 |
* Note: Using the webhook requires that your OpenShift server be |
| 231 | 231 |
publicly accessible so GitHub can reach it to invoke the hook. You |
| ... | ... |
@@ -139,14 +139,14 @@ start_server |
| 139 | 139 |
# Wait for the API server to come up |
| 140 | 140 |
wait_for_url_timed "https://${OS_MASTER_ADDR}/healthz" "" 90*TIME_SEC >/dev/null
|
| 141 | 141 |
wait_for_url_timed "https://${OS_MASTER_ADDR}/osapi" "" 90*TIME_SEC >/dev/null
|
| 142 |
-wait_for_url "https://${OS_MASTER_ADDR}/api/v1beta1/minions/127.0.0.1" "" 0.25 80 >/dev/null
|
|
| 142 |
+wait_for_url "https://${OS_MASTER_ADDR}/api/v1beta3/nodes/127.0.0.1" "" 0.25 80 >/dev/null
|
|
| 143 | 143 |
|
| 144 | 144 |
# Start the Docker registry (172.30.17.101:5000) |
| 145 | 145 |
start_docker_registry |
| 146 | 146 |
|
| 147 | 147 |
wait_for_command '[[ "$(osc get endpoints docker-registry -t "{{ if .endpoints}}{{ len .endpoints }}{{ else }}0{{ end }}" 2>/dev/null || echo "0")" != "0" ]]' $((5*TIME_MIN))
|
| 148 | 148 |
|
| 149 |
-REGISTRY_ADDR=$(osc get --output-version=v1beta1 --template="{{ .portalIP }}:{{.port }}" \
|
|
| 149 |
+REGISTRY_ADDR=$(osc get --output-version=v1beta3 --template="{{ .spec.portalIP }}:{{.port }}" \
|
|
| 150 | 150 |
service docker-registry) |
| 151 | 151 |
echo "[INFO] Verifying the docker-registry is up at ${REGISTRY_ADDR}"
|
| 152 | 152 |
wait_for_url_timed "http://${REGISTRY_ADDR}" "" $((2*TIME_MIN))
|
| ... | ... |
@@ -4,63 +4,100 @@ |
| 4 | 4 |
"metadata": {},
|
| 5 | 5 |
"items": [ |
| 6 | 6 |
{
|
| 7 |
- "id": "hello-openshift-service", |
|
| 8 | 7 |
"kind": "Service", |
| 9 |
- "apiVersion": "v1beta1", |
|
| 10 |
- "port": 8080, |
|
| 11 |
- "selector": {
|
|
| 12 |
- "name": "hello-openshift-label" |
|
| 8 |
+ "apiVersion": "v1beta3", |
|
| 9 |
+ "metadata": {
|
|
| 10 |
+ "name": "hello-openshift-service", |
|
| 11 |
+ "creationTimestamp": null |
|
| 12 |
+ }, |
|
| 13 |
+ "spec": {
|
|
| 14 |
+ "ports": [ |
|
| 15 |
+ {
|
|
| 16 |
+ "protocol": "TCP", |
|
| 17 |
+ "port": 8080, |
|
| 18 |
+ "targetPort": 0, |
|
| 19 |
+ "nodePort": 0 |
|
| 20 |
+ } |
|
| 21 |
+ ], |
|
| 22 |
+ "selector": {
|
|
| 23 |
+ "name": "hello-openshift-label" |
|
| 24 |
+ }, |
|
| 25 |
+ "portalIP": "", |
|
| 26 |
+ "type": "ClusterIP", |
|
| 27 |
+ "sessionAffinity": "None" |
|
| 28 |
+ }, |
|
| 29 |
+ "status": {
|
|
| 30 |
+ "loadBalancer": {}
|
|
| 13 | 31 |
} |
| 14 | 32 |
}, |
| 15 | 33 |
{
|
| 16 |
- "id": "hello-openshift", |
|
| 17 | 34 |
"kind": "ReplicationController", |
| 18 |
- "apiVersion": "v1beta1", |
|
| 19 |
- "desiredState": {
|
|
| 20 |
- "podTemplate": {
|
|
| 21 |
- "desiredState": {
|
|
| 22 |
- "manifest": {
|
|
| 23 |
- "version": "v1beta1", |
|
| 24 |
- "id": "", |
|
| 25 |
- "containers": [ |
|
| 26 |
- {
|
|
| 27 |
- "name": "hello-openshift-container", |
|
| 28 |
- "image": "openshift/hello-openshift", |
|
| 29 |
- "ports": [ |
|
| 30 |
- {
|
|
| 31 |
- "hostPort": 6061, |
|
| 32 |
- "containerPort": 8080, |
|
| 33 |
- "protocol": "TCP" |
|
| 34 |
- } |
|
| 35 |
- ] |
|
| 36 |
- } |
|
| 37 |
- ], |
|
| 38 |
- "dnsPolicy": "ClusterFirst", |
|
| 39 |
- "restartPolicy": {
|
|
| 40 |
- "always": {}
|
|
| 41 |
- }, |
|
| 42 |
- "volumes": null |
|
| 35 |
+ "apiVersion": "v1beta3", |
|
| 36 |
+ "metadata": {
|
|
| 37 |
+ "name": "hello-openshift", |
|
| 38 |
+ "creationTimestamp": null, |
|
| 39 |
+ "labels": {
|
|
| 40 |
+ "name": "hello-openshift-label" |
|
| 41 |
+ } |
|
| 42 |
+ }, |
|
| 43 |
+ "spec": {
|
|
| 44 |
+ "replicas": 1, |
|
| 45 |
+ "selector": {
|
|
| 46 |
+ "name": "hello-openshift-label" |
|
| 47 |
+ }, |
|
| 48 |
+ "template": {
|
|
| 49 |
+ "metadata": {
|
|
| 50 |
+ "creationTimestamp": null, |
|
| 51 |
+ "labels": {
|
|
| 52 |
+ "name": "hello-openshift-label" |
|
| 43 | 53 |
} |
| 44 | 54 |
}, |
| 45 |
- "labels": {
|
|
| 46 |
- "name": "hello-openshift-label" |
|
| 55 |
+ "spec": {
|
|
| 56 |
+ "containers": [ |
|
| 57 |
+ {
|
|
| 58 |
+ "name": "hello-openshift-container", |
|
| 59 |
+ "image": "openshift/hello-openshift", |
|
| 60 |
+ "ports": [ |
|
| 61 |
+ {
|
|
| 62 |
+ "hostPort": 6061, |
|
| 63 |
+ "containerPort": 8080, |
|
| 64 |
+ "protocol": "TCP" |
|
| 65 |
+ } |
|
| 66 |
+ ], |
|
| 67 |
+ "resources": {},
|
|
| 68 |
+ "terminationMessagePath": "/dev/termination-log", |
|
| 69 |
+ "imagePullPolicy": "IfNotPresent", |
|
| 70 |
+ "capabilities": {},
|
|
| 71 |
+ "securityContext": {
|
|
| 72 |
+ "capabilities": {},
|
|
| 73 |
+ "privileged": false |
|
| 74 |
+ } |
|
| 75 |
+ } |
|
| 76 |
+ ], |
|
| 77 |
+ "restartPolicy": "Always", |
|
| 78 |
+ "dnsPolicy": "ClusterFirst" |
|
| 47 | 79 |
} |
| 48 |
- }, |
|
| 49 |
- "replicaSelector": {
|
|
| 50 |
- "name": "hello-openshift-label" |
|
| 51 |
- }, |
|
| 52 |
- "replicas": 1 |
|
| 80 |
+ } |
|
| 81 |
+ }, |
|
| 82 |
+ "status": {
|
|
| 83 |
+ "replicas": 0 |
|
| 53 | 84 |
} |
| 54 | 85 |
}, |
| 55 | 86 |
{
|
| 56 | 87 |
"kind": "Route", |
| 57 |
- "apiVersion": "v1beta1", |
|
| 88 |
+ "apiVersion": "v1beta3", |
|
| 58 | 89 |
"metadata": {
|
| 59 |
- "name": "hello-openshift-route" |
|
| 90 |
+ "name": "hello-openshift-route", |
|
| 91 |
+ "creationTimestamp": null |
|
| 92 |
+ }, |
|
| 93 |
+ "spec": {
|
|
| 94 |
+ "host": "hello.openshift.test", |
|
| 95 |
+ "to": {
|
|
| 96 |
+ "kind": "Service", |
|
| 97 |
+ "name": "hello-openshift-service" |
|
| 98 |
+ } |
|
| 60 | 99 |
}, |
| 61 |
- "id": "hello-openshift-route", |
|
| 62 |
- "host": "hello.openshift.test", |
|
| 63 |
- "serviceName": "hello-openshift-service" |
|
| 100 |
+ "status": {}
|
|
| 64 | 101 |
} |
| 65 | 102 |
] |
| 66 | 103 |
} |
| 67 | 104 |
\ No newline at end of file |
| ... | ... |
@@ -119,7 +119,7 @@ var tokenTemplate = template.Must(template.New("tokenTemplate").Parse(`
|
| 119 | 119 |
|
| 120 | 120 |
<h3>How do I delete this token when I'm done?</h3> |
| 121 | 121 |
<pre>osc delete oauthaccesstoken {{.AccessToken}}</pre>
|
| 122 |
- <pre>curl -X DELETE …/osapi/v1beta1/oAuthAccessTokens/{{.AccessToken}}</pre>
|
|
| 122 |
+ <pre>curl -X DELETE …/osapi/v1beta3/oAuthAccessTokens/{{.AccessToken}}</pre>
|
|
| 123 | 123 |
{{ end }}
|
| 124 | 124 |
|
| 125 | 125 |
<br><br> |
| ... | ... |
@@ -19,7 +19,7 @@ func NewAuthorizationAttributeBuilder(contextMapper kapi.RequestContextMapper, i |
| 19 | 19 |
|
| 20 | 20 |
func (a *openshiftAuthorizationAttributeBuilder) GetAttributes(req *http.Request) (AuthorizationAttributes, error) {
|
| 21 | 21 |
// any url that starts with an API prefix and is more than one step long is considered to be a resource URL. |
| 22 |
- // That means that /api is non-resource, /api/v1beta1 is resource, /healthz is non-resource, and /swagger/anything is non-resource |
|
| 22 |
+ // That means that /api is non-resource, /api/v1beta3 is resource, /healthz is non-resource, and /swagger/anything is non-resource |
|
| 23 | 23 |
urlSegments := splitPath(req.URL.Path) |
| 24 | 24 |
isResourceURL := (len(urlSegments) > 1) && a.infoResolver.APIPrefixes.Has(urlSegments[0]) |
| 25 | 25 |
|
| ... | ... |
@@ -7,14 +7,14 @@ import ( |
| 7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
| 8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" |
| 9 | 9 |
|
| 10 |
- "github.com/openshift/origin/pkg/api/v1beta1" |
|
| 10 |
+ "github.com/openshift/origin/pkg/api/v1beta3" |
|
| 11 | 11 |
buildapi "github.com/openshift/origin/pkg/build/api" |
| 12 | 12 |
buildutil "github.com/openshift/origin/pkg/build/util" |
| 13 | 13 |
) |
| 14 | 14 |
|
| 15 | 15 |
func TestCustomCreateBuildPod(t *testing.T) {
|
| 16 | 16 |
strategy := CustomBuildStrategy{
|
| 17 |
- Codec: v1beta1.Codec, |
|
| 17 |
+ Codec: v1beta3.Codec, |
|
| 18 | 18 |
} |
| 19 | 19 |
|
| 20 | 20 |
expectedBad := mockCustomBuild() |
| ... | ... |
@@ -67,7 +67,7 @@ func TestCustomCreateBuildPod(t *testing.T) {
|
| 67 | 67 |
if len(actual.Spec.Volumes) != 3 {
|
| 68 | 68 |
t.Fatalf("Expected 3 volumes in Build pod, got %d", len(actual.Spec.Volumes))
|
| 69 | 69 |
} |
| 70 |
- buildJSON, _ := v1beta1.Codec.Encode(expected) |
|
| 70 |
+ buildJSON, _ := v1beta3.Codec.Encode(expected) |
|
| 71 | 71 |
errorCases := map[int][]string{
|
| 72 | 72 |
0: {"BUILD", string(buildJSON)},
|
| 73 | 73 |
} |
| ... | ... |
@@ -7,7 +7,7 @@ import ( |
| 7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
| 8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" |
| 9 | 9 |
|
| 10 |
- "github.com/openshift/origin/pkg/api/v1beta1" |
|
| 10 |
+ "github.com/openshift/origin/pkg/api/v1beta3" |
|
| 11 | 11 |
buildapi "github.com/openshift/origin/pkg/build/api" |
| 12 | 12 |
buildutil "github.com/openshift/origin/pkg/build/util" |
| 13 | 13 |
) |
| ... | ... |
@@ -15,7 +15,7 @@ import ( |
| 15 | 15 |
func TestDockerCreateBuildPod(t *testing.T) {
|
| 16 | 16 |
strategy := DockerBuildStrategy{
|
| 17 | 17 |
Image: "docker-test-image", |
| 18 |
- Codec: v1beta1.Codec, |
|
| 18 |
+ Codec: v1beta3.Codec, |
|
| 19 | 19 |
} |
| 20 | 20 |
|
| 21 | 21 |
expected := mockDockerBuild() |
| ... | ... |
@@ -65,7 +65,7 @@ func TestDockerCreateBuildPod(t *testing.T) {
|
| 65 | 65 |
if !kapi.Semantic.DeepEqual(container.Resources, expected.Parameters.Resources) {
|
| 66 | 66 |
t.Fatalf("Expected actual=expected, %v != %v", container.Resources, expected.Parameters.Resources)
|
| 67 | 67 |
} |
| 68 |
- buildJSON, _ := v1beta1.Codec.Encode(expected) |
|
| 68 |
+ buildJSON, _ := v1beta3.Codec.Encode(expected) |
|
| 69 | 69 |
errorCases := map[int][]string{
|
| 70 | 70 |
0: {"BUILD", string(buildJSON)},
|
| 71 | 71 |
} |
| ... | ... |
@@ -7,7 +7,7 @@ import ( |
| 7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
| 8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" |
| 9 | 9 |
|
| 10 |
- "github.com/openshift/origin/pkg/api/v1beta1" |
|
| 10 |
+ "github.com/openshift/origin/pkg/api/v1beta3" |
|
| 11 | 11 |
buildapi "github.com/openshift/origin/pkg/build/api" |
| 12 | 12 |
buildutil "github.com/openshift/origin/pkg/build/util" |
| 13 | 13 |
) |
| ... | ... |
@@ -22,7 +22,7 @@ func TestSTICreateBuildPod(t *testing.T) {
|
| 22 | 22 |
strategy := &SourceBuildStrategy{
|
| 23 | 23 |
Image: "sti-test-image", |
| 24 | 24 |
TempDirectoryCreator: &FakeTempDirCreator{},
|
| 25 |
- Codec: v1beta1.Codec, |
|
| 25 |
+ Codec: v1beta3.Codec, |
|
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 | 28 |
expected := mockSTIBuild() |
| ... | ... |
@@ -83,7 +83,7 @@ func TestSTICreateBuildPod(t *testing.T) {
|
| 83 | 83 |
if !found {
|
| 84 | 84 |
t.Fatalf("Expected variable BUILD_LOGLEVEL be defined for the container")
|
| 85 | 85 |
} |
| 86 |
- buildJSON, _ := v1beta1.Codec.Encode(expected) |
|
| 86 |
+ buildJSON, _ := v1beta3.Codec.Encode(expected) |
|
| 87 | 87 |
errorCases := map[int][]string{
|
| 88 | 88 |
0: {"BUILD", string(buildJSON)},
|
| 89 | 89 |
} |
| ... | ... |
@@ -9,7 +9,7 @@ import ( |
| 9 | 9 |
|
| 10 | 10 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
| 11 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
| 12 |
- _ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1" |
|
| 12 |
+ _ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3" |
|
| 13 | 13 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic/rest" |
| 14 | 14 |
|
| 15 | 15 |
//"github.com/openshift/origin/pkg/api/latest" |
| ... | ... |
@@ -6,7 +6,7 @@ import ( |
| 6 | 6 |
"time" |
| 7 | 7 |
|
| 8 | 8 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
| 9 |
- _ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1" |
|
| 9 |
+ _ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3" |
|
| 10 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
| 11 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
| 12 | 12 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
| ... | ... |
@@ -4,7 +4,6 @@ import ( |
| 4 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
| 5 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
| 6 | 6 |
userapi "github.com/openshift/origin/pkg/user/api" |
| 7 |
- _ "github.com/openshift/origin/pkg/user/api/v1beta1" |
|
| 8 | 7 |
) |
| 9 | 8 |
|
| 10 | 9 |
// IdentitiesInterface has methods to work with Identity resources |
| ... | ... |
@@ -6,7 +6,6 @@ import ( |
| 6 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
| 7 | 7 |
|
| 8 | 8 |
projectapi "github.com/openshift/origin/pkg/project/api" |
| 9 |
- _ "github.com/openshift/origin/pkg/user/api/v1beta1" |
|
| 10 | 9 |
) |
| 11 | 10 |
|
| 12 | 11 |
// ProjectRequestsInterface has methods to work with ProjectRequest resources in a namespace |
| ... | ... |
@@ -4,7 +4,6 @@ import ( |
| 4 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
| 5 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
| 6 | 6 |
projectapi "github.com/openshift/origin/pkg/project/api" |
| 7 |
- _ "github.com/openshift/origin/pkg/user/api/v1beta1" |
|
| 8 | 7 |
) |
| 9 | 8 |
|
| 10 | 9 |
// ProjectsInterface has methods to work with Project resources in a namespace |
| ... | ... |
@@ -4,7 +4,6 @@ import ( |
| 4 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
| 5 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
| 6 | 6 |
userapi "github.com/openshift/origin/pkg/user/api" |
| 7 |
- _ "github.com/openshift/origin/pkg/user/api/v1beta1" |
|
| 8 | 7 |
) |
| 9 | 8 |
|
| 10 | 9 |
// UsersInterface has methods to work with User resources |
| ... | ... |
@@ -65,7 +65,7 @@ JSON and YAML formats are accepted.` |
| 65 | 65 |
$ cat pod.json | %[1]s update -f - |
| 66 | 66 |
|
| 67 | 67 |
// Update a pod by downloading it, applying the patch, then updating. Requires apiVersion be specified. |
| 68 |
- $ %[1]s update pods my-pod --patch='{ "apiVersion": "v1beta1", "desiredState": { "manifest": [{ "cpu": 100 }]}}'`
|
|
| 68 |
+ $ %[1]s update pods my-pod --patch='{ "apiVersion": "v1beta3", "spec": { "manifest": { "dnsPolicy": "ClusterFirst" }}}'`
|
|
| 69 | 69 |
) |
| 70 | 70 |
|
| 71 | 71 |
// NewCmdUpdate is a wrapper for the Kubernetes cli update command |
| ... | ... |
@@ -221,7 +221,7 @@ const ( |
| 221 | 221 |
$ %[1]s proxy --port=8011 --www=./local/www/ |
| 222 | 222 |
|
| 223 | 223 |
// Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api |
| 224 |
- // This makes e.g. the pods api available at localhost:8011/k8s-api/v1beta1/pods/ |
|
| 224 |
+ // This makes e.g. the pods api available at localhost:8011/k8s-api/v1beta3/pods/ |
|
| 225 | 225 |
$ %[1]s proxy --api-prefix=k8s-api` |
| 226 | 226 |
) |
| 227 | 227 |
|
| ... | ... |
@@ -76,7 +76,7 @@ type MasterConfig struct {
|
| 76 | 76 |
// CORSAllowedOrigins |
| 77 | 77 |
CORSAllowedOrigins []string `json:"corsAllowedOrigins"` |
| 78 | 78 |
|
| 79 |
- // APILevels is a list of API levels that should be enabled on startup: v1beta1, v1beta3, v1 as examples |
|
| 79 |
+ // APILevels is a list of API levels that should be enabled on startup: v1beta3 and v1 as examples |
|
| 80 | 80 |
APILevels []string `json:"apiLevels"` |
| 81 | 81 |
|
| 82 | 82 |
// MasterPublicURL is how clients can access the OpenShift API server |
| ... | ... |
@@ -450,7 +450,7 @@ type EtcdConfig struct {
|
| 450 | 450 |
} |
| 451 | 451 |
|
| 452 | 452 |
type KubernetesMasterConfig struct {
|
| 453 |
- // APILevels is a list of API levels that should be enabled on startup: v1beta1, v1beta2, v1beta3, v1 as examples |
|
| 453 |
+ // APILevels is a list of API levels that should be enabled on startup: v1beta3 and v1 as examples |
|
| 454 | 454 |
APILevels []string `json:"apiLevels"` |
| 455 | 455 |
MasterIP string `json:"masterIP"` |
| 456 | 456 |
// MasterCount is the number of expected masters that should be running. This value defaults to 1 and may be set to a positive integer. |
| ... | ... |
@@ -17,7 +17,7 @@ import ( |
| 17 | 17 |
|
| 18 | 18 |
"github.com/openshift/origin/pkg/api/latest" |
| 19 | 19 |
"github.com/openshift/origin/pkg/route/api" |
| 20 |
- _ "github.com/openshift/origin/pkg/route/api/v1beta1" |
|
| 20 |
+ _ "github.com/openshift/origin/pkg/route/api/v1beta3" |
|
| 21 | 21 |
) |
| 22 | 22 |
|
| 23 | 23 |
// This copy and paste is not pure ignorance. This is that we can be sure that the key is getting made as we |
| ... | ... |
@@ -110,19 +110,24 @@ func TestParameterGenerators(t *testing.T) {
|
| 110 | 110 |
func TestProcessValueEscape(t *testing.T) {
|
| 111 | 111 |
var template api.Template |
| 112 | 112 |
if err := latest.Codec.DecodeInto([]byte(`{
|
| 113 |
- "kind":"Template", "apiVersion":"v1beta1", |
|
| 114 |
- "items": [ |
|
| 115 |
- {
|
|
| 116 |
- "kind": "Service", "apiVersion": "v1beta3${VALUE}",
|
|
| 117 |
- "metadata": {
|
|
| 118 |
- "labels": {
|
|
| 119 |
- "key1": "${VALUE}",
|
|
| 120 |
- "key2": "$${VALUE}"
|
|
| 121 |
- } |
|
| 122 |
- } |
|
| 123 |
- } |
|
| 124 |
- ] |
|
| 125 |
- }`), &template); err != nil {
|
|
| 113 |
+ "kind": "Template", |
|
| 114 |
+ "apiVersion": "v1beta3", |
|
| 115 |
+ "metadata": {
|
|
| 116 |
+ "creationTimestamp": null |
|
| 117 |
+ }, |
|
| 118 |
+ "objects": [ |
|
| 119 |
+ {
|
|
| 120 |
+ "kind": "Service", |
|
| 121 |
+ "apiVersion": "v1beta3${VALUE}",
|
|
| 122 |
+ "metadata": {
|
|
| 123 |
+ "labels": {
|
|
| 124 |
+ "key1": "${VALUE}",
|
|
| 125 |
+ "key2": "$${VALUE}"
|
|
| 126 |
+ } |
|
| 127 |
+ } |
|
| 128 |
+ } |
|
| 129 |
+ ] |
|
| 130 |
+}`), &template); err != nil {
|
|
| 126 | 131 |
t.Fatalf("unexpected error: %v", err)
|
| 127 | 132 |
} |
| 128 | 133 |
|
| ... | ... |
@@ -159,8 +164,8 @@ func TestEvaluateLabels(t *testing.T) {
|
| 159 | 159 |
}{
|
| 160 | 160 |
"no labels": {
|
| 161 | 161 |
Input: `{
|
| 162 |
- "kind":"Template", "apiVersion":"v1beta1", |
|
| 163 |
- "items": [ |
|
| 162 |
+ "kind":"Template", "apiVersion":"v1beta3", |
|
| 163 |
+ "objects": [ |
|
| 164 | 164 |
{
|
| 165 | 165 |
"kind": "Service", "apiVersion": "v1beta3", |
| 166 | 166 |
"metadata": {"labels": {"key1": "v1", "key2": "v2"} }
|
| ... | ... |
@@ -179,8 +184,8 @@ func TestEvaluateLabels(t *testing.T) {
|
| 179 | 179 |
}, |
| 180 | 180 |
"one different label": {
|
| 181 | 181 |
Input: `{
|
| 182 |
- "kind":"Template", "apiVersion":"v1beta1", |
|
| 183 |
- "items": [ |
|
| 182 |
+ "kind":"Template", "apiVersion":"v1beta3", |
|
| 183 |
+ "objects": [ |
|
| 184 | 184 |
{
|
| 185 | 185 |
"kind": "Service", "apiVersion": "v1beta3", |
| 186 | 186 |
"metadata": {"labels": {"key1": "v1", "key2": "v2"} }
|
| ... | ... |
@@ -201,8 +206,8 @@ func TestEvaluateLabels(t *testing.T) {
|
| 201 | 201 |
}, |
| 202 | 202 |
"when the root object has labels and no metadata": {
|
| 203 | 203 |
Input: `{
|
| 204 |
- "kind":"Template", "apiVersion":"v1beta1", |
|
| 205 |
- "items": [ |
|
| 204 |
+ "kind":"Template", "apiVersion":"v1beta3", |
|
| 205 |
+ "objects": [ |
|
| 206 | 206 |
{
|
| 207 | 207 |
"kind": "Service", "apiVersion": "v1beta1", |
| 208 | 208 |
"labels": {
|
| ... | ... |
@@ -226,8 +231,8 @@ func TestEvaluateLabels(t *testing.T) {
|
| 226 | 226 |
}, |
| 227 | 227 |
"when the root object has labels and metadata": {
|
| 228 | 228 |
Input: `{
|
| 229 |
- "kind":"Template", "apiVersion":"v1beta1", |
|
| 230 |
- "items": [ |
|
| 229 |
+ "kind":"Template", "apiVersion":"v1beta3", |
|
| 230 |
+ "objects": [ |
|
| 231 | 231 |
{
|
| 232 | 232 |
"kind": "Service", "apiVersion": "v1beta1", |
| 233 | 233 |
"metadata": {},
|
| ... | ... |
@@ -253,8 +258,8 @@ func TestEvaluateLabels(t *testing.T) {
|
| 253 | 253 |
}, |
| 254 | 254 |
"overwrites label": {
|
| 255 | 255 |
Input: `{
|
| 256 |
- "kind":"Template", "apiVersion":"v1beta1", |
|
| 257 |
- "items": [ |
|
| 256 |
+ "kind":"Template", "apiVersion":"v1beta3", |
|
| 257 |
+ "objects": [ |
|
| 258 | 258 |
{
|
| 259 | 259 |
"kind": "Service", "apiVersion": "v1beta3", |
| 260 | 260 |
"metadata": {"labels": {"key1": "v1", "key2": "v2"} }
|
| ... | ... |
@@ -1,24 +1,35 @@ |
| 1 | 1 |
{
|
| 2 | 2 |
"kind": "Pod", |
| 3 |
- "apiVersion": "v1beta1", |
|
| 4 |
- "id": "openshift", |
|
| 5 |
- "desiredState": {
|
|
| 6 |
- "manifest": {
|
|
| 7 |
- "version": "v1beta2", |
|
| 8 |
- "containers": [ |
|
| 9 |
- {
|
|
| 10 |
- "name": "origin", |
|
| 11 |
- "image": "openshift/origin", |
|
| 12 |
- "ports": [{
|
|
| 13 |
- "containerPort": 8443, |
|
| 14 |
- }], |
|
| 15 |
- "command": ["start", "master"], |
|
| 16 |
- "imagePullPolicy": "PullIfNotPresent" |
|
| 3 |
+ "apiVersion": "v1beta3", |
|
| 4 |
+ "metadata": {
|
|
| 5 |
+ "name": "openshift" |
|
| 6 |
+ }, |
|
| 7 |
+ "spec": {
|
|
| 8 |
+ "containers": [ |
|
| 9 |
+ {
|
|
| 10 |
+ "name": "origin", |
|
| 11 |
+ "image": "openshift/origin", |
|
| 12 |
+ "args": [ |
|
| 13 |
+ "start", |
|
| 14 |
+ "master" |
|
| 15 |
+ ], |
|
| 16 |
+ "ports": [ |
|
| 17 |
+ {
|
|
| 18 |
+ "containerPort": 8443, |
|
| 19 |
+ "protocol": "TCP" |
|
| 20 |
+ } |
|
| 21 |
+ ], |
|
| 22 |
+ "resources": {},
|
|
| 23 |
+ "terminationMessagePath": "/dev/termination-log", |
|
| 24 |
+ "imagePullPolicy": "IfNotPresent", |
|
| 25 |
+ "capabilities": {},
|
|
| 26 |
+ "securityContext": {
|
|
| 27 |
+ "capabilities": {},
|
|
| 28 |
+ "privileged": false |
|
| 17 | 29 |
} |
| 18 |
- ], |
|
| 19 |
- "restartPolicy": {
|
|
| 20 |
- "always": {}
|
|
| 21 | 30 |
} |
| 22 |
- } |
|
| 31 |
+ ], |
|
| 32 |
+ "restartPolicy": "Always", |
|
| 33 |
+ "dnsPolicy": "ClusterFirst" |
|
| 23 | 34 |
} |
| 24 | 35 |
} |
| 25 | 36 |
\ No newline at end of file |
| ... | ... |
@@ -9,9 +9,6 @@ items: |
| 9 | 9 |
template: application-template-stibuild |
| 10 | 10 |
name: ruby-sample-build |
| 11 | 11 |
namespace: example |
| 12 |
- resourceVersion: "284" |
|
| 13 |
- selfLink: /osapi/v1beta1/buildConfigs/ruby-sample-build?namespace=example |
|
| 14 |
- uid: 471cb30a-dcdc-11e4-968a-080027c5bfa9 |
|
| 15 | 12 |
spec: |
| 16 | 13 |
output: |
| 17 | 14 |
to: |
| ... | ... |
@@ -51,9 +48,6 @@ items: |
| 51 | 51 |
template: application-template-stibuild |
| 52 | 52 |
name: ruby-sample-build-1 |
| 53 | 53 |
namespace: example |
| 54 |
- resourceVersion: "376" |
|
| 55 |
- selfLink: /osapi/v1beta1/builds/ruby-sample-build-1?namespace=example |
|
| 56 |
- uid: 47cdfff5-dcdc-11e4-968a-080027c5bfa9 |
|
| 57 | 54 |
spec: |
| 58 | 55 |
output: |
| 59 | 56 |
to: |
| ... | ... |
@@ -93,9 +87,6 @@ items: |
| 93 | 93 |
template: application-template-stibuild |
| 94 | 94 |
name: database-2 |
| 95 | 95 |
namespace: example |
| 96 |
- resourceVersion: "318" |
|
| 97 |
- selfLink: /api/v1beta1/replicationControllers/database-1?namespace=example |
|
| 98 |
- uid: 473d4a73-dcdc-11e4-968a-080027c5bfa9 |
|
| 99 | 96 |
spec: |
| 100 | 97 |
replicas: 1 |
| 101 | 98 |
selector: |
| ... | ... |
@@ -153,9 +144,6 @@ items: |
| 153 | 153 |
template: application-template-stibuild |
| 154 | 154 |
name: database-1 |
| 155 | 155 |
namespace: example |
| 156 |
- resourceVersion: "318" |
|
| 157 |
- selfLink: /api/v1beta1/replicationControllers/database-1?namespace=example |
|
| 158 |
- uid: 473d4a73-dcdc-11e4-968a-080027c5bfa9 |
|
| 159 | 156 |
spec: |
| 160 | 157 |
replicas: 1 |
| 161 | 158 |
selector: |
| ... | ... |
@@ -207,9 +195,6 @@ items: |
| 207 | 207 |
template: application-template-stibuild |
| 208 | 208 |
name: database |
| 209 | 209 |
namespace: example |
| 210 |
- resourceVersion: "271" |
|
| 211 |
- selfLink: /osapi/v1beta1/deploymentConfigs/database?namespace=example |
|
| 212 |
- uid: 4725b5d3-dcdc-11e4-968a-080027c5bfa9 |
|
| 213 | 210 |
spec: |
| 214 | 211 |
replicas: 1 |
| 215 | 212 |
selector: |
| ... | ... |
@@ -268,9 +253,6 @@ items: |
| 268 | 268 |
template: application-template-stibuild |
| 269 | 269 |
name: frontend-2 |
| 270 | 270 |
namespace: example |
| 271 |
- resourceVersion: "379" |
|
| 272 |
- selfLink: /api/v1beta1/replicationControllers/frontend-2?namespace=example |
|
| 273 |
- uid: 5c9cd4ec-dcdc-11e4-968a-080027c5bfa9 |
|
| 274 | 271 |
spec: |
| 275 | 272 |
replicas: 1 |
| 276 | 273 |
selector: |
| ... | ... |
@@ -332,9 +314,6 @@ items: |
| 332 | 332 |
template: application-template-stibuild |
| 333 | 333 |
name: frontend-1 |
| 334 | 334 |
namespace: example |
| 335 |
- resourceVersion: "378" |
|
| 336 |
- selfLink: /api/v1beta1/replicationControllers/frontend-1?namespace=example |
|
| 337 |
- uid: 5c9cd4ec-dcdc-11e4-968a-080027c5bfa9 |
|
| 338 | 335 |
spec: |
| 339 | 336 |
replicas: 1 |
| 340 | 337 |
selector: |
| ... | ... |
@@ -390,9 +369,6 @@ items: |
| 390 | 390 |
template: application-template-stibuild |
| 391 | 391 |
name: frontend |
| 392 | 392 |
namespace: example |
| 393 |
- resourceVersion: "346" |
|
| 394 |
- selfLink: /osapi/v1beta1/deploymentConfigs/frontend?namespace=example |
|
| 395 |
- uid: 471f24e3-dcdc-11e4-968a-080027c5bfa9 |
|
| 396 | 393 |
spec: |
| 397 | 394 |
replicas: 1 |
| 398 | 395 |
selector: |
| ... | ... |
@@ -460,9 +436,6 @@ items: |
| 460 | 460 |
template: application-template-stibuild |
| 461 | 461 |
name: database |
| 462 | 462 |
namespace: example |
| 463 |
- resourceVersion: "269" |
|
| 464 |
- selfLink: /api/v1beta1/services/database?namespace=example |
|
| 465 |
- uid: 47210cbb-dcdc-11e4-968a-080027c5bfa9 |
|
| 466 | 463 |
spec: |
| 467 | 464 |
portalIP: 172.30.17.240 |
| 468 | 465 |
ports: |
| ... | ... |
@@ -484,9 +457,6 @@ items: |
| 484 | 484 |
template: application-template-stibuild |
| 485 | 485 |
name: frontend |
| 486 | 486 |
namespace: example |
| 487 |
- resourceVersion: "263" |
|
| 488 |
- selfLink: /api/v1beta1/services/frontend?namespace=example |
|
| 489 |
- uid: 4704cf56-dcdc-11e4-968a-080027c5bfa9 |
|
| 490 | 487 |
spec: |
| 491 | 488 |
portalIP: 172.30.17.154 |
| 492 | 489 |
ports: |
| ... | ... |
@@ -6,9 +6,6 @@ items: |
| 6 | 6 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 7 | 7 |
name: sinatra-example-2 |
| 8 | 8 |
namespace: example |
| 9 |
- resourceVersion: "74" |
|
| 10 |
- selfLink: /osapi/v1beta1/buildConfigs/sinatra-example-2?namespace=example |
|
| 11 |
- uid: 2b329842-dca0-11e4-aecc-7831c1b76042 |
|
| 12 | 9 |
spec: |
| 13 | 10 |
output: |
| 14 | 11 |
to: |
| ... | ... |
@@ -40,9 +37,6 @@ items: |
| 40 | 40 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 41 | 41 |
name: sinatra-example-2 |
| 42 | 42 |
namespace: example |
| 43 |
- resourceVersion: "75" |
|
| 44 |
- selfLink: /osapi/v1beta1/deploymentConfigs/sinatra-example-2?namespace=example |
|
| 45 |
- uid: 2b3380cb-dca0-11e4-aecc-7831c1b76042 |
|
| 46 | 43 |
spec: |
| 47 | 44 |
replicas: 1 |
| 48 | 45 |
selector: |
| ... | ... |
@@ -90,9 +84,6 @@ items: |
| 90 | 90 |
creationTimestamp: 2015-04-06T21:18:56Z |
| 91 | 91 |
name: sinatra-example-2 |
| 92 | 92 |
namespace: example |
| 93 |
- resourceVersion: "689" |
|
| 94 |
- selfLink: /osapi/v1beta1/imageRepositories/sinatra-example-2?namespace=example |
|
| 95 |
- uid: 888d5256-dca2-11e4-aecc-7831c1b76043 |
|
| 96 | 93 |
spec: {}
|
| 97 | 94 |
status: |
| 98 | 95 |
dockerImageRepository: "" |
| ... | ... |
@@ -102,9 +93,6 @@ items: |
| 102 | 102 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 103 | 103 |
name: sinatra-example-2 |
| 104 | 104 |
namespace: example |
| 105 |
- resourceVersion: "72" |
|
| 106 |
- selfLink: /api/v1beta1/services/sinatra-example-2?namespace=example |
|
| 107 |
- uid: 2b315406-dca0-11e4-aecc-7831c1b76042 |
|
| 108 | 105 |
spec: |
| 109 | 106 |
portalIP: 172.30.17.48 |
| 110 | 107 |
ports: |
| ... | ... |
@@ -6,9 +6,6 @@ items: |
| 6 | 6 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 7 | 7 |
name: sinatra-example-1 |
| 8 | 8 |
namespace: example |
| 9 |
- resourceVersion: "671" |
|
| 10 |
- selfLink: /osapi/v1beta1/buildConfigs/sinatra-example-1?namespace=example |
|
| 11 |
- uid: 2b329842-dca0-11e4-aecc-7831c1b76042 |
|
| 12 | 9 |
spec: |
| 13 | 10 |
output: |
| 14 | 11 |
to: |
| ... | ... |
@@ -40,9 +37,6 @@ items: |
| 40 | 40 |
creationTimestamp: 2015-04-06T21:18:56Z |
| 41 | 41 |
name: sinatra-example-1 |
| 42 | 42 |
namespace: example |
| 43 |
- resourceVersion: "689" |
|
| 44 |
- selfLink: /osapi/v1beta1/imageRepositories/sinatra-example-1?namespace=example |
|
| 45 |
- uid: 888d5256-dca2-11e4-aecc-7831c1b76043 |
|
| 46 | 43 |
spec: {}
|
| 47 | 44 |
status: |
| 48 | 45 |
dockerImageRepository: "" |
| ... | ... |
@@ -54,9 +48,6 @@ items: |
| 54 | 54 |
buildconfig: sinatra-example-1 |
| 55 | 55 |
name: sinatra-example-1-1 |
| 56 | 56 |
namespace: example |
| 57 |
- resourceVersion: "689" |
|
| 58 |
- selfLink: /osapi/v1beta1/builds/sinatra-example-1-1?namespace=example |
|
| 59 |
- uid: 888d5256-dca2-11e4-aecc-7831c1b76042 |
|
| 60 | 57 |
spec: |
| 61 | 58 |
output: |
| 62 | 59 |
to: |
| ... | ... |
@@ -82,9 +73,6 @@ items: |
| 82 | 82 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 83 | 83 |
name: sinatra-example-1 |
| 84 | 84 |
namespace: example |
| 85 |
- resourceVersion: "75" |
|
| 86 |
- selfLink: /osapi/v1beta1/deploymentConfigs/sinatra-example-1?namespace=example |
|
| 87 |
- uid: 2b3380cb-dca0-11e4-aecc-7831c1b76042 |
|
| 88 | 85 |
spec: |
| 89 | 86 |
replicas: 1 |
| 90 | 87 |
selector: |
| ... | ... |
@@ -132,9 +120,6 @@ items: |
| 132 | 132 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 133 | 133 |
name: sinatra-example-1 |
| 134 | 134 |
namespace: example |
| 135 |
- resourceVersion: "72" |
|
| 136 |
- selfLink: /api/v1beta1/services/sinatra-example-1?namespace=example |
|
| 137 |
- uid: 2b315406-dca0-11e4-aecc-7831c1b76042 |
|
| 138 | 135 |
spec: |
| 139 | 136 |
portalIP: 172.30.17.47 |
| 140 | 137 |
ports: |
| ... | ... |
@@ -6,9 +6,6 @@ items: |
| 6 | 6 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 7 | 7 |
name: sinatra-app-example |
| 8 | 8 |
namespace: example |
| 9 |
- resourceVersion: "671" |
|
| 10 |
- selfLink: /osapi/v1beta1/buildConfigs/sinatra-app-example?namespace=example |
|
| 11 |
- uid: 2b329842-dca0-11e4-aecc-7831c1b76042 |
|
| 12 | 9 |
spec: |
| 13 | 10 |
output: |
| 14 | 11 |
to: |
| ... | ... |
@@ -40,9 +37,6 @@ items: |
| 40 | 40 |
creationTimestamp: 2015-04-06T21:18:56Z |
| 41 | 41 |
name: sinatra-app-example |
| 42 | 42 |
namespace: example |
| 43 |
- resourceVersion: "689" |
|
| 44 |
- selfLink: /osapi/v1beta1/imageRepositories/sinatra-app-example?namespace=example |
|
| 45 |
- uid: 888d5256-dca2-11e4-aecc-7831c1b76043 |
|
| 46 | 43 |
spec: {}
|
| 47 | 44 |
status: |
| 48 | 45 |
dockerImageRepository: "" |
| ... | ... |
@@ -54,9 +48,6 @@ items: |
| 54 | 54 |
buildconfig: sinatra-app-example |
| 55 | 55 |
name: sinatra-app-example-1 |
| 56 | 56 |
namespace: example |
| 57 |
- resourceVersion: "689" |
|
| 58 |
- selfLink: /osapi/v1beta1/builds/sinatra-app-example-1?namespace=example |
|
| 59 |
- uid: 888d5256-dca2-11e4-aecc-7831c1b76042 |
|
| 60 | 57 |
spec: |
| 61 | 58 |
output: |
| 62 | 59 |
to: |
| ... | ... |
@@ -91,9 +82,6 @@ items: |
| 91 | 91 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 92 | 92 |
name: sinatra-app-example-a |
| 93 | 93 |
namespace: example |
| 94 |
- resourceVersion: "75" |
|
| 95 |
- selfLink: /osapi/v1beta1/deploymentConfigs/sinatra-app-example?namespace=example |
|
| 96 |
- uid: 2b3380cb-dca0-11e4-aecc-7831c1b76042 |
|
| 97 | 94 |
spec: |
| 98 | 95 |
replicas: 1 |
| 99 | 96 |
selector: |
| ... | ... |
@@ -141,9 +129,6 @@ items: |
| 141 | 141 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 142 | 142 |
name: sinatra-app-example-b |
| 143 | 143 |
namespace: example |
| 144 |
- resourceVersion: "75" |
|
| 145 |
- selfLink: /osapi/v1beta1/deploymentConfigs/sinatra-app-example?namespace=example |
|
| 146 |
- uid: 2b3380cb-dca0-11e4-aecc-7831c1b76042 |
|
| 147 | 144 |
spec: |
| 148 | 145 |
replicas: 1 |
| 149 | 146 |
selector: |
| ... | ... |
@@ -191,9 +176,6 @@ items: |
| 191 | 191 |
creationTimestamp: 2015-04-06T21:02:00Z |
| 192 | 192 |
name: sinatra-app-example |
| 193 | 193 |
namespace: example |
| 194 |
- resourceVersion: "72" |
|
| 195 |
- selfLink: /api/v1beta1/services/sinatra-app-example?namespace=example |
|
| 196 |
- uid: 2b315406-dca0-11e4-aecc-7831c1b76042 |
|
| 197 | 194 |
spec: |
| 198 | 195 |
portalIP: 172.30.17.49 |
| 199 | 196 |
ports: |