-
Notifications
You must be signed in to change notification settings - Fork 187
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
Fix e2e test for rootless image. #568
Fix e2e test for rootless image. #568
Conversation
Hi @liangyuanpeng. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: liangyuanpeng The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
- sh | ||
- -c | ||
- | | ||
chmod -R 777 /etc/kubernetes |
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.
774? 744? 444?
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.
I'm a bit uncomfortable making the apiserver key world-readable. Seems like it defeats the point of running this as non-root.
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.
I have tested it with 444 446 and 447, only working with 447, This is a bit counter-intuitive since the ANP server only requires read permissions (except /etc/kubernetes/konnectivity-server ).
How about change this directory to /etc/srv/kubernetes
? To keep it consistent with examples/kubernetes/konnectivity-server.yaml
, but the apiserver key still world-readable on /etc/srv/kubernetes
:(
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.
Does manually creating the required files and starting ANP with the 1002 user increase the confidence in merging the PR?
...
securityContext:
runAsUser: 1002
runAsGroup: 1000
...
e9f451b
to
63dbd29
Compare
63dbd29
to
3444aba
Compare
Signed-off-by: Lan Liang <[email protected]>
3444aba
to
ab7e98d
Compare
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
e2e CI is broken (https://github.com/kubernetes-sigs/apiserver-network-proxy/actions/runs/7935785136) after merge #564, the reason is permission denied when reading
/etc/kubernetes
with rootless image. This PR adds an initContainer to change the/etc/kubernetes
directory permissions to fix this issue.Another option is run root as user for ANP server pod,But this will not testing rootless container images.
The error logs:
... 2024-02-16T20:20:47.774302668Z stderr F 2024-02-16T20:20:47.774304462Z stderr F E0216 20:20:47.774123 1 main.go:48] error: failed to load kubernetes client config: error loading config file "/etc/kubernetes/admin.conf": open /etc/kubernetes/admin.conf: permission denied
/cc @jkh52 @cheftako @ipochi