From 606c17dd1db84bcbc5fdb5ca99fe7782596328f8 Mon Sep 17 00:00:00 2001 From: paulyufan2 Date: Tue, 11 Jun 2024 15:31:08 -0400 Subject: [PATCH] build windows 2025 CNI statelss CNI binary --- .pipelines/pipeline.yaml | 16 +++++++++++++--- Makefile | 6 ++++-- cns/windows.Dockerfile | 3 +++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 8db588f8af5..24d1544795a 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -236,6 +236,11 @@ stages: name: cni-dropgz os: windows os_version: ltsc2022 + cni_dropgz_windows2025_amd64: + arch: amd64 + name: cni-dropgz + os: windows + os_version: ltsc2022-KB5035857 cns_linux_amd64: arch: amd64 name: cns @@ -254,6 +259,11 @@ stages: arch: amd64 name: ipv6-hp-bpf os: linux + cns_windows2025_amd64: + arch: amd64 + name: cns + os: windows + os_version: win2025 npm_linux_amd64: arch: amd64 name: npm @@ -365,11 +375,11 @@ stages: platforms: linux/amd64 linux/arm64 windows/amd64 cni_dropgz: name: cni-dropgz - os_versions: ltsc2019 ltsc2022 + os_versions: ltsc2019 ltsc2022 ltsc2022-KB5035857 platforms: linux/amd64 linux/arm64 windows/amd64 cns: name: cns - os_versions: ltsc2019 ltsc2022 + os_versions: ltsc2019 ltsc2022 win2025 platforms: linux/amd64 linux/arm64 windows/amd64 ipv6_hp_bpf: name: ipv6-hp-bpf @@ -599,7 +609,7 @@ stages: clusterName: "mtcluster" swiftv2_dummy_e2e: name: swiftv2_dummy_e2e - clusterName: "swiftv2dummy" + clusterName: "swiftv2dummy" steps: - template: templates/delete-cluster.yaml parameters: diff --git a/Makefile b/Makefile index 69189413765..14d986ece34 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,8 @@ GOOSES ?= "linux windows" # To override at the cli do: GOOSES="\"darwin bsd\"" GOARCHES ?= "amd64 arm64" # To override at the cli do: GOARCHES="\"ppc64 mips\"" ltsc2019 = "10.0.17763.4010" ltsc2022 = "10.0.20348.643" +ltsc2022-KB5035857 = "10.0.26100.1" +win2025 = "10.0.26100.1" # Windows specific extensions # set these based on the GOOS, not the OS @@ -185,11 +187,11 @@ azure-ipam-binary: # Build the ipv6-hp-bpf binary. ipv6-hp-bpf-binary: - cd $(IPV6_HP_BPF_DIR) && CGO_ENABLED=0 go generate ./... + cd $(IPV6_HP_BPF_DIR) && CGO_ENABLED=0 go generate ./... cd $(IPV6_HP_BPF_DIR)/cmd/ipv6-hp-bpf && CGO_ENABLED=0 go build -v -o $(IPV6_HP_BPF_BUILD_DIR)/ipv6-hp-bpf$(EXE_EXT) -ldflags "-X main.version=$(IPV6_HP_BPF_VERSION)" -gcflags="-dwarflocationlists=true" # Libraries for ipv6-hp-bpf -ipv6-hp-bpf-lib: +ipv6-hp-bpf-lib: ifeq ($(GOARCH),amd64) sudo apt-get update && sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-multilib for dir in /usr/include/x86_64-linux-gnu/*; do sudo ln -sfn "$$dir" /usr/include/$$(basename "$$dir"); done diff --git a/cns/windows.Dockerfile b/cns/windows.Dockerfile index 4eb831b6aab..2364bf37f9f 100644 --- a/cns/windows.Dockerfile +++ b/cns/windows.Dockerfile @@ -13,6 +13,9 @@ FROM mcr.microsoft.com/windows/servercore@sha256:6fdf140282a2f809dae9b13fe441635 # intermediate for win-ltsc2022 FROM mcr.microsoft.com/windows/servercore@sha256:45952938708fbde6ec0b5b94de68bcdec3f8c838be018536b1e9e5bd95e6b943 as ltsc2022 +# FROM mcr.microsoft.com/windows/server/insider:10.0.26080.1 as +FROM mcr.microsoft.com/windows/servercore:ltsc2022-KB5035857-amd64 as win2025 + FROM ${OS_VERSION} COPY --from=builder /usr/local/src/cns/kubeconfigtemplate.yaml kubeconfigtemplate.yaml COPY --from=builder /usr/local/src/npm/examples/windows/setkubeconfigpath.ps1 setkubeconfigpath.ps1