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

Pick a specific GCI version by default on GCE. #31830

Merged
merged 1 commit into from
Sep 1, 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
1 change: 1 addition & 0 deletions cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
# containervm. If you are updating the containervm version, update this
# variable.
CVM_VERSION=container-v1-3-v20160604
GCI_VERSION="gci-dev-54-8743-3-0"
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
Expand Down
1 change: 1 addition & 0 deletions cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
# containervm. If you are updating the containervm version, update this
# variable.
CVM_VERSION=container-v1-3-v20160604
GCI_VERSION="gci-dev-54-8743-3-0"
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
Expand Down
23 changes: 2 additions & 21 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,10 @@ else
exit 1
fi

function get_latest_gci_image() {
# GCI milestone to use
GCI_MILESTONE="53"

# First try to find an active (non-deprecated) image on this milestone.
gci_images=( $(gcloud compute images list --project google-containers \
--no-standard-images --sort-by="~creationTimestamp" \
--regexp="gci-[a-z]+-${GCI_MILESTONE}-.*" --format="table[no-heading](name)") )

# If no active image is available, search across all deprecated images.
if [[ ${#gci_images[@]} == 0 ]] ; then
gci_images=( $(gcloud compute images list --project google-containers \
--no-standard-images --show-deprecated --sort-by="~creationTimestamp" \
--regexp="gci-[a-z]+-${GCI_MILESTONE}-.*" --format="table[no-heading](name)") )
fi

echo "${gci_images[0]}"
}

if [[ "${MASTER_OS_DISTRIBUTION}" == "gci" ]]; then
# If the master image is not set, we use the latest GCI image.
# Otherwise, we respect whatever is set by the user.
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-"$(get_latest_gci_image)"}
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-${GCI_VERSION}}
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
elif [[ "${MASTER_OS_DISTRIBUTION}" == "debian" ]]; then
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-${CVM_VERSION}}
Expand All @@ -69,7 +50,7 @@ fi
if [[ "${NODE_OS_DISTRIBUTION}" == "gci" ]]; then
# If the node image is not set, we use the latest GCI image.
# Otherwise, we respect whatever is set by the user.
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-"$(get_latest_gci_image)"}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${GCI_VERSION}}
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
elif [[ "${NODE_OS_DISTRIBUTION}" == "debian" ]]; then
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e_node/jenkins/image-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ images:
image: e2e-node-containervm-v20160321-image
project: kubernetes-node-e2e-images
gci-family:
image_regex: gci-dev-.*
image_regex: gci-dev-54-8743-3-0
project: google-containers
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml"