Skip to content

Commit

Permalink
Report information about errors deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Oct 25, 2017
1 parent d5a0d34 commit db04359
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .travis/ingress-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ source $DIR/common.sh

IMAGE=$(make -s -C $DIR/../ image-info)

if docker_tag_exists "aledbf/nginx-ingress-controller" $(echo $IMAGE | jq .tag); then
if docker_tag_exists "kubernetes-ingress-controller/nginx-ingress-controller" $(echo $IMAGE | jq .tag); then
echo "Image already published"
exit 0
fi

echo "building aledbf/nginx-ingress-controller image..."
echo "building kubernetes-ingress-controller/nginx-ingress-controller image..."
make -C $DIR/../ release
2 changes: 1 addition & 1 deletion .travis/nginx-slim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ source $DIR/common.sh

IMAGE=$(make -s -C $DIR/../images/nginx-slim image-info)

if docker_tag_exists "aledbf/nginx-slim" $(echo $IMAGE | jq .tag); then
if docker_tag_exists "kubernetes-ingress-controller/nginx-slim" $(echo $IMAGE | jq .tag); then
echo "Image already published"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion .travis/ubuntu-slim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ source $DIR/common.sh

IMAGE=$(make -s -C $DIR/../images/ubuntu-slim image-info)

if docker_tag_exists "aledbf/ubuntu-slim" $(echo $IMAGE | jq .tag); then
if docker_tag_exists "kubernetes-ingress-controller/ubuntu-slim" $(echo $IMAGE | jq .tag); then
echo "Image already published"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BUILDTAGS=

# Use the 0.0 tag for testing, it shouldn't clobber any release builds
TAG?=0.9.0-beta.15
REGISTRY?=quay.io/aledbf
REGISTRY?=quay.io/kubernetes-ingress-controller
GOOS?=linux
DOCKER?=gcloud docker --
SED_I?=sed -i
Expand Down
5 changes: 1 addition & 4 deletions images/custom-error-pages/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BUILDTAGS=

# Use the 0.0 tag for testing, it shouldn't clobber any release builds
TAG?=0.1
REGISTRY?=aledbf
REGISTRY?=quay.io/kubernetes-ingress-controller
GOOS?=linux
DOCKER?=gcloud docker --
SED_I?=sed -i
Expand Down Expand Up @@ -47,9 +47,6 @@ ifeq ($(ARCH),ppc64le)
QEMUARCH=ppc64le
GOARCH=ppc64le
endif
#ifeq ($(ARCH),s390x)
# QEMUARCH=s390x
#endif

TEMP_DIR := $(shell mktemp -d)

Expand Down
4 changes: 2 additions & 2 deletions images/nginx-slim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# 0.0.0 shouldn't clobber any released builds
TAG ?= 0.27
REGISTRY ?= quay.io/aledbf
REGISTRY ?= quay.io/kubernetes-ingress-controller
ARCH ?= $(shell go env GOARCH)
DOCKER ?= gcloud docker --

Expand All @@ -33,7 +33,7 @@ IMAGE = $(REGISTRY)/$(IMGNAME)
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)

# Set default base image dynamically for each arch
BASEIMAGE?=quay.io/aledbf/ubuntu-slim-$(ARCH):0.14
BASEIMAGE?=quay.io/kubernetes-ingress-controller/ubuntu-slim-$(ARCH):0.14

ifeq ($(ARCH),arm)
QEMUARCH=arm
Expand Down
2 changes: 1 addition & 1 deletion images/ubuntu-slim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

TAG ?= 0.14
REGISTRY = quay.io/aledbf
REGISTRY = quay.io/kubernetes-ingress-controller
ARCH ?= $(shell go env GOARCH)
ALL_ARCH = amd64 arm arm64 ppc64le

Expand Down
31 changes: 25 additions & 6 deletions test/e2e/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'
export JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'

echo "downloading kubectl..."
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && \
Expand Down Expand Up @@ -50,12 +50,31 @@ kubectl set image \
deployments \
--namespace ingress-nginx \
--selector app=ingress-nginx \
nginx-ingress-controller=gcr.io/google_containers/nginx-ingress-controller:test
nginx-ingress-controller=quay.io/kubernetes-ingress-controller/nginx-ingress-controller:test

sleep 5

echo "waiting NGINX ingress pod..."
until kubectl get pods -n ingress-nginx -l app=ingress-nginx -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True";
do
sleep 1;
done

function waitForPod() {
until kubectl get pods -n ingress-nginx -l app=ingress-nginx -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True";
do
sleep 1;
done
}

export -f waitForPod

timeout 10s bash -c waitForPod

if kubectl get pods -n ingress-nginx -l app=ingress-nginx -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True";
then
echo "Kubernetes deployments started"
else
echo "Kubernetes deployments with issues:"
kubectl get pods -n ingress-nginx

echo "Reason:"
kubectl describe pods -n ingress-nginx
exit 1
fi

0 comments on commit db04359

Please sign in to comment.