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

GCI: Fix the condition for using the default image #25763

Merged
merged 1 commit into from
May 18, 2016
Merged
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
17 changes: 9 additions & 8 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ if [[ "${OS_DISTRIBUTION}" == "debian" || "${OS_DISTRIBUTION}" == "coreos" || "$
elif [[ "${OS_DISTRIBUTION}" == "gci" ]]; then
# TODO(andyzheng0831): Switch to use the GCI specific code.
source "${KUBE_ROOT}/cluster/gce/trusty/helper.sh"
MASTER_IMAGE_PROJECT="google-containers"
# If choosing "gci" disto, at least the cluster master needs to run on GCI image.
# If the user does not set a GCI image for master, we run both master and nodes
# using the latest GCI dev image.
if [[ "${MASTER_IMAGE}" != gci* ]]; then
gci_images=( $(gcloud compute images list --project google-containers \
# If the master or node image is not set, we use the latest GCI dev image.
# Otherwise, we respect whatever set by the user.
gci_images=( $(gcloud compute images list --project google-containers \
--regexp='gci-dev.*' --format='value(name)') )
if [[ -z "${KUBE_GCE_MASTER_IMAGE:-}" ]]; then
MASTER_IMAGE="${gci_images[0]}"
NODE_IMAGE="${MASTER_IMAGE}"
NODE_IMAGE_PROJECT="${MASTER_IMAGE_PROJECT}"
MASTER_IMAGE_PROJECT="google-containers"
fi
if [[ -z "${KUBE_GCE_NODE_IMAGE:-}" ]]; then
NODE_IMAGE="${gci_images[0]}"
NODE_IMAGE_PROJECT="google-containers"
fi
else
echo "Cannot operate on cluster using os distro: ${OS_DISTRIBUTION}" >&2
Expand Down