Skip to content

Commit 5961195

Browse files
committed
Squashed 'release-tools/' changes from c6a88c6..ece0f50
ece0f50 check namespace for snapshot-controller 3b6d17b Merge pull request kubernetes-csi#118 from pohly/cloud-build-timeout 9318c6c cloud build: double the timeout, now 1 hour 86ff580 Merge pull request kubernetes-csi#116 from andyzhangx/export-image-name c3a9662 allow export image name and registry name git-subtree-dir: release-tools git-subtree-split: ece0f50
1 parent 54ce7b2 commit 5961195

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

build.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
# This is the default. It can be overridden in the main Makefile after
2222
# including build.make.
23-
REGISTRY_NAME=quay.io/k8scsi
23+
REGISTRY_NAME?=quay.io/k8scsi
2424

2525
# Can be set to -mod=vendor to ensure that the "vendor" directory is used.
2626
GOFLAGS_VENDOR=

cloudbuild.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# To promote release images, see https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage.
1717

1818
# This must be specified in seconds. If omitted, defaults to 600s (10 mins).
19-
timeout: 1800s
19+
# Building three images in external-snapshotter takes roughly half an hour,
20+
# sometimes more.
21+
timeout: 3600s
2022
# This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
2123
# or any new substitutions added in the future.
2224
options:

prow.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -796,16 +796,17 @@ install_snapshot_controller() {
796796
echo "kubectl apply -f ${SNAPSHOT_CONTROLLER_YAML}(modified)"
797797
done
798798
else
799-
echo "kubectl apply -f ${CONTROLLER_DIR}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml"
800-
kubectl apply -f "${CONTROLLER_DIR}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml"
799+
echo "kubectl apply -f $SNAPSHOT_CONTROLLER_YAML"
800+
kubectl apply -f "$SNAPSHOT_CONTROLLER_YAML"
801801
fi
802802
803803
cnt=0
804-
expected_running_pods=$(curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${CSI_SNAPSHOTTER_VERSION}"/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml | grep replicas | cut -d ':' -f 2-)
805-
while [ "$(kubectl get pods -l app=snapshot-controller | grep 'Running' -c)" -lt "$expected_running_pods" ]; do
804+
expected_running_pods=$(kubectl apply --dry-run=client -o "jsonpath={.spec.replicas}" -f "$SNAPSHOT_CONTROLLER_YAML")
805+
expected_namespace=$(kubectl apply --dry-run=client -o "jsonpath={.metadata.namespace}" -f "$SNAPSHOT_CONTROLLER_YAML")
806+
while [ "$(kubectl get pods -n "$expected_namespace" -l app=snapshot-controller | grep 'Running' -c)" -lt "$expected_running_pods" ]; do
806807
if [ $cnt -gt 30 ]; then
807808
echo "snapshot-controller pod status:"
808-
kubectl describe pods -l app=snapshot-controller
809+
kubectl describe pods -n "$expected_namespace" -l app=snapshot-controller
809810
echo >&2 "ERROR: snapshot controller not ready after over 5 min"
810811
exit 1
811812
fi

0 commit comments

Comments
 (0)