... | ... |
@@ -98,9 +98,9 @@ function cleanup() |
98 | 98 |
|
99 | 99 |
echo "[INFO] Dumping build log to ${LOG_DIR}" |
100 | 100 |
|
101 |
- osc get -n test builds --output-version=v1beta1 -t '{{ range .items }}{{.metadata.name}}{{ "\n" }}{{end}}' | xargs -r -l osc build-logs -n test >"${LOG_DIR}/stibuild.log" |
|
102 |
- osc get -n docker builds --output-version=v1beta1 -t '{{ range .items }}{{.metadata.name}}{{ "\n" }}{{end}}' | xargs -r -l osc build-logs -n docker >"${LOG_DIR}/dockerbuild.log" |
|
103 |
- osc get -n custom builds --output-version=v1beta1 -t '{{ range .items }}{{.metadata.name}}{{ "\n" }}{{end}}' | xargs -r -l osc build-logs -n custom >"${LOG_DIR}/custombuild.log" |
|
101 |
+ osc get -n test builds --output-version=v1beta3 -t '{{ range .items }}{{.metadata.name}}{{ "\n" }}{{end}}' | xargs -r -l osc build-logs -n test >"${LOG_DIR}/stibuild.log" |
|
102 |
+ osc get -n docker builds --output-version=v1beta3 -t '{{ range .items }}{{.metadata.name}}{{ "\n" }}{{end}}' | xargs -r -l osc build-logs -n docker >"${LOG_DIR}/dockerbuild.log" |
|
103 |
+ osc get -n custom builds --output-version=v1beta3 -t '{{ range .items }}{{.metadata.name}}{{ "\n" }}{{end}}' | xargs -r -l osc build-logs -n custom >"${LOG_DIR}/custombuild.log" |
|
104 | 104 |
|
105 | 105 |
echo "[INFO] Dumping etcd contents to ${ARTIFACT_DIR}/etcd_dump.json" |
106 | 106 |
set_curl_args 0 1 |
... | ... |
@@ -149,14 +149,14 @@ function wait_for_app() { |
149 | 149 |
|
150 | 150 |
echo "[INFO] Waiting for database service to start" |
151 | 151 |
wait_for_command "osc get -n $1 services | grep database" $((20*TIME_SEC)) |
152 |
- DB_IP=$(osc get -n $1 --output-version=v1beta1 --template="{{ .portalIP }}" service database) |
|
152 |
+ DB_IP=$(osc get -n $1 --output-version=v1beta3 --template="{{ .spec.portalIP }}" service database) |
|
153 | 153 |
|
154 | 154 |
echo "[INFO] Waiting for frontend pod to start" |
155 | 155 |
wait_for_command "osc get -n $1 pods | grep frontend | grep -i Running" $((120*TIME_SEC)) |
156 | 156 |
|
157 | 157 |
echo "[INFO] Waiting for frontend service to start" |
158 | 158 |
wait_for_command "osc get -n $1 services | grep frontend" $((20*TIME_SEC)) |
159 |
- FRONTEND_IP=$(osc get -n $1 --output-version=v1beta1 --template="{{ .portalIP }}" service frontend) |
|
159 |
+ FRONTEND_IP=$(osc get -n $1 --output-version=v1beta3 --template="{{ .spec.portalIP }}" service frontend) |
|
160 | 160 |
|
161 | 161 |
echo "[INFO] Waiting for database to start..." |
162 | 162 |
wait_for_url_timed "http://${DB_IP}:5434" "[INFO] Database says: " $((3*TIME_MIN)) |
... | ... |
@@ -174,7 +174,7 @@ function wait_for_app() { |
174 | 174 |
function wait_for_build() { |
175 | 175 |
echo "[INFO] Waiting for $1 namespace build to complete" |
176 | 176 |
wait_for_command "osc get -n $1 builds | grep -i complete" $((10*TIME_MIN)) "osc get -n $1 builds | grep -i -e failed -e error" |
177 |
- BUILD_ID=`osc get -n $1 builds --output-version=v1beta1 -t "{{with index .items 0}}{{.metadata.name}}{{end}}"` |
|
177 |
+ BUILD_ID=`osc get -n $1 builds --output-version=v1beta3 -t "{{with index .items 0}}{{.metadata.name}}{{end}}"` |
|
178 | 178 |
echo "[INFO] Build ${BUILD_ID} finished" |
179 | 179 |
# TODO: fix |
180 | 180 |
set +e |
... | ... |
@@ -291,7 +291,7 @@ echo "[INFO] Pulled ruby-20-centos7" |
291 | 291 |
|
292 | 292 |
echo "[INFO] Waiting for Docker registry pod to start" |
293 | 293 |
# TODO: simplify when #4702 is fixed upstream |
294 |
-wait_for_command '[[ "$(osc get endpoints docker-registry --output-version=v1beta1 -t "{{ if .endpoints }}{{ len .endpoints }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN)) |
|
294 |
+wait_for_command '[[ "$(osc get endpoints docker-registry --output-version=v1beta3 -t "{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN)) |
|
295 | 295 |
|
296 | 296 |
# services can end up on any IP. Make sure we get the IP we need for the docker registry |
297 | 297 |
DOCKER_REGISTRY=$(osc get --output-version=v1beta3 --template="{{ .spec.portalIP }}:{{ with index .spec.ports 0 }}{{ .port }}{{ end }}" service docker-registry) |
... | ... |
@@ -352,20 +352,20 @@ wait_for_app "test" |
352 | 352 |
#echo "[INFO] Applying Docker application config" |
353 | 353 |
#osc create -n docker -f "${DOCKER_CONFIG_FILE}" |
354 | 354 |
#echo "[INFO] Invoking generic web hook to trigger new docker build using curl" |
355 |
-#curl -k -X POST $API_SCHEME://$API_HOST:$API_PORT/osapi/v1beta1/buildConfigHooks/ruby-sample-build/secret101/generic?namespace=docker && sleep 3 |
|
355 |
+#curl -k -X POST $API_SCHEME://$API_HOST:$API_PORT/osapi/v1beta3/namespaces/docker/buildconfigs/ruby-sample-build/webhooks/secret101/generic && sleep 3 |
|
356 | 356 |
#wait_for_build "docker" |
357 | 357 |
#wait_for_app "docker" |
358 | 358 |
|
359 | 359 |
#echo "[INFO] Applying Custom application config" |
360 | 360 |
#osc create -n custom -f "${CUSTOM_CONFIG_FILE}" |
361 | 361 |
#echo "[INFO] Invoking generic web hook to trigger new custom build using curl" |
362 |
-#curl -k -X POST $API_SCHEME://$API_HOST:$API_PORT/osapi/v1beta1/buildConfigHooks/ruby-sample-build/secret101/generic?namespace=custom && sleep 3 |
|
362 |
+#curl -k -X POST $API_SCHEME://$API_HOST:$API_PORT/osapi/v1beta3/namespaces/custom/buildconfigs/ruby-sample-build/webhooks/secret101/generic && sleep 3 |
|
363 | 363 |
#wait_for_build "custom" |
364 | 364 |
#wait_for_app "custom" |
365 | 365 |
|
366 | 366 |
# ensure the router is started |
367 | 367 |
# TODO: simplify when #4702 is fixed upstream |
368 |
-wait_for_command '[[ "$(osc get endpoints router --output-version=v1beta1 -t "{{ if .endpoints }}{{ len .endpoints }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN)) |
|
368 |
+wait_for_command '[[ "$(osc get endpoints router --output-version=v1beta3 -t "{{ if .subsets }}{{ len .subsets }}{{ else }}0{{ end }}" || echo "0")" != "0" ]]' $((5*TIME_MIN)) |
|
369 | 369 |
|
370 | 370 |
echo "[INFO] Validating routed app response..." |
371 | 371 |
validate_response "-s -k --resolve www.example.com:443:${CONTAINER_ACCESSIBLE_API_HOST} https://www.example.com" "Hello from OpenShift" 0.2 50 |
... | ... |
@@ -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)) |
... | ... |
@@ -9,9 +9,9 @@ import ( |
9 | 9 |
var ( |
10 | 10 |
KnownKubernetesAPILevels = []string{"v1beta1", "v1beta2", "v1beta3", "v1"} |
11 | 11 |
KnownOpenShiftAPILevels = []string{"v1beta1", "v1beta3", "v1"} |
12 |
- DefaultKubernetesAPILevels = []string{"v1beta1", "v1beta2", "v1beta3", "v1"} |
|
12 |
+ DefaultKubernetesAPILevels = []string{"v1beta3", "v1"} |
|
13 | 13 |
DefaultOpenShiftAPILevels = []string{"v1beta3", "v1"} |
14 |
- DeadKubernetesAPILevels = []string{} |
|
14 |
+ DeadKubernetesAPILevels = []string{"v1beta1", "v1beta2"} |
|
15 | 15 |
DeadOpenShiftAPILevels = []string{"v1beta1"} |
16 | 16 |
) |
17 | 17 |
|
... | ... |
@@ -86,7 +86,7 @@ type MasterConfig struct { |
86 | 86 |
// CORSAllowedOrigins |
87 | 87 |
CORSAllowedOrigins []string |
88 | 88 |
|
89 |
- // APILevels is a list of API levels that should be enabled on startup: v1beta1, v1beta3, v1 as examples |
|
89 |
+ // APILevels is a list of API levels that should be enabled on startup: v1beta3 and v1 as examples |
|
90 | 90 |
APILevels []string |
91 | 91 |
|
92 | 92 |
// MasterPublicURL is how clients can access the OpenShift API server |
... | ... |
@@ -470,7 +470,7 @@ type EtcdConfig struct { |
470 | 470 |
} |
471 | 471 |
|
472 | 472 |
type KubernetesMasterConfig struct { |
473 |
- // APILevels is a list of API levels that should be enabled on startup: v1beta1, v1beta2, v1beta3, v1 as examples |
|
473 |
+ // APILevels is a list of API levels that should be enabled on startup: v1beta3 and v1 as examples |
|
474 | 474 |
APILevels []string |
475 | 475 |
// MasterIP is the public IP address of kubernetes stuff. If empty, the first result from net.InterfaceAddrs will be used. |
476 | 476 |
MasterIP string |