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

remove the unnecessary file localization steps when karmadactl register #5862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhzhuang-zju
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
When executing the karmadactl register command, there are many localized file operations involved, which lead to the following issues:

  • The current file storage path is /etc/karmada, and non-admin users will not have permission to create this directory. see #test/e2e/karmadactl_test.go: test register command #5334 (comment)
  • Sensitive information such as CA should not be stored in files
  • When karmadactl register fails, the residual files can cause the next execution of karmadactl register to fail.

In fact, the file localization steps in karmadactl register are unnecessary and can be removed.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
If we want to use karmadactl register in CI to join a pull mode cluster, it will fail due to lack of root permissions.
https://github.com/karmada-io/karmada/actions/runs/11608077257/job/32322805939?pr=5763#step:5:934

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 22, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lonelycz for approval. For more information see the Kubernetes Code Review Process.

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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 22, 2024
@zhzhuang-zju
Copy link
Contributor Author

cc @mohamedawnallah

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 46.38%. Comparing base (079d0ab) to head (4301b08).
Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
pkg/karmadactl/register/register.go 0.00% 9 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5862      +/-   ##
==========================================
+ Coverage   46.31%   46.38%   +0.07%     
==========================================
  Files         661      661              
  Lines       54364    54339      -25     
==========================================
+ Hits        25177    25207      +30     
+ Misses      27562    27508      -54     
+ Partials     1625     1624       -1     
Flag Coverage Δ
unittests 46.38% <0.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@mohamedawnallah
Copy link
Contributor

Hi @zhzhuang-zju, sorry for the delay in reviewing the PR. I haven't had the chance to review it yet. I’ll give it a full review today. 🙏

@zhzhuang-zju
Copy link
Contributor Author

Hi @zhzhuang-zju, sorry for the delay in reviewing the PR. I haven't had the chance to review it yet. I’ll give it a full review today. 🙏

It's okay, just go at your own pace. 😄

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

Successfully merging this pull request may close these issues.

4 participants