Skip to content

Commit

Permalink
Statically link csi-node-driver-registrar when using Tigera build cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
coutinhop committed Apr 24, 2023
1 parent f6fa3f8 commit 9ddf4b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pod2daemon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ bin/csi-driver-amd64: $(SRC_FILES)
UPSTREAM_REGISTRAR_PROJECT ?= kubernetes-csi/$(REGISTRAR_IMAGE)
UPSTREAM_REGISTRAR_TAG ?= v2.6.3

REGISTRAR_TIGERA_BUILD_CMD_LDFLAGS = -ldflags '-extldflags "-static" -linkmode external'

REGISTRAR_TIGERA_BUILD_CMD="cd /go/src/github.com/$(UPSTREAM_REGISTRAR_PROJECT) && \
go build -buildvcs=false -tags $(TAGS) -v -o bin/csi-node-driver-registrar cmd/csi-node-driver-registrar/*.go"
go build -buildvcs=false $(REGISTRAR_TIGERA_BUILD_CMD_LDFLAGS) -tags $(TAGS) -v -o bin/csi-node-driver-registrar cmd/csi-node-driver-registrar/*.go"
REGISTRAR_UPSTREAM_BUILD_CMD="cd /go/src/github.com/$(UPSTREAM_REGISTRAR_PROJECT) && \
make build BUILD_PLATFORMS=$(BUILD_PLATFORMS)"

Expand Down

0 comments on commit 9ddf4b0

Please sign in to comment.