Skip to content

Commit

Permalink
fix(operator): build env variables are computed during docker build (#…
Browse files Browse the repository at this point in the history
…457)

Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT authored Nov 23, 2022
1 parent d4c6716 commit 05ac270
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ COPY webhooks/ webhooks/
# Build
RUN controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." && \
GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -ldflags '\
go build -ldflags "\
-w \
-X main.gitCommit=$GIT_HASH \
-X main.buildTime=$BUILD_TIME \
-X main.buildVersion=$RELEASE_VERSION' \
-X main.gitCommit=${GIT_HASH} \
-X main.buildTime=${BUILD_TIME} \
-X main.buildVersion=${RELEASE_VERSION}" \
-o bin/manager main.go

FROM gcr.io/distroless/base-debian11:debug-nonroot as debug
Expand Down
6 changes: 3 additions & 3 deletions scheduler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ COPY pkg pkg

RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "\
-X k8s.io/component-base/version.gitVersion=${SCHEDULER_COMPATIBLE_K8S_VERSION} \
-X main.gitCommit=$GIT_HASH \
-X main.buildTime=$BUILD_TIME \
-X main.buildVersion=$RELEASE_VERSION \
-X main.gitCommit=${GIT_HASH} \
-X main.buildTime=${BUILD_TIME} \
-X main.buildVersion=${RELEASE_VERSION} \
-w" \
-o bin/kube-scheduler cmd/scheduler/main.go

Expand Down

0 comments on commit 05ac270

Please sign in to comment.