From 2d793f8918d0c024590478fad6bad7df329c6851 Mon Sep 17 00:00:00 2001 From: mansikulkarni96 Date: Wed, 13 Nov 2024 16:45:41 -0500 Subject: [PATCH] Build CNI plug-ins with CGO_ENABLED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CNI submodule is compiled by explicitly setting CGO_ENABLED=0 which is not FIPS compliant. This commit remidaiates this by using a Windows-compatible C compiler “CC=gcc-mingw-w64” in the go build command. --- build/Dockerfile | 3 +-- build/Dockerfile.base | 3 +-- build/Dockerfile.ci | 3 +-- build/Dockerfile.konflux | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 686d80f120..572e1fcb8b 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -71,8 +71,7 @@ RUN env -u VERSION GOOS=windows make ecr-credential-provider # Build CNI plugins WORKDIR /build/windows-machine-config-operator/containernetworking-plugins/ COPY containernetworking-plugins/ . -ENV CGO_ENABLED=0 -RUN ./build_windows.sh +RUN CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc ./build_windows.sh # Build csi-proxy WORKDIR /build/windows-machine-config-operator/csi-proxy diff --git a/build/Dockerfile.base b/build/Dockerfile.base index 0f15c57c55..a831f9ec2e 100644 --- a/build/Dockerfile.base +++ b/build/Dockerfile.base @@ -70,8 +70,7 @@ RUN env -u VERSION GOOS=windows make ecr-credential-provider # Build CNI plugins WORKDIR /build/windows-machine-config-operator/containernetworking-plugins/ COPY containernetworking-plugins/ . -ENV CGO_ENABLED=0 -RUN ./build_windows.sh +RUN CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc ./build_windows.sh # Build csi-proxy WORKDIR /build/windows-machine-config-operator/csi-proxy diff --git a/build/Dockerfile.ci b/build/Dockerfile.ci index 51aa6068c9..bf2447920f 100644 --- a/build/Dockerfile.ci +++ b/build/Dockerfile.ci @@ -78,8 +78,7 @@ RUN env -u VERSION GOOS=windows make ecr-credential-provider # Build CNI plugins WORKDIR /build/windows-machine-config-operator/containernetworking-plugins/ COPY containernetworking-plugins/ . -ENV CGO_ENABLED=0 -RUN ./build_windows.sh +RUN CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc ./build_windows.sh # Build csi-proxy WORKDIR /build/windows-machine-config-operator/csi-proxy diff --git a/build/Dockerfile.konflux b/build/Dockerfile.konflux index 1207b7ab45..22cf6731be 100644 --- a/build/Dockerfile.konflux +++ b/build/Dockerfile.konflux @@ -68,8 +68,7 @@ RUN env -u VERSION GOOS=windows make ecr-credential-provider # Build CNI plugins WORKDIR /build/windows-machine-config-operator/containernetworking-plugins/ COPY containernetworking-plugins/ . -ENV CGO_ENABLED=0 -RUN ./build_windows.sh +RUN CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc ./build_windows.sh # Build csi-proxy WORKDIR /build/windows-machine-config-operator/csi-proxy