karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.12k stars 807 forks source link

feat: introduce a new annotation cluster.karmada.io/name. #4442

Open chaunceyjiang opened 4 months ago

chaunceyjiang commented 4 months ago

What type of PR is this? /kind feature

What this PR does / why we need it:

Introduce a new annotation cluster.karmada.io/name, used to specify which member cluster this current workload will propagate.

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

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karrmada-controller-manager`: introduce a new annotation cluster.karmada.io/name. 
karmada-bot commented 4 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please ask for approval from chaunceyjiang after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[pkg/util/OWNERS](https://github.com/karmada-io/karmada/blob/master/pkg/util/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
CharlesQQ commented 1 week ago

https://github.com/karmada-io/karmada/issues/4845

XiShanYongYe-Chang commented 1 week ago

Hi @chaunceyjiang the CI is failed, can you help rebase the master code and push it again?

XiShanYongYe-Chang commented 1 week ago

/assign

chaunceyjiang commented 1 week ago

Hi @chaunceyjiang the CI is failed, can you help rebase the master code and push it again?

Done

weidalin commented 1 week ago

What type of PR is this? /kind feature

What this PR does / why we need it:

Introduce a new annotation cluster.karmada.io/name, used to specify which member cluster this current workload will propagate.

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

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karrmada-controller-manager`: introduce a new annotation cluster.karmada.io/name. 

Hi, I reinstalled the three components, karmada webhook, karmada controller manager, and karmada scheduler, according to the code you submitted. However, I did not obtain cluster.karmada.io/name in both the desired Workload and bosserverWorkload annotations in the retain method. What other components do I need to install? @chaunceyjiang

chaunceyjiang commented 1 week ago

I did not obtain cluster.karmada.io/name in both the desired Workload and bosserverWorkload annotations

Oh? Do you mean that you didn't see this annotation in workload? 🤔

chaunceyjiang commented 1 week ago

@weidalin Can you share your work's yaml file?

kubectl get work xxxx -oyaml --kubeconfig karmda-apiserve.kubeconfig
weidalin commented 1 week ago

@weidalin Can you share your work's yaml file?

kubectl get work xxxx -oyaml --kubeconfig karmda-apiserve.kubeconfig

There is my yaml

metadata:
        annotations:
          clusterpropagationpolicy.karmada.io/name: team-1005-cluster-weight-policy-default-day-time
          cluster.karmada.io/name: member-01
          resourcebinding.karmada.io/name: atms-node-conf-lwd-test-v216-app-0426-v1-configmap
          resourcebinding.karmada.io/namespace: lwd-test2

Thank you, I have found this annotation! But I still have a question. After updating the code to this commit, I have updated the three deployments under the Karmada system namespace: Karmada webhook, Karmada controller manager, and Karmada scheduler. In fact, all I need to do is update which components to make it work @chaunceyjiang

chaunceyjiang commented 1 week ago

After updating the code to this commit, I have updated the three deployments under the Karmada system namespace: Karmada webhook, Karmada controller manager, and Karmada scheduler.

Karmada-controller-manager