From 1156f9f9ce45a3f0fdd504437dcc3c898e9d9e48 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 22 Jul 2024 13:20:24 +0000 Subject: [PATCH] test: change default windows tests to use ltsc2022 image --- deploy/example/windows/deployment.yaml | 2 +- deploy/example/windows/statefulset.yaml | 2 +- hack/verify-examples.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deploy/example/windows/deployment.yaml b/deploy/example/windows/deployment.yaml index bb8f6887d9..ca08da420a 100644 --- a/deploy/example/windows/deployment.yaml +++ b/deploy/example/windows/deployment.yaml @@ -29,7 +29,7 @@ spec: "kubernetes.io/os": windows containers: - name: busybox - image: mcr.microsoft.com/windows/servercore:ltsc2019 + image: mcr.microsoft.com/windows/servercore:ltsc2022 command: - "powershell.exe" - "-Command" diff --git a/deploy/example/windows/statefulset.yaml b/deploy/example/windows/statefulset.yaml index be7202982c..a6dd2b9351 100644 --- a/deploy/example/windows/statefulset.yaml +++ b/deploy/example/windows/statefulset.yaml @@ -17,7 +17,7 @@ spec: "kubernetes.io/os": windows containers: - name: statefulset-azurefile - image: mcr.microsoft.com/windows/servercore:ltsc2019 + image: mcr.microsoft.com/windows/servercore:ltsc2022 command: - "powershell.exe" - "-Command" diff --git a/hack/verify-examples.sh b/hack/verify-examples.sh index ce9dddd7ff..d1dc566e12 100755 --- a/hack/verify-examples.sh +++ b/hack/verify-examples.sh @@ -20,7 +20,7 @@ if [[ "$#" -eq 0 ]]; then exit 1 fi -echo "begin to create deployment examples ..." +echo "begin to create deployment examples with parameter ", $1 kubectl apply -f deploy/example/storageclass-azurefile-csi.yaml @@ -47,9 +47,9 @@ if [[ "$1" == "linux" ]]; then ) fi -if [[ "$1" == "windows-2022" ]]; then - sed -i 's/ltsc2019/ltsc2022/g' deploy/example/windows/deployment.yaml - sed -i 's/ltsc2019/ltsc2022/g' deploy/example/windows/statefulset.yaml +if ! [[ "$1" == "*windows-2022*" ]]; then + sed -i 's/ltsc2022/ltsc2019/g' deploy/example/windows/statefulset.yaml + sed -i 's/ltsc2022/ltsc2019/g' deploy/example/windows/deployment.yaml fi if [[ "$1" == *"windows"* ]]; then