Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="1.26"
ARG VARIANT="1.27"
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/go-version-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,10 @@ jobs:

# Determine GOEXPERIMENT requirements
if [ "$TARGET_MIN_NUM" -ge 27 ]; then
GOEXP_CGO1="systemcrypto"
GOEXP_CGO0="systemcrypto"
# Go 1.27+ removed the crypto GOEXPERIMENTs and selects system crypto
# automatically, so no GOEXPERIMENT should be set for either CGO mode.
GOEXP_CGO1=""
GOEXP_CGO0=""
elif [ "$TARGET_MIN_NUM" -ge 26 ]; then
GOEXP_CGO1="systemcrypto"
GOEXP_CGO0="ms_nocgo_opensslcrypto"
Expand Down Expand Up @@ -460,7 +462,7 @@ jobs:
incorrect FIPS configuration for the current Go version.

**FIPS rules:**
- CGO_ENABLED=1: GOEXPERIMENT=\`${GOEXP_CGO1}\`
- CGO_ENABLED=1: GOEXPERIMENT=\`${GOEXP_CGO1:-<none>}\`
- CGO_ENABLED=0: GOEXPERIMENT=\`${GOEXP_CGO0:-<none>}\`

**Reference:** https://github.com/microsoft/go/blob/microsoft/main/eng/doc/NocgoOpenSSL.md
Expand Down Expand Up @@ -592,8 +594,8 @@ jobs:

# Determine GOEXPERIMENT rules per version
if [ "$TARGET_MIN_NUM" -ge 27 ]; then
echo "goexp_cgo1=systemcrypto" >> "$GITHUB_OUTPUT"
echo "goexp_cgo0=systemcrypto" >> "$GITHUB_OUTPUT"
echo "goexp_cgo1=" >> "$GITHUB_OUTPUT"
echo "goexp_cgo0=" >> "$GITHUB_OUTPUT"
elif [ "$TARGET_MIN_NUM" -ge 26 ]; then
Comment thread
behzad-mir marked this conversation as resolved.
echo "goexp_cgo1=systemcrypto" >> "$GITHUB_OUTPUT"
echo "goexp_cgo0=ms_nocgo_opensslcrypto" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -675,19 +677,18 @@ jobs:
if [ "$FIPS_READY" = "true" ]; then
FIPS_SECTION="
### FIPS Status: ✅ Already configured
GOEXPERIMENT and distroless/base are already correctly configured.
System crypto and distroless/base are already correctly configured.
No FIPS changes needed for this upgrade."
elif [ "$LATEST_MIN_NUM" -ge 27 ]; then
FIPS_SECTION="
### ⚠️ FIPS / System Crypto Requirements
Go 1.27+ lifts the cgo requirement for systemcrypto on Linux.
\`GOEXPERIMENT=systemcrypto\` can now be set in ALL scripts/Dockerfiles regardless of CGO setting.
Go 1.27+ selects system crypto automatically and lifts the cgo requirement on supported Linux architectures.
Reference: https://github.com/microsoft/go/blob/microsoft/main/eng/doc/NocgoOpenSSL.md

1. Set \`GOEXPERIMENT=systemcrypto\` in ALL Dockerfile templates and pipeline build scripts
2. Remove \`MS_GO_NOSYSTEMCRYPTO=1\` from npm Dockerfiles if present
1. Remove \`GOEXPERIMENT=systemcrypto\`, \`GOEXPERIMENT=nosystemcrypto\`, and \`GOEXPERIMENT=ms_nocgo_opensslcrypto\` from all build scripts and Dockerfiles; these experiments are removed and cause build errors
2. **Keep** \`MS_GO_NOSYSTEMCRYPTO=1\` in the npm build script and npm Dockerfiles. It is an environment variable, **not** a GOEXPERIMENT, and it is still supported in Go 1.27. npm ships on an Ubuntu base without the Microsoft FIPS OpenSSL build, so removing it makes the binary require OpenSSL at startup and panic during initialization
3. Ensure \`MARINER_DISTROLESS_IMG\` in \`build/images.mk\` is \`distroless/base\`
4. Update \`bpf-prog/ipv6-hp-bpf/linux.Dockerfile\` runtime base to \`azurelinux/distroless/base:3.0\`"
4. Update \`bpf-prog/ipv6-hp-bpf/linux.Dockerfile\` runtime base to \`mcr.microsoft.com/azurelinux/distroless/base:3.0\` (keep the full registry prefix — a bare \`azurelinux/...\` reference resolves to Docker Hub and is not pullable)"
elif [ "$LATEST_MIN_NUM" -ge 26 ]; then
FIPS_SECTION="
### ⚠️ FIPS / System Crypto Requirements (CRITICAL — builds will FAIL without this)
Expand All @@ -705,7 +706,7 @@ jobs:
**Steps:**
1. Add \`GOEXPERIMENT=ms_nocgo_opensslcrypto\` to ALL scripts/Dockerfiles/Makefiles with \`CGO_ENABLED=0\` on Linux
2. Add \`GOEXPERIMENT=systemcrypto\` to scripts/Dockerfiles with \`CGO_ENABLED=1\` (cilium-log-collector)
3. Remove \`MS_GO_NOSYSTEMCRYPTO=1\` from npm Dockerfiles and replace with \`GOEXPERIMENT=ms_nocgo_opensslcrypto\`
3. **Keep** \`MS_GO_NOSYSTEMCRYPTO=1\` in the npm build script and npm Dockerfiles — npm ships on an Ubuntu base without the Microsoft FIPS OpenSSL build, so it must stay on the standard Go crypto backend. Do **not** replace it with a GOEXPERIMENT
4. npm Dockerfiles use **plain Go tags** (e.g., \`golang:1.26.4\`) — do NOT add \`-azurelinux3.0\` suffix
5. npm/windows.Dockerfile builds on Linux (\`--platform=linux/amd64\`) — it STILL needs GOEXPERIMENT for CGO=0
6. Ensure \`MARINER_DISTROLESS_IMG\` in \`build/images.mk\` is \`distroless/base\`
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/azure-ip-masq-merger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -eux
FILE_EXT=''

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto

mkdir -p "$OUT_DIR"/bin
mkdir -p "$OUT_DIR"/files
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/azure-ipam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -eux
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto

mkdir -p "$OUT_DIR"/bin
mkdir -p "$OUT_DIR"/files
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/azure-iptables-monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -eux
FILE_EXT=''

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto
export C_INCLUDE_PATH=/usr/include/bpf

mkdir -p "$OUT_DIR"/bin
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/cilium-log-collector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -eux
[[ $OS =~ windows ]] && { echo "cilium-log-collector is not supported on Windows"; exit 1; }
# enable cgo for -buildmode=c-shared
export CGO_ENABLED=1
export GOEXPERIMENT=systemcrypto

mkdir -p "$OUT_DIR"/bin
mkdir -p "$OUT_DIR"/files
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/cni.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mkdir -p "$OUT_DIR"/files
mkdir -p "$OUT_DIR"/bin

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto


CNI_NET_DIR="$REPO_ROOT"/cni/network/plugin
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/cns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -eux
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto

mkdir -p "$OUT_DIR"/files
mkdir -p "$OUT_DIR"/bin
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/dropgz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function files::remove_exe_extensions() {
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto

mkdir -p "$GEN_DIR"
mkdir -p "$OUT_DIR"/bin
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/build/scripts/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ set -eux
# 3. Hardcoded fallback digest below
#
# To update the fallback, run:
# IMG=mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0
# IMG=mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
# echo "${IMG}@$(skopeo inspect docker://${IMG} --format '{{.Digest}}')"
DEFAULT_IMAGE="mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:8f638b09830f92f4005c56756cbafdd56d6460f41d2c1fd12b9bc02a5c85434c"
DEFAULT_IMAGE="mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0@sha256:b40d1e7ecd4acb36102444f787bd626a2b08287fc385bf48ec609053f29f4558"

# Resolves the golang image from the source Dockerfile for the given $name.
# Echoes the image reference, or empty string if it cannot be determined.
Expand Down
1 change: 0 additions & 1 deletion .pipelines/build/scripts/ipv6-hp-bpf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ function findcp::shared_library() {
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''

export CGO_ENABLED=0
export GOEXPERIMENT=ms_nocgo_opensslcrypto
export C_INCLUDE_PATH=/usr/include/bpf

mkdir -p "$OUT_DIR"/bin
Expand Down
12 changes: 5 additions & 7 deletions .pipelines/build/scripts/npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ set -eux

[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''

export CGO_ENABLED=0
# npm ships on the Ubuntu base image (it needs iptables/ipset at runtime), which
# does not provide Microsoft's FIPS-capable OpenSSL. GOEXPERIMENT=ms_nocgo_openssl
# crypto would make the binary require that OpenSSL and crash-loop on FIPS-enabled
# clusters, so use the standard Go crypto backend (matches npm/*.Dockerfile and
# the shipped release/v1.6 image). Components on the AzureLinux distroless base
# use ms_nocgo_opensslcrypto instead.
# npm ships on an Ubuntu base that does not carry the Microsoft FIPS OpenSSL
# build, so use the standard Go crypto backend (matches npm/*.Dockerfile).
# Components on the AzureLinux distroless base use the default system crypto
# backend instead.
export MS_GO_NOSYSTEMCRYPTO=1
export CGO_ENABLED=0

mkdir -p "$OUT_DIR"/files
mkdir -p "$OUT_DIR"/bin
Expand Down
9 changes: 0 additions & 9 deletions .pipelines/cni/cilium/nightly-release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ stages:
ALPINE_ARGS="--build-arg ALPINE_IMAGE=${alpineACR} "
fi

if [ "$(type)" = "docker-operator-generic-image" ]; then
# Apply patch to Dockerfile
DOCKERFILE_PATH="./images/$(directory)/Dockerfile"
echo "Patching Dockerfile: $DOCKERFILE_PATH"

# Add ARG and ENV statements to disable systemcrypto for Microsoft Go
sed -i '/^FROM.*builder/a ARG GOEXPERIMENT=boringcrypto \nENV GOEXPERIMENT=${GOEXPERIMENT}' "$DOCKERFILE_PATH"
fi

BUILD_ARGS=${GO_ARGS}${ALPINE_ARGS}
DOCKER_FLAGS="$BUILD_ARGS" \
make $(type)
Expand Down
5 changes: 2 additions & 3 deletions azure-ip-masq-merger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
ARG ARCH
ARG OS

# mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:829285f9358799b5b9bfb48ee11e604d09b6d7fb7bf5acc22a86f77149fd82e6 AS go
# mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0@sha256:b40d1e7ecd4acb36102444f787bd626a2b08287fc385bf48ec609053f29f4558 AS go

# mcr.microsoft.com/azurelinux/distroless/base:3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/azurelinux/distroless/base:3.0@sha256:387a603a274e74568fd7a0e6d48ef68e631990e3b5149801515fe749a74b5b29 AS mariner-distroless

FROM go AS azure-ip-masq-merger
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
WORKDIR /azure-ip-masq-merger
COPY ./azure-ip-masq-merger .
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/ip-masq-merger -trimpath -ldflags "-s -w -X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand Down
1 change: 0 additions & 1 deletion azure-ip-masq-merger/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ FROM --platform=linux/${ARCH} {{.MARINER_DISTROLESS_PIN}} AS mariner-distroless
FROM go AS azure-ip-masq-merger
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
WORKDIR /azure-ip-masq-merger
COPY ./azure-ip-masq-merger .
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/ip-masq-merger -trimpath -ldflags "-s -w -X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand Down
2 changes: 1 addition & 1 deletion azure-ip-masq-merger/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/Azure/azure-container-networking/azure-ip-masq-merger

go 1.26.0

toolchain go1.26.7
toolchain go1.27.1

require (
github.com/stretchr/testify v1.12.1
Expand Down
6 changes: 2 additions & 4 deletions azure-ipam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ARG DROPGZ_VERSION=v0.0.12
ARG OS_VERSION
ARG OS

# mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:829285f9358799b5b9bfb48ee11e604d09b6d7fb7bf5acc22a86f77149fd82e6 AS go
# mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0@sha256:b40d1e7ecd4acb36102444f787bd626a2b08287fc385bf48ec609053f29f4558 AS go

# mcr.microsoft.com/azurelinux/base/core:3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/azurelinux/base/core:3.0@sha256:daa1142fc6b44e27c8112ec6b4c2d579ddb9bc6b3747504e666010a45a51faa4 AS mariner-core
Expand All @@ -17,7 +17,6 @@ FROM --platform=linux/${ARCH} mcr.microsoft.com/azurelinux/distroless/base:3.0@s
FROM go AS azure-ipam
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
WORKDIR /azure-ipam
COPY ./azure-ipam .
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/azure-ipam -trimpath -ldflags "-s -w -X main.version="$VERSION" -X github.com/Azure/azure-container-networking/azure-ipam/internal/buildinfo.Version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand All @@ -34,7 +33,6 @@ FROM go AS dropgz
ARG DROPGZ_VERSION
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
RUN go mod download github.com/azure/azure-container-networking/dropgz@$DROPGZ_VERSION
WORKDIR /go/pkg/mod/github.com/azure/azure-container-networking/dropgz\@$DROPGZ_VERSION
COPY --from=compressor /payload/* pkg/embed/fs/
Expand Down
2 changes: 0 additions & 2 deletions azure-ipam/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ FROM --platform=linux/${ARCH} {{.MARINER_DISTROLESS_PIN}} AS mariner-distroless
FROM go AS azure-ipam
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
WORKDIR /azure-ipam
COPY ./azure-ipam .
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/azure-ipam -trimpath -ldflags "-s -w -X main.version="$VERSION" -X github.com/Azure/azure-container-networking/azure-ipam/internal/buildinfo.Version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand All @@ -34,7 +33,6 @@ FROM go AS dropgz
ARG DROPGZ_VERSION
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
RUN go mod download github.com/azure/azure-container-networking/dropgz@$DROPGZ_VERSION
WORKDIR /go/pkg/mod/github.com/azure/azure-container-networking/dropgz\@$DROPGZ_VERSION
COPY --from=compressor /payload/* pkg/embed/fs/
Expand Down
2 changes: 1 addition & 1 deletion azure-ipam/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/Azure/azure-container-networking/azure-ipam

go 1.26.1

toolchain go1.26.7
toolchain go1.27.1

require (
github.com/Azure/azure-container-networking v1.8.12
Expand Down
6 changes: 2 additions & 4 deletions azure-iptables-monitor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ FROM mcr.microsoft.com/azurelinux/base/core:3.0@sha256:daa1142fc6b44e27c8112ec6b
# mcr.microsoft.com/azurelinux/distroless/base:3.0
FROM mcr.microsoft.com/azurelinux/distroless/base:3.0@sha256:387a603a274e74568fd7a0e6d48ef68e631990e3b5149801515fe749a74b5b29 AS mariner-distroless

# mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:829285f9358799b5b9bfb48ee11e604d09b6d7fb7bf5acc22a86f77149fd82e6 AS go
# mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0@sha256:b40d1e7ecd4acb36102444f787bd626a2b08287fc385bf48ec609053f29f4558 AS go


FROM go AS azure-iptables-monitor
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
WORKDIR /azure-iptables-monitor
COPY ./azure-iptables-monitor .
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/iptables-monitor -trimpath -ldflags "-s -w -X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand All @@ -31,7 +30,6 @@ COPY ./go.mod ./go.sum ./
RUN tdnf install -y llvm clang libbpf-devel gcc binutils glibc
# Set up C include path for BPF
ENV C_INCLUDE_PATH=/usr/include/bpf
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
# Set up architecture-specific symlinks for cross-compilation support
RUN if [ "$ARCH" = "amd64" ]; then \
ARCH_DIR=x86_64-linux-gnu; \
Expand Down
2 changes: 0 additions & 2 deletions azure-iptables-monitor/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ FROM --platform=linux/${ARCH} {{.GO_PIN}} AS go
FROM go AS azure-iptables-monitor
ARG OS
ARG VERSION
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
WORKDIR /azure-iptables-monitor
COPY ./azure-iptables-monitor .
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/iptables-monitor -trimpath -ldflags "-s -w -X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand All @@ -31,7 +30,6 @@ COPY ./go.mod ./go.sum ./
RUN tdnf install -y llvm clang libbpf-devel gcc binutils glibc
# Set up C include path for BPF
ENV C_INCLUDE_PATH=/usr/include/bpf
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
# Set up architecture-specific symlinks for cross-compilation support
RUN if [ "$ARCH" = "amd64" ]; then \
ARCH_DIR=x86_64-linux-gnu; \
Expand Down
2 changes: 1 addition & 1 deletion azure-iptables-monitor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/Azure/azure-container-networking/azure-iptables-monitor

go 1.26.0

toolchain go1.26.7
toolchain go1.27.1

require (
github.com/coreos/go-iptables v0.8.0
Expand Down
2 changes: 1 addition & 1 deletion bpf-prog/ipv6-hp-bpf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/Azure/azure-container-networking/bpf-prog/ipv6-hp-bpf

go 1.25.0

toolchain go1.26.7
toolchain go1.27.1

require (
github.com/cilium/ebpf v0.22.0
Expand Down
5 changes: 2 additions & 3 deletions bpf-prog/ipv6-hp-bpf/linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG ARCH
# IMG=mcr.microsoft.com/oss/go/microsoft/golang:1.26.7
# IMG=mcr.microsoft.com/oss/go/microsoft/golang:1.27.1
# echo "${IMG}@$(skopeo inspect docker://${IMG} --format '{{.Digest}}')"
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.26.7@sha256:be14ce4ce048adf5584ce3a0919d21987284e2235b6e7e9bb0e6a01133870be9 AS go
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.27.1@sha256:edd9a9ae78ad898771bc506ae596e67b6db7f4f055616982805ebd75764d3f77 AS go
ARG VERSION
ARG DEBUG
ARG OS
Expand Down Expand Up @@ -36,7 +36,6 @@ RUN if [ "$ARCH" = "arm64" ]; then \
cp /lib/"$ARCH"/libbsd.so.0 /tmp/lib/ && \
cp /lib/"$ARCH"/libmd.so.0 /tmp/lib/
ENV C_INCLUDE_PATH=/usr/include/bpf
ENV GOEXPERIMENT=ms_nocgo_opensslcrypto
RUN if [ "$DEBUG" = "true" ]; then echo "\n#define DEBUG" >> /bpf-prog/ipv6-hp-bpf/include/helper.h; fi
RUN GOOS=$OS CGO_ENABLED=0 go generate ./...
RUN GOOS=$OS CGO_ENABLED=0 go build -a -o /go/bin/ipv6-hp-bpf -trimpath -ldflags "-s -w -X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
Expand Down
2 changes: 1 addition & 1 deletion build/images.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Source images
GOPATH ?= $(shell go env GOPATH)

export GO_IMG ?= mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0
export GO_IMG ?= mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
export MARINER_CORE_IMG ?= mcr.microsoft.com/azurelinux/base/core:3.0
export MARINER_DISTROLESS_IMG ?= mcr.microsoft.com/azurelinux/distroless/base:3.0
export WIN_HPC_IMG ?= mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0
Expand Down
5 changes: 2 additions & 3 deletions cilium-log-collector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
ARG ARCH
ARG OS

# mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:829285f9358799b5b9bfb48ee11e604d09b6d7fb7bf5acc22a86f77149fd82e6 AS go
# mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0@sha256:b40d1e7ecd4acb36102444f787bd626a2b08287fc385bf48ec609053f29f4558 AS go

FROM go AS fluent-bit-plugin
ARG VERSION
ENV GOEXPERIMENT=systemcrypto
WORKDIR /cilium-log-collector
COPY ./cilium-log-collector .
RUN go build -buildmode=c-shared -a -o out_azure_app_insights.so -trimpath -ldflags "-X main.version=$VERSION" -gcflags="-dwarflocationlists=true" .
Expand Down
1 change: 0 additions & 1 deletion cilium-log-collector/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ FROM --platform=linux/${ARCH} {{.GO_PIN}} AS go

FROM go AS fluent-bit-plugin
ARG VERSION
ENV GOEXPERIMENT=systemcrypto
WORKDIR /cilium-log-collector
COPY ./cilium-log-collector .
RUN go build -buildmode=c-shared -a -o out_azure_app_insights.so -trimpath -ldflags "-X main.version=$VERSION" -gcflags="-dwarflocationlists=true" .
Expand Down
2 changes: 1 addition & 1 deletion cilium-log-collector/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cilium-log-collector-version: ## prints the cilium-log-collector version
# Build the cilium-log-collector plugin "so" file
cilium-log-collector-binary:
$(MKDIR) $(CILIUM_LOG_COLLECTOR_BUILD_DIR)
cd $(CILIUM_LOG_COLLECTOR_DIR) && CGO_ENABLED=1 GOEXPERIMENT=systemcrypto go build -buildmode=c-shared -a -o $(CILIUM_LOG_COLLECTOR_BUILD_DIR)/out_azure_app_insights.so -trimpath -ldflags "-X main.version=$(CILIUM_LOG_COLLECTOR_VERSION)" -gcflags="-dwarflocationlists=true" .
cd $(CILIUM_LOG_COLLECTOR_DIR) && CGO_ENABLED=1 go build -buildmode=c-shared -a -o $(CILIUM_LOG_COLLECTOR_BUILD_DIR)/out_azure_app_insights.so -trimpath -ldflags "-X main.version=$(CILIUM_LOG_COLLECTOR_VERSION)" -gcflags="-dwarflocationlists=true" .


CILIUM_LOG_COLLECTOR_IMAGE = cilium-log-collector
Expand Down
2 changes: 1 addition & 1 deletion cilium-log-collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/Azure/azure-container-networking/cilium-log-collector

go 1.26.1

toolchain go1.26.7
toolchain go1.27.1

require (
github.com/Azure/azure-container-networking v1.8.12
Expand Down
Loading
Loading