-
Notifications
You must be signed in to change notification settings - Fork 543
config: support username impersonation #2373
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cjihrig 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 |
The changes looks good to me - should we wait for @Dimpison to confirm? |
I'm OK with moving it forward since it's been a few days. I did test in a real cluster, and it seemed to work. |
Apologies for the late reply. I will test it tomorrow morning and update here. |
I might be doing smth wrong, or it seems like it works slightly differently than it's expected to work.
package.json
git repo
kubeconfig user configuration
Output from the code execution
The kubectl works w/ no issues and returns the same 403 when I remove the |
@Dimpison one obvious question: Did you rebuild the kubernetes client? i.e. |
I think that if you use |
Do you need to allow the |
I think this is the problem. When I add import * as k8s from './dist/index.js';
const kc = new k8s.KubeConfig();
kc.loadFromDefault();
console.log(kc.getCurrentUser()); EDIT: Oh, it looks like I have |
This commit adds support for username impersonation. This does not implement group, UID, or extra impersonation. Refs: kubernetes-client#2355
@mstruebing , sure. I think I can’t run my code w/o building the dependency. |
@cjihrig , will be able to check it on Wednesday. Sorry, for the delay. The “as” field should be in here “users.user.as”. At the same level as “exec”. See example of a single entry in “users” above. |
Yep, I moved it there. |
@cjihrig, it works fine now. Thx a lot. |
This commit adds support for username impersonation. This does not implement group, UID, or extra impersonation.
Refs: #2355