Updating components to use v1beta3

This commit is contained in:
nikhiljindal
2015-04-02 13:15:39 -07:00
parent e49424785e
commit f2b72931fc
16 changed files with 40 additions and 35 deletions

View File

@@ -152,6 +152,7 @@ function query_pods() {
for i in $(seq 1 10); do
pods_unsorted=($(${KUBECTL} get pods -o template \
'--template={{range.items}}{{.id}} {{end}}' \
'--api-version=v1beta1' \
-l name="$1"))
found="${#pods_unsorted[*]}"
if [[ "${found}" == "$2" ]]; then
@@ -185,7 +186,7 @@ function wait_for_pods() {
echo "Waiting for ${pods_needed} pods to become 'running'"
pods_needed="$2"
for id in ${pods_sorted}; do
status=$(${KUBECTL} get pods "${id}" -o template --template='{{.currentState.status}}')
status=$(${KUBECTL} get pods "${id}" -o template --template='{{.currentState.status}}' --api-version=v1beta1)
if [[ "${status}" == "Running" ]]; then
pods_needed=$((pods_needed-1))
fi
@@ -311,9 +312,9 @@ svc1_pods=$(query_pods "${svc1_name}" "${svc1_count}")
svc2_pods=$(query_pods "${svc2_name}" "${svc2_count}")
# Get the portal IPs.
svc1_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc1_name}")
svc1_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc1_name}" --api-version=v1beta1)
test -n "${svc1_ip}" || error "Service1 IP is blank"
svc2_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc2_name}")
svc2_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc2_name}" --api-version=v1beta1)
test -n "${svc2_ip}" || error "Service2 IP is blank"
if [[ "${svc1_ip}" == "${svc2_ip}" ]]; then
error "Portal IPs conflict: ${svc1_ip}"
@@ -383,7 +384,7 @@ wait_for_pods "${svc3_name}" "${svc3_count}"
svc3_pods=$(query_pods "${svc3_name}" "${svc3_count}")
# Get the portal IP.
svc3_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc3_name}")
svc3_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc3_name}" --api-version=v1beta1)
test -n "${svc3_ip}" || error "Service3 IP is blank"
echo "Verifying the portals from the host"
@@ -439,7 +440,7 @@ wait_for_pods "${svc4_name}" "${svc4_count}"
svc4_pods=$(query_pods "${svc4_name}" "${svc4_count}")
# Get the portal IP.
svc4_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc4_name}")
svc4_ip=$(${KUBECTL} get services -o template '--template={{.portalIP}}' "${svc4_name}" --api-version=v1beta1)
test -n "${svc4_ip}" || error "Service4 IP is blank"
if [[ "${svc4_ip}" == "${svc2_ip}" || "${svc4_ip}" == "${svc3_ip}" ]]; then
error "Portal IPs conflict: ${svc4_ip}"