Skip to content

Commit 7f6648e

Browse files
feat(maas-controller): enable FIPS compliance in Dockerfile.konflux (#564)
## Summary Enable FIPS compliance in `maas-controller/Dockerfile.konflux` by aligning it with `maas-api/Dockerfile.konflux` (introduced in PR #255). ## Description - Set `CGO_ENABLED=1` — required to link against system crypto libraries (OpenSSL) instead of Go's built-in crypto - Add `GOEXPERIMENT=strictfipsruntime` — enables startup validation that a FIPS-compatible crypto backend is active at runtime No behavioral changes to the controller logic or deployment manifests. ## How it was tested - Built `Dockerfile.konflux` locally using `podman build` targeting `linux/amd64`, image built successfully through both builder and runtime stages ## Merge criteria: <!--- This PR will be merged by any repository approver when it meets all the points in the checklist --> <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] The commits are squashed in a cohesive manner and have meaningful messages. - [x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). - [x] The developer has manually tested the changes and verified that the changes work <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated build configuration to enforce stricter compliance standards and optimize native library integration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Chaitanya Kulkarni <chkulkar@redhat.com>
1 parent cf3873c commit 7f6648e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

maas-controller/Dockerfile.konflux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG BUILDPLATFORM
44
ARG TARGETPLATFORM
55

66
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset@sha256:799cc027d5ad58cdc156b65286eb6389993ec14c496cf748c09834b7251e78dc AS builder
7-
ARG CGO_ENABLED=0
7+
ARG CGO_ENABLED=1
88
ARG TARGETOS
99
ARG TARGETARCH
1010

@@ -14,7 +14,7 @@ RUN go mod download
1414
COPY . .
1515

1616
USER root
17-
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} go build -a -trimpath -ldflags="-s -w" -o manager ./cmd/manager
17+
RUN CGO_ENABLED=${CGO_ENABLED} GOEXPERIMENT=strictfipsruntime GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} go build -a -trimpath -ldflags="-s -w" -o manager ./cmd/manager
1818

1919
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi-minimal@sha256:80f3902b6dcb47005a90e14140eef9080ccc1bb22df70ee16b27d5891524edb2
2020

0 commit comments

Comments
 (0)