Skip to content
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 Issue #24: Manually Generate Secret for K8s v1.24+ #30

Open
wants to merge 3 commits into
base: ng-dashboard-react
Choose a base branch
from

Conversation

ada2468
Copy link

@ada2468 ada2468 commented Aug 31, 2022

What type of PR is this?
/kind bug

What this PR does / why we need it:
The background story is that since K8s v1.24+, service account by default doesn't create secret automatically. As the result, if we follow the old instruction, we can't get a login token, because there is no secret present.

Potential Solutions:

  1. Use K8s v1.23.
  2. Manually create a secret. (This PR)
  3. Adapt to new API, TokenRequest API

More discussion can be found here:
karmada-io/karmada#1961
karmada-io/karmada#1972
https://itnext.io/big-change-in-k8s-1-24-about-serviceaccounts-and-their-secrets-4b909a4af4e0

My Solution:
The second one. This assumes you use k8s v1.24+.

Add instruction in README.me for modifying karmada-dashboard-role.yaml, to manually create secret for us to see the login token. Then we can login the dashboard.

Which issue(s) this PR fixes:
Fixes #24

Signed-off-by: Jun Xiang jx2161@nyu.edu

Signed-off-by: Jun Xiang <jx2161@nyu.edu>
@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 31, 2022
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign rainbowmango after the PR has been reviewed.
You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 31, 2022
@ada2468
Copy link
Author

ada2468 commented Aug 31, 2022

@RainbowMango
I propose a fix for issue #24. Please take a look.

Signed-off-by: Jun Xiang <jx2161@nyu.edu>
Signed-off-by: Jun Xiang <jx2161@nyu.edu>
@ada2468 ada2468 changed the title Fix Issue #24&25: Manually Generate Secret for K8s v1.24+ Fix Issue #24: Manually Generate Secret for K8s v1.24+ Sep 1, 2022
@haiker2011
Copy link

haiker2011 commented Nov 28, 2023

I use your yaml, but can not create secret

image

it is very unbelievable

@haiker2011
Copy link

I test find the secret dashboardsecret is deleted immediately after created

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants