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
Add endpoint for OIDC kubeconfig secret for WEB terminal #10102
Add endpoint for OIDC kubeconfig secret for WEB terminal #10102
Conversation
4b5cffd
to
e8c728f
Compare
d186648
to
ef9775f
Compare
ef9775f
to
116d090
Compare
/retest |
3 similar comments
/retest |
/retest |
/retest |
116d090
to
488a1e8
Compare
/retest |
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.
/approve ⚡
LGTM label has been added. Git tree hash: c89090fbbd4ad11df705984ebf90d41b9ea2d55a
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmedwaleedmalik, zreigz 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 |
/lgtm |
What does this PR do / Why do we need it: add an endpoint for OIDC kubeconfig secret for the WEB terminal.
Does this PR close any issues?:
Fixes #
Special notes for your reviewer:
In order to test this locally:
kubermaticIssuer
client) to whitelist theredirectURI
:http://localhost:8080/api/v2/kubeconfig/secret
andhttps://kubermatic.io/api/v2/kubeconfig/secret
kubectl -n oauth edit configmap dex
kubectl -n oauth rollout restart deployment dex
make clean && FEATURE_GATES=OIDCKubeCfgEndpoint=true KUBERMATIC_EDITION=ee KUBERMATIC_DEBUG=false ./hack/run-api.sh
Open WEB browser and enter:
http://localhost:8080/api/v2/kubeconfig/secret?cluster_id=<clusterID>&project_id=<projectID>&user_id=<userID>
. Make sure to replaceclusterID
,userID
andprojectID
with the values of the created cluster. The userID is the ID for the user object in the KKP.kube-system
namespace. The secret name is your email encoded to md5 hash. You can check the name here https://www.md5hashgenerator.com/. For example for userlukasz.zajaczkowski@kubermatic.com
we will get40ce6d00769edaab4eb1d8cacfea5cb1