Skip to content

Commit

Permalink
build windows 2025 CNI statelss CNI binary
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyufan2 committed Jun 11, 2024
1 parent aa2577f commit 606c17d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions cns/windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 606c17d

Please sign in to comment.