-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Setup user on docker image to run it as no root #983
Setup user on docker image to run it as no root #983
Conversation
0cb0041
to
b16d2b9
Compare
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.
there seem to be a bunch of unrelated changes, plus some shell scripts, which definitely won't work in the static image. Can you clarify a bit what's going on here?
5c913bf
to
6313e5e
Compare
This comment has been minimized.
This comment has been minimized.
6313e5e
to
c738527
Compare
The change probably breaks the v2 e2e test. |
yep, that's my suspicion as well. this needs to be overhauled re: my comment before we move forward |
c738527
to
01f5b35
Compare
Hi @DirectXMan12 and @mengqiy, The error faced in the test is when it tries to delete the Also, if I understood properly this file shows inject by the webhooks and it is not added in the scaffold project by default. Could you give me a hand to understand why the change here which is very small now still breaking the 1 of the tests? |
It seems apiserver can't talk to the webhook. Let me take a closer look. |
After looking at the container log, it seems it no longer have permissions to bind to 443, which is the default port for webhook. |
To fix this issue, you will need to change the scaffolding of
|
ah, yeah. non-root and privileged ports and all that. |
46fe044
to
539cbc9
Compare
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 don't change anything related to kubebuilder v1.
e.g. testdata/gopath/project-v1 and pkg/scaffold/v1
docs/book/src/cronjob-tutorial/testdata/project/config/webhook/service.yaml
Outdated
Show resolved
Hide resolved
e92cfa7
to
ef86fd0
Compare
ef86fd0
to
3b42356
Compare
fdf6dc4
to
e31f2ce
Compare
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 also update testdata/project-v2/main.go
.
We have a test to ensure /testdata
director is always up-to-date. But it seems it's broken now. We will fix that. @DirectXMan12
It should not block you.
Other pieces LGTM. Please squash commits.
d0c1899
to
9ddaa7f
Compare
…oless/static:nonroot and the targetPort 9843 for webhoocks
9ddaa7f
to
7af89cb
Compare
Hi @mengqiy, Shows that all requests are done. Really tks for the help, to tell how to solve the test issue and time spend in the review. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, mengqiy 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 |
What:
Motivation:
Steps performed to check it locally
Checked that it worked in Minishift/OCP as well.