-
Notifications
You must be signed in to change notification settings - Fork 448
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
Server side apply #2435
base: master
Are you sure you want to change the base?
Server side apply #2435
Conversation
Signed-off-by: Jyotin Goel <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
@tenzen-y Can you please review ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution @gjyotin305 and sorry for the late reply!
) | ||
|
||
type updateStatusFunc func(instance *experimentsv1beta1.Experiment) error | ||
|
||
func (r *ReconcileExperiment) updateStatus(instance *experimentsv1beta1.Experiment) error { | ||
err := r.Status().Update(context.TODO(), instance) | ||
err := r.Status().Update(context.TODO(), instance, &client.SubResourceUpdateOptions{UpdateOptions: client.UpdateOptions{FieldManager: "experiment-controller"}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubeflow/wg-training-leads @gjyotin305 Can we also use the server side apply for other resources that we update in our controllers.
For instance:
Suggestion CR: https://github.com/kubeflow/katib/blob/master/pkg/controller.v1beta1/suggestion/suggestion_controller_status.go#L36
Trial CR: https://github.com/kubeflow/katib/blob/master/pkg/controller.v1beta1/trial/trial_controller_status.go#L45
@tenzen-y Do we need to update k8s version for server-side apply for Katib ?
What this PR does / why we need it:
This PR adds the feature of server side apply, replacing the previously client side apply. Server-side applies allow us to avoid updating errors due to conflicts, and then it would reduce confusions for users.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2271
Checklist: