Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-default etcd image handling in kubemark #36421

Merged
merged 1 commit into from Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/kubemark/common.sh
Expand Up @@ -22,12 +22,12 @@ source "${KUBE_ROOT}/cluster/lib/util.sh"
# what what is default in hack/lib/etcd.sh
# To avoid it, if it is empty, we set it to 'avoid-overwrite' and
# clean it after that.
if [ -z "${ETCD_VERSION}" ]; then
ETCD_VERSION="avoid-overwrite"
if [ -z "${ETCD_IMAGE}" ]; then
ETCD_IMAGE="avoid-overwrite"
fi
source "${KUBE_ROOT}/hack/lib/init.sh"
if [ "${ETCD_VERSION}" == "avoid-overwrite" ]; then
ETCD_VERSION=""
if [ "${ETCD_IMAGE}" == "avoid-overwrite" ]; then
ETCD_IMAGE=""
fi

detect-project &> /dev/null
Expand Down
10 changes: 5 additions & 5 deletions test/kubemark/start-kubemark-master.sh
Expand Up @@ -19,10 +19,10 @@
EVENT_STORE_IP=$1
EVENT_STORE_URL="http://${EVENT_STORE_IP}:4002"
NUM_NODES=$2
KUBEMARK_ETCD_VERSION=$3
if [[ -z "${KUBEMARK_ETCD_VERSION}" ]]; then
KUBEMARK_ETCD_IMAGE=$3
if [[ -z "${KUBEMARK_ETCD_IMAGE}" ]]; then
# Default etcd version.
KUBEMARK_ETCD_VERSION="2.2.1"
KUBEMARK_ETCD_IMAGE="2.2.1"
fi

function retry() {
Expand Down Expand Up @@ -88,7 +88,7 @@ if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then
# Retry starting etcd to avoid pulling image errors.
retry sudo docker run --net=host \
-v /var/etcd/data-events:/var/etcd/data -v /var/log:/var/log -d \
gcr.io/google_containers/etcd:${KUBEMARK_ETCD_VERSION} /bin/sh -c "/usr/local/bin/etcd \
gcr.io/google_containers/etcd:${KUBEMARK_ETCD_IMAGE} /bin/sh -c "/usr/local/bin/etcd \
--listen-peer-urls http://127.0.0.1:2381 \
--advertise-client-urls=http://127.0.0.1:4002 \
--listen-client-urls=http://0.0.0.0:4002 \
Expand All @@ -98,7 +98,7 @@ fi
# Retry starting etcd to avoid pulling image errors.
retry sudo docker run --net=host \
-v /var/etcd/data:/var/etcd/data -v /var/log:/var/log -d \
gcr.io/google_containers/etcd:${KUBEMARK_ETCD_VERSION} /bin/sh -c "/usr/local/bin/etcd \
gcr.io/google_containers/etcd:${KUBEMARK_ETCD_IMAGE} /bin/sh -c "/usr/local/bin/etcd \
--listen-peer-urls http://127.0.0.1:2380 \
--advertise-client-urls=http://127.0.0.1:2379 \
--listen-client-urls=http://0.0.0.0:2379 \
Expand Down
2 changes: 1 addition & 1 deletion test/kubemark/start-kubemark.sh
Expand Up @@ -148,7 +148,7 @@ gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \

gcloud compute ssh "${MASTER_NAME}" --zone="${ZONE}" --project="${PROJECT}" \
--command="chmod a+x configure-kubectl.sh && chmod a+x start-kubemark-master.sh && \
sudo ./start-kubemark-master.sh ${EVENT_STORE_IP:-127.0.0.1} ${NUM_NODES:-0} ${ETCD_VERSION:-}"
sudo ./start-kubemark-master.sh ${EVENT_STORE_IP:-127.0.0.1} ${NUM_NODES:-0} ${ETCD_IMAGE:-}"

# create kubeconfig for Kubelet:
KUBECONFIG_CONTENTS=$(echo "apiVersion: v1
Expand Down