-
Notifications
You must be signed in to change notification settings - Fork 813
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
Switching autoscaler-webhook to utilize distroless as base Image #3276
Switching autoscaler-webhook to utilize distroless as base Image #3276
Conversation
Build Failed 😱 Build Id: d32fd147-4bce-4f9b-a203-338fe643b306 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
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.
Good start!
Can you also have a look through our docs to see what references the autoscaler-webhook
container image, and update that as well?
We'll also need to manually test to make sure it still works please.
@@ -22,7 +22,7 @@ RUN go mod init && go mod tidy | |||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server . | |||
|
|||
# Create the final image that will run the webhook server for FleetAutoscaler webhook policy | |||
FROM alpine:3.14 | |||
FROM gcr.io/distroless/static-debian11:nonroot | |||
RUN adduser -D -u 1000 server |
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.
RUN adduser -D -u 1000 server | |
WORKDIR / |
No need for this anymore, and we move everything into root.
@@ -22,7 +22,7 @@ RUN go mod init && go mod tidy | |||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server . | |||
|
|||
# Create the final image that will run the webhook server for FleetAutoscaler webhook policy | |||
FROM alpine:3.14 | |||
FROM gcr.io/distroless/static-debian11:nonroot | |||
RUN adduser -D -u 1000 server | |||
|
|||
COPY --from=builder /go/src/autoscaler-webhook \ |
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.
change this to copy to /server
@@ -31,5 +31,5 @@ COPY --from=builder /go/src/autoscaler-webhook \ | |||
RUN chown -R server /home/server && \ |
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.
This can all go away.
USER 1000 | ||
ENTRYPOINT /home/server/server | ||
USER nonroot:nonroot | ||
ENTRYPOINT ["/home/server/server"] |
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.
ENTRYPOINT ["/home/server/server"] | |
ENTRYPOINT ["/server"] |
Do we have a need to update all files , excluding release blogs, that currently using "autoscaler-webhook 0.6" to instead use "autoscaler-webhook 0.7"? |
Yes please! |
could you please provide more context? |
Build Failed 😱 Build Id: 7ed1de35-e84f-4e51-96ef-85a1b8ef131d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Ah yes - excellent question! We use this image in this quickstart: https://agones.dev/site/docs/getting-started/create-webhook-fleetautoscaler/ So if you can go through this quickstart, but utilise your new image rather than the old one, that would be perfect. |
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.
Chatted with @Kalaiselvi84 offline. Tested, and looks good 👍🏻
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Kalaiselvi84, markmandel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build Failed 😱 Build Id: ebe73d41-4e88-494d-a83f-fd5b300573a4 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
flake. I thought I fixed this. |
Build Failed 😱 Build Id: 3396222b-a8c2-4c9e-81a0-f16d73ac52b8 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
@Kalaiselvi84 is the image pushed yet? If not, that would explain why the e2e tests are failing 😄 |
I used |
…ones into issues/291828200
New changes are detected. LGTM label has been removed. |
Build Failed 😱 Build Id: e6b7406c-c6f6-4419-8f85-248dd2681349 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: 957feef5-77f9-4582-b789-3667f8b06245 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
/kind cleanup
What this PR does / Why we need it:
Which issue(s) this PR fixes:
Closes #909
Special notes for your reviewer: