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

Do we need to change the method from UpdateStatus to Update #3551

Closed
yike21 opened this issue May 16, 2023 · 5 comments
Closed

Do we need to change the method from UpdateStatus to Update #3551

yike21 opened this issue May 16, 2023 · 5 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@yike21
Copy link
Member

yike21 commented May 16, 2023

Please provide an in-depth description of the question you have:
When I bundle third-party resources into the Resource Interpreter framework and write ResourceInterpreterCustomization for argoproj.io/v1alpha1/Workflow, I find that the .status of workflow sample which I propagate from karmada to member cluster can't be updated.

The logs of karmada-controller-manager show that Failed to update resource(argoproj.io/v1alpha1, Resource=workflows/test-workflow/sample), Error: workflows.argoproj.io "sample" not found. ref

This is because the .status of workflow is not a subresource. And syncBindingStatus -> updateResourceStatus can't update the .status of workflow by dynamicClient.Resource(gvr).Namespace(resource.GetNamespace()).UpdateStatus(context.TODO(), newObj, metav1.UpdateOptions{}).ref

If we change method from dynamicClient.Resource(gvr).Namespace(resource.GetNamespace()).UpdateStatus(context.TODO(), newObj, metav1.UpdateOptions{}) to dynamicClient.Resource(gvr).Namespace(resource.GetNamespace()).Update(context.TODO(), newObj, metav1.UpdateOptions{}), the .status of workflow can be updated successfully.

What do you think about this question?:
There may also be other resources whose status is not a subresource.

To update the status successfully from resourceBinding, we need to change the CRD of resources which doesn't support status subresource in karmada-control-plane to make it support status subresource, or change the method of updateResourceStatus to update the status.

Environment:

  • Karmada version: master
  • Kubernetes version:
  • Others:
@yike21 yike21 added the kind/question Indicates an issue that is a support question. label May 16, 2023
@XiShanYongYe-Chang
Copy link
Member

A good summary of the problems.

IMOP, for the resource interpreter, it deals with the status part of the resource, and the status is a subresource. If a CRD resource does not have a subresource, the interpreter cannot process it. Even though the resource has a field name status, it is not technically the other status.

However, if strict requirements are met, some resource that do not have the status subresource cannot collect the status part, as analyzed in the example.

Therefore, I think we should ask users to define resources correctly, and push the upstream community to modify the resources mentioned in the issue description.
And then, we can consider modifying the resource update method in the karmada code.

@yike21
Copy link
Member Author

yike21 commented May 17, 2023

Thanks for replying!

@yike21 yike21 closed this as completed May 17, 2023
@XiShanYongYe-Chang
Copy link
Member

Until we solve this problem, I feel that we can use this issue to track the problem, so keep it open will be ok.

@XiShanYongYe-Chang
Copy link
Member

As a lack of activity, let's close this first, feel free to reopen it if you still need it.
/close

@karmada-bot
Copy link
Collaborator

@XiShanYongYe-Chang: Closing this issue.

In response to this:

As a lack of activity, let's close this first, feel free to reopen it if you still need it.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants