-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: include -version
option for csi-addons executable
#397
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,17 @@ FROM quay.io/projectquay/golang:1.20 as builder | |
# Copy the contents of the repository | ||
ADD . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons | ||
|
||
ENV GOPATH=/workspace/go | ||
ENV GOPATH=/workspace/go CGO_ENABLED=0 | ||
WORKDIR /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -o /workspace/csi-addons-sidecar ./sidecar | ||
|
||
# Build the csi-addons tool for admin usage and testing | ||
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -o /workspace/csi-addons ./cmd/csi-addons | ||
# Build the sidecar and csi-addons tool for admin usage and testing | ||
RUN make build | ||
|
||
# Use distroless as minimal base image to package the sidecar binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:latest | ||
WORKDIR / | ||
COPY --from=builder /workspace /usr/bin/ | ||
COPY --from=builder /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons/bin/csi-addons-sidecar /usr/sbin/ | ||
COPY --from=builder /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons/bin/csi-addons /usr/bin/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should be copied to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
ENTRYPOINT ["/usr/bin/csi-addons-sidecar"] | ||
ENTRYPOINT ["/usr/sbin/csi-addons-sidecar"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ spec: | |
runAsNonRoot: true | ||
containers: | ||
- command: | ||
- /manager | ||
- /csi-addons-manager | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same change should also be made to CSV? might be missed to updated CSV with git push There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I don't think the command is included there. I can not find it in |
||
args: | ||
- --leader-elect | ||
image: controller:latest | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GOOS=linux
seems to be dropped.I hope it makes no difference