Skip to content

Commit f319489

Browse files
committed
[hack] Drop Windows Server 2019 from machineset.sh
Remove all 2019 cases from AWS, Azure, GCP, and vSphere MachineSet generation. Update option validation and usage to accept only 2022 and 2025.
1 parent 081abc1 commit f319489

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

hack/machineset.sh

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# machineset.sh
88
# OPTIONS
99
# -b Set 'windowsmachineconfig.openshift.io/ignore' label for BYOH use case. Default: false
10-
# -w Windows Server version (optional) 2019 or 2022. Default: 2022
10+
# -w Windows Server version (optional) 2022 or 2025. Default: 2022
1111
# $1/$2 (if -w is used) Action (optional) apply/delete the MachineSet
1212
# PREREQUISITES
1313
# oc to fetch cluster info and apply/delete MachineSets on the cluster(cluster should be logged in)
@@ -87,9 +87,6 @@ get_aws_ms() {
8787
# check Windows version and set AMI filter
8888
filter=""
8989
case "$winver" in
90-
"2019")
91-
filter="Windows_Server-2019-English-Core-Base-????.??.??"
92-
;;
9390
"2025")
9491
filter="Windows_Server-2025-English-Core-Base-????.??.??"
9592
;;
@@ -167,11 +164,6 @@ get_azure_ms() {
167164
local sku=""
168165
local release="latest"
169166
case "$winver" in
170-
"2019")
171-
sku="2019-datacenter-smalldisk"
172-
# TODO: remove when VM SSH issue is patched in Azure cloud
173-
release="17763.6293.240905"
174-
;;
175167
"2025")
176168
sku="2025-datacenter-smalldisk"
177169
;;
@@ -239,9 +231,6 @@ get_gcp_ms() {
239231
# check Windows version and set image family
240232
local image=""
241233
case "$winver" in
242-
"2019")
243-
image="projects/windows-cloud/global/images/family/windows-2019-core"
244-
;;
245234
"2025")
246235
image="projects/windows-cloud/global/images/family/windows-2025-core"
247236
;;
@@ -306,9 +295,6 @@ get_vsphere_ms() {
306295

307296
# set golden image template name based on Windows Server version
308297
case "$winver" in
309-
"2019")
310-
error-exit "No template available for Windows Server 2019 in DevQE vCenter"
311-
;;
312298
"2025")
313299
template="windows-golden-images/windows-server-2025-template-ipv6-disabled"
314300
;;
@@ -430,18 +416,18 @@ winver="2022"
430416
byoh=false
431417
while getopts ":w:b" opt; do
432418
case ${opt} in
433-
w ) # Windows Server version to use in the MachineSet. Defaults to 2022. Other option is 2019.
419+
w ) # Windows Server version to use in the MachineSet. Defaults to 2022. Other option is 2025.
434420
winver="$OPTARG"
435-
if [[ ! "$winver" =~ 2019|2022|2025$ ]]; then
436-
echo "Invalid -w option $winver. Valid options are 2019, 2022 or 2025"
421+
if [[ ! "$winver" =~ 2022|2025$ ]]; then
422+
echo "Invalid -w option $winver. Valid options are 2022 or 2025"
437423
exit 1
438424
fi
439425
;;
440426
b )
441427
byoh=true
442428
;;
443429
\? )
444-
echo "Usage: $0 -w <2019/2022> -b apply/delete"
430+
echo "Usage: $0 -w <2022/2025> -b apply/delete"
445431
exit 0
446432
;;
447433
esac

0 commit comments

Comments
 (0)