Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ builds:
- CGO_ENABLED=0
binary: haproxy-ingress-controller
id: my-build
flags:
# keeps the build path of the machine that produced the binary out of it
- -trimpath
ldflags:
# drops the symbol table, and the DWARF data with it: the linker derives
# -w from -s unless -w is given explicitly. about 29 MB of the binary.
# the pclntab is untouched, so a panic still prints a stack trace with
# function names and line numbers, and pprof still symbolises.
- -s
- -X "main.GitRepo={{.GitURL}}"
- -X "main.GitTag={{.Tag}}"
- -X "main.GitCommit={{.ShortCommit}}"
Expand Down
3 changes: 2 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ RUN mkdir -p /var/run/vars && \
cd /src && \
git describe --abbrev=0 --tags > /var/run/vars/GIT_LAST_TAG || echo "dev" > /var/run/vars/GIT_LAST_TAG && \
CGO_ENABLED=0 go build \
-ldflags "-X github.com/haproxytech/kubernetes-ingress/pkg/version.GitTag=$(cat /var/run/vars/GIT_LAST_TAG)" \
-trimpath \
-ldflags "-s -X github.com/haproxytech/kubernetes-ingress/pkg/version.GitTag=$(cat /var/run/vars/GIT_LAST_TAG)" \
-o fs/haproxy-ingress-controller .

FROM haproxytech/haproxy-alpine:3.2
Expand Down
Loading