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

Promote failed if you promote a resource (other kind) with same name before #1821

Closed
wuyingjun-lucky opened this issue May 18, 2022 · 5 comments · Fixed by #1824
Closed

Promote failed if you promote a resource (other kind) with same name before #1821

wuyingjun-lucky opened this issue May 18, 2022 · 5 comments · Fixed by #1824
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wuyingjun-lucky
Copy link
Member

wuyingjun-lucky commented May 18, 2022

What happened:
Promote failed if you promote a resource (other kind) with same name before
What you expected to happen:
promote sucess
How to reproduce it (as minimally and precisely as possible):
Step 1 in member:
kubectl create clusterrole test-0517 --verb=get,list,watch --resource=pods
kubectl create namespace test-0517
Step 2 in karmada
kubectl-karmada --kubeconfig /etc/karmada/karmada-apiserver.config promote clusterrole test-0517 -c cluster37
kubectl-karmada --kubeconfig /etc/karmada/karmada-apiserver.config promote namespace test-0517 -c cluster37
Result

image

Anything else we need to know?:
@lonelyCZ Should we fix the error in this scenario ?
Environment:
image

  • Karmada version:
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:
@wuyingjun-lucky wuyingjun-lucky added the kind/bug Categorizes issue or PR as related to a bug. label May 18, 2022
@lonelyCZ
Copy link
Member

Thanks for finding it, yes, this is a bug, for cluster scope resource, we could add kind to the name of cpp.

@wuyingjun-lucky
Copy link
Member Author

add

kind + "-" + "name" + "-propagation" ?

@wuyingjun-lucky
Copy link
Member Author

/assign

@lonelyCZ
Copy link
Member

kind + "-" + "name" + "-propagation" ?

Good.

@RainbowMango
Copy link
Member

After going through this issue, seems the naming rule for PropagationPolicy and ClusterPropagationPolicy might be conflicts.

name := opts.name + "-propagation"

I think we can use the name-<hash> as the policy name. E.g.
For deployment named nginx, the policy name could be "nginx-hash(FederatedKey)".

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.
Projects
None yet
3 participants