From 5a89a0a6c3b6d8a354b5a145db9e0ad945ef81ec Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Thu, 21 Oct 2021 10:17:47 -0700 Subject: [PATCH] Add windows templates to ci-entrypoint.sh --- docs/book/src/developers/development.md | 1 + scripts/ci-entrypoint.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/book/src/developers/development.md b/docs/book/src/developers/development.md index afbc3fa92d3..3cc447e37a4 100644 --- a/docs/book/src/developers/development.md +++ b/docs/book/src/developers/development.md @@ -504,6 +504,7 @@ You can optionally set the following variables: | `CI_VERSION` | Provide a custom CI version of Kubernetes. By default, the latest master commit will be used. | | `TEST_CCM` | Build a cluster that uses custom versions of the Azure cloud-provider cloud-controller-manager and node-controller-manager images | | `EXP_MACHINE_POOL` | Use [Machine Pool](../topics/machinepools.md) for worker machines. | +| `TEST_WINDOWS` | Build a cluster that has Windows worker nodes. | | `REGISTRY` | Registry to push any custom k8s images or cloud provider images built. | | `CLUSTER_TEMPLATE` | Use a custom cluster template. By default, the script will choose the appropriate cluster template based on existing environment variabes. | diff --git a/scripts/ci-entrypoint.sh b/scripts/ci-entrypoint.sh index c346c4a93c0..3c6c7ecc942 100755 --- a/scripts/ci-entrypoint.sh +++ b/scripts/ci-entrypoint.sh @@ -105,6 +105,12 @@ select_cluster_template() { export CLUSTER_TEMPLATE="${CLUSTER_TEMPLATE/custom-builds/custom-builds-machine-pool}" fi fi + + # this requires k8s 1.22+ + if [[ -n "${TEST_WINDOWS:-}" ]]; then + export WINDOWS_WORKER_MACHINE_COUNT="${WINDOWS_WORKER_MACHINE_COUNT:-2}" + export K8S_FEATURE_GATES="WindowsHostProcessContainers=true" + fi } create_cluster() {