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

feat : add cluster registration step in pull mode to installation-cli.yaml #6006

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

Conversation

SkySingh04
Copy link
Contributor

@SkySingh04 SkySingh04 commented Dec 31, 2024

Signed-off-by: Akash [email protected]

What type of PR is this?

What this PR does / why we need it:

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

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 31, 2024
@SkySingh04 SkySingh04 changed the title feat : add cluster registration step in pull mode to installation workflow feat : add cluster registration step in pull mode to installation-cli.yaml Dec 31, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2024

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.12%. Comparing base (5bfdf61) to head (ce05e68).
Report is 24 commits behind head on master.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6006      +/-   ##
==========================================
- Coverage   48.33%   48.12%   -0.22%     
==========================================
  Files         666      668       +2     
  Lines       54858    55163     +305     
==========================================
+ Hits        26516    26545      +29     
- Misses      26617    26893     +276     
  Partials     1725     1725              
Flag Coverage Δ
unittests 48.12% <ø> (-0.22%) ⬇️

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.

@SkySingh04 SkySingh04 force-pushed the karmadactlInstallationCLI branch from e94498a to 5d8cefa Compare January 18, 2025 17:37
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jan 18, 2025
@zhzhuang-zju
Copy link
Contributor

/assign

@zhzhuang-zju
Copy link
Contributor

@SkySingh04 the ci failed due to not finding the command karmadactl.
And then the command you provided for cluster registration is incorrect. The usage of command karmadactl register can refer to https://karmada.io/docs/next/userguide/clustermanager/cluster-registration/#register-cluster-with-pull-mode and https://karmada.io/docs/next/reference/karmadactl/karmadactl-commands/karmadactl_register/

          karmadactl register cluster \
            --cluster-name ${{ matrix.k8s }} \
            --mode Pull

@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 ask for approval from zhzhuang-zju. 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 Jan 26, 2025
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 26, 2025
@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 6, 2025
…egistration steps and improving log handling

Signed-off-by: Sky Singh <[email protected]>
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 6, 2025
@akashsinghvance
Copy link

@zhzhuang-zju This PR is also related to the issue we are facing in #6007 as well.

Reference :
#6007 (comment) and #6007 (comment)

@zhzhuang-zju
Copy link
Contributor

@SkySingh04 The CI has two jobs, init-config and test-on-kubernetes-matrix. Each job will use the hack script to execute karmadactl init to set up a Karmada system. It is recommended to integrate karmadactl register directly into the corresponding hack script.

For example, the job test-on-kubernetes-matrix uses hack/cli-testing-environment.sh, in which karmadactl join is used to join two member clusters. Just replace one of them with karmadactl register.

echo "Join member clusters..."
${BUILD_PATH}/karmadactl --kubeconfig ${HOME}/karmada/karmada-apiserver.config join ${MEMBER_CLUSTER_1_NAME} --cluster-kubeconfig=${KUBECONFIG_PATH}/${MEMBER_CLUSTER_1_NAME}.config
${BUILD_PATH}/karmadactl --kubeconfig ${HOME}/karmada/karmada-apiserver.config join ${MEMBER_CLUSTER_2_NAME} --cluster-kubeconfig=${KUBECONFIG_PATH}/${MEMBER_CLUSTER_2_NAME}.config
kubectl wait --for=condition=Ready clusters --all --timeout=800s --kubeconfig=${HOME}/karmada/karmada-apiserver.config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants