-
Notifications
You must be signed in to change notification settings - Fork 1.2k
🌱 Envtest exports secure config, helpers for simplify users adding #1477
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
Welcome @lobziik! |
Hi @lobziik. 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: lobziik 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 |
cc @alvaroaleman, please take a look |
/ok-to-test |
/retest |
…onnect 'https' endpoint of kube-apiserver
Please note that this just contains secure endpoint itself and its CA certs. User will have to set authentication information by themselves and configure some authn module in kube-apiserver.
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 am not overly familiar with this code, but the pr generally makes sense to me. i have a few minor suggestions and a question.
newUser := integration.User{ | ||
Token: uuid.New().String(), | ||
Name: username, | ||
UID: username, |
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 guessing this does not need to be a numeric value?
(i see it's a string in the struct, just curious)
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.
Should be a string, as I understand from doc:
https://kubernetes.io/docs/reference/access-authn-authz/authentication/#authentication-strategies
UID: a string which identifies the end user and attempts to be more consistent and unique than username.
The underlying issue this fixes is assigned to @DirectXMan12 (ref #1357 (comment)) and they mentioned over Slack that something to review will be ready in the next couple of days. I'll refrain from reviewing this one for now. |
…tential issue with missing certificates in case of APIServer stop/start
…g. Add default user bearer token to SecureConfig. Tests.
/retest |
/close |
fixes #983
Bit extended #984, added
token-auth-file
generation with "kubeadmin" user, added couple helpers to envstest for users creation.This PR added:
internal.integration.APIServer
: exposeTLSClientConfig
to connect its secure endpoint (@everpeace)envtest.Environment
: introduce SecureConfig that just contains kube-apiserver's secure endpoint and its TLSClientConfig. (@everpeace)envtest.AddAPIServerUser
helper for adding additional usersenvtest.GetConfigForUser
helper for getting rest.Config with respective credentialstoken-auth-file creates automatically during APIServer startup
fixed issue with missing certificates for APIServer after its restart, certs regenerates after controlplane start/stop