Report information about errors deployments
This commit is contained in:
parent
d5a0d34e37
commit
db04359b58
8 changed files with 34 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -47,9 +47,6 @@ ifeq ($(ARCH),ppc64le)
|
|||
QEMUARCH=ppc64le
|
||||
GOARCH=ppc64le
|
||||
endif
|
||||
#ifeq ($(ARCH),s390x)
|
||||
# QEMUARCH=s390x
|
||||
#endif
|
||||
|
||||
TEMP_DIR := $(shell mktemp -d)
|
||||
|
||||
|
|
|
@ -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 --
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 && \
|
||||
|
@ -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..."
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue