-
Notifications
You must be signed in to change notification settings - Fork 910
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
When Modifying (Cluster)ResourceBinding, Labels Was Merged Only When Binding with PropagationPolicy #3238
Comments
As far as I know, the dependency propagation feature is only available in the |
But in fact, it would also be modified in So I think it is related to the resource is cluster-scoped or namespace-scoped but not to the kind of propagationpolicy. |
Hi @lxtywypc, thanks for your careful discovery. What you have pointed out is indeed a mistake. In our e2e test and general usage, we use Would you like to send a pr to fix this error? |
@XiShanYongYe-Chang I'm quite glad to, please have a look at #3239 |
What happened:
When the
resource-detector
modify the(cluster)resourcebinding
, whose labels would be merged only when binding withpropagationpolicy
:https://github.com/karmada-io/karmada/blob/master/pkg/detector/detector.go#L407
but not when binding with
clusterpropagationpolicy
:https://github.com/karmada-io/karmada/blob/master/pkg/detector/detector.go#L482
What you expected to happen:
The labels should be merged no matter which kind of propagationpolicy is binding with.
How to reproduce it (as minimally and precisely as possible):
clusterpropagationpolicy
and apropagationpolicy
for different workload, then apply them.propagationpolicy
is still exists, while which in bindings withclusterpropagationpolicy
has been already removed.Anything else we need to know?:
I saw some changes in commit history, which seems that the method to modify the labels in bindings with
propagationpolicy
was changed from replacing to merging for adapting dependencies propagation. But in the later commits, I saw only some changes to modify the field.spec.propagateDeps
, but no more changes to modify the labels. I don't know exactly if it is quite a bug or it is reasonable. If you have some other considering, please tell me.By the way, I found that the modifing of
propagateDeps
was missed inclusterresourcebinding
:https://github.com/karmada-io/karmada/blob/master/pkg/detector/detector.go#L512-#L533
was it also a bug? If it was, I could add a commit to fix it. :)
Environment:
kubectl-karmada version
orkarmadactl version
):The text was updated successfully, but these errors were encountered: