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

local up: use karmadactl register to register pull mode cluster #5763

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhzhuang-zju
Copy link
Contributor

@zhzhuang-zju zhzhuang-zju commented Oct 31, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:
Currently, local-up-karmada uses script to deploy karmada-agent in pull mode cluster, replaced with the use of karmada register.
The benefits of doing this include:

  • karmadactl register has more fine-grained RBAC permission control.
  • CI can also test the functionality of karmadactl register.

Which issue(s) this PR fixes:
Parts of #5916

Special notes for your reviewer:

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 Oct 31, 2024
@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 31, 2024
@zhzhuang-zju
Copy link
Contributor Author

/hold for #5429

@karmada-bot karmada-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 31, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2024

⚠️ 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 48.24%. Comparing base (c9ca6ac) to head (20d3f6a).

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    #5763   +/-   ##
=======================================
  Coverage   48.23%   48.24%           
=======================================
  Files         664      664           
  Lines       54749    54757    +8     
=======================================
+ Hits        26410    26415    +5     
- Misses      26624    26628    +4     
+ Partials     1715     1714    -1     
Flag Coverage Δ
unittests 48.24% <0.00%> (+<0.01%) ⬆️

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.

@zhzhuang-zju
Copy link
Contributor Author

/hold cancel

@karmada-bot karmada-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 23, 2024
@zhzhuang-zju
Copy link
Contributor Author

/retest

@zhzhuang-zju zhzhuang-zju changed the title local up: use karmadactl register to register pull mode cluster WIP: local up: use karmadactl register to register pull mode cluster Dec 24, 2024
@karmada-bot karmada-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 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 chaunceyjiang 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 24, 2024
@zhzhuang-zju zhzhuang-zju changed the title WIP: local up: use karmadactl register to register pull mode cluster local up: use karmadactl register to register pull mode cluster Dec 24, 2024
@karmada-bot karmada-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 2024
@zhzhuang-zju
Copy link
Contributor Author

/hold wait for #5970

With the results of e2e, the permission minimization of the pull mode cluster does not affect the basic functionality of karmada-agent.

@karmada-bot karmada-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 24, 2024
@@ -74,7 +74,11 @@ ${KARMADACTL_BIN} join --karmada-context="${KARMADA_APISERVER_CLUSTER_NAME}" ${M
"${REPO_ROOT}"/hack/deploy-scheduler-estimator.sh "${MAIN_KUBECONFIG}" "${HOST_CLUSTER_NAME}" "${MEMBER_CLUSTER_KUBECONFIG}" "${MEMBER_CLUSTER_2_NAME}"

# step4. register pull mode member clusters and install scheduler-estimator
"${REPO_ROOT}"/hack/deploy-agent-and-estimator.sh "${MAIN_KUBECONFIG}" "${HOST_CLUSTER_NAME}" "${MAIN_KUBECONFIG}" "${KARMADA_APISERVER_CLUSTER_NAME}" "${MEMBER_CLUSTER_KUBECONFIG}" "${PULL_MODE_CLUSTER_NAME}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, but this seems to mean that we will lose control of /hack/ deploy-agent-and-estimater.sh, i.e. the script may become obsolete without anyone knowing because it is not used in CI.

or we have any plan to remove /hack/ deploy-agent-and-estimater.sh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, long time no see 😄
nice catch, I'll add this in #5916

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants