Merge pull request #87629 from pjh/gcp-windows-nodes-20200114

Update GCP Windows node image versions
This commit is contained in:
Kubernetes Prow Robot 2020-02-01 18:33:34 -08:00 committed by GitHub
commit a77ed7234c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 23 deletions

View File

@ -63,7 +63,7 @@ MIG_WAIT_UNTIL_STABLE_TIMEOUT=${MIG_WAIT_UNTIL_STABLE_TIMEOUT:-1800}
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win1809}
WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win2019}
if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then
MASTER_OS_DISTRIBUTION="gci"

View File

@ -66,7 +66,7 @@ MIG_WAIT_UNTIL_STABLE_TIMEOUT=${MIG_WAIT_UNTIL_STABLE_TIMEOUT:-1800}
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win1809}
WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win2019}
if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then
MASTER_OS_DISTRIBUTION="gci"

View File

@ -83,14 +83,16 @@ function set-linux-node-image() {
# Requires:
# WINDOWS_NODE_OS_DISTRIBUTION
# Sets:
# WINDOWS_NODE_IMAGE_FAMILY
# WINDOWS_NODE_IMAGE_PROJECT
# WINDOWS_NODE_IMAGE
function set-windows-node-image() {
WINDOWS_NODE_IMAGE_PROJECT="windows-cloud"
if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then
WINDOWS_NODE_IMAGE_FAMILY="windows-2019-core-for-containers"
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-for-containers-v20200114"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1909" ]]; then
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-for-containers-v20200114"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1809" ]]; then
WINDOWS_NODE_IMAGE_FAMILY="windows-1809-core-for-containers"
WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200114"
else
echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2
exit 1
@ -2206,9 +2208,7 @@ function create-node-template() {
if [[ "${os}" == 'linux' ]]; then
node_image_flags="--image-project ${NODE_IMAGE_PROJECT} --image ${NODE_IMAGE}"
elif [[ "${os}" == 'windows' ]]; then
# TODO(pjh): revert back to using WINDOWS_NODE_IMAGE_FAMILY instead of
# pinning to the v20190312 image once #76666 is resolved.
node_image_flags="--image-project ${WINDOWS_NODE_IMAGE_PROJECT} --image=windows-server-1809-dc-core-for-containers-v20190709"
node_image_flags="--image-project ${WINDOWS_NODE_IMAGE_PROJECT} --image ${WINDOWS_NODE_IMAGE}"
else
echo "Unknown OS ${os}" >&2
exit 1

View File

@ -84,9 +84,12 @@ Now bring up a cluster using one of the following two methods:
```
# Invoke kube-up.sh with these environment variables:
# PROJECT: text name of your GCP project.
# WINDOWS_NODE_OS_DISTRIBUTION: the Windows version you want your nodes to
# run, e.g. win2019 or win1909.
# KUBE_UP_AUTOMATIC_CLEANUP (optional): cleans up existing cluster without
# prompting.
PROJECT=${CLOUDSDK_CORE_PROJECT} KUBE_UP_AUTOMATIC_CLEANUP=true ./cluster/kube-up.sh
PROJECT=${CLOUDSDK_CORE_PROJECT} WINDOWS_NODE_OS_DISTRIBUTION=win2019 \
KUBE_UP_AUTOMATIC_CLEANUP=true ./cluster/kube-up.sh
```
To teardown the cluster run:
@ -99,10 +102,12 @@ PROJECT=${CLOUDSDK_CORE_PROJECT} ./cluster/kube-down.sh
If you have built your own release binaries following step 1, run the following
command:
```
PROJECT=${CLOUDSDK_CORE_PROJECT} ./hack/e2e-internal/e2e-up.sh
PROJECT=${CLOUDSDK_CORE_PROJECT} WINDOWS_NODE_OS_DISTRIBUTION=win2019 \
./hack/e2e-internal/e2e-up.sh
```
If any e2e cluster exists already, this command will prompt you whether tears down and creates a new one. To teardown existing e2e cluster only, run the command:
If any e2e cluster exists already, this command will prompt you to tear down and
create a new one. To teardown existing e2e cluster only, run the command:
```
PROJECT=${CLOUDSDK_CORE_PROJECT} ./hack/e2e-internal/e2e-down.sh
```