-
Notifications
You must be signed in to change notification settings - Fork 65
Add build metadata to Docker image #292
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
Conversation
I'm not sure whether I should get the git information of llm-d or the git information of GIE which is from go mod |
e7a4dd3
to
2a952c1
Compare
RUN go build -a -o bin/epp -ldflags="-extldflags '-L$(pwd)/lib'" cmd/epp/main.go | ||
ARG COMMIT_SHA=unknown | ||
ARG BUILD_REF | ||
RUN go build -a -o bin/epp -ldflags="-extldflags '-L$(pwd)/lib' -X sigs.k8s.io/gateway-api-inference-extension/pkg/epp/metrics.CommitSHA=${COMMIT_SHA} -X sigs.k8s.io/gateway-api-inference-extension/pkg/epp/metrics.BuildRef=${BUILD_REF}" cmd/epp/main.go |
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.
The correct fields to set are sigs.k8s.io/gateway-api-inference-extension/version.CommitSHA
and sigs.k8s.io/gateway-api-inference-extension/version.BuildRef
.
Thus the command should be:
RUN go build -a -o bin/epp -ldflags="-extldflags '-L$(pwd)/lib' -X sigs.k8s.io/gateway-api-inference-extension/version.CommitSHA=${COMMIT_SHA} -X sigs.k8s.io/gateway-api-inference-extension/version.BuildRef=${BUILD_REF}" cmd/epp/main.go
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.
@shmuelk v0.5.1 doesn't have the version package.

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.
right. this change (moving the fields to package version
) was done post v0.5.1 release 👍
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.
Sorry. My bad.
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.
Please rebase and sign your commit and then I'll happily approve and merge this change.
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.
@shmuelk rebased.
2a952c1
to
cc6bf43
Compare
Thanks for the rebase. Please go to your github settings and verify your signature. While you have signed your commits, they are not verified by github. We require verified signatures. |
Signed-off-by: carlory <[email protected]>
cc6bf43
to
7a18cdb
Compare
@shmuelk thanks for your guide. |
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.
/lgtm
/approve
Uh oh!
There was an error while loading. Please reload this page.