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

replacing patch with update during allocation #150

Merged
merged 1 commit into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/operator/http/allocate.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,11 @@ func (h *allocateHandler) handle(w http.ResponseWriter, r *http.Request) {
}

// set the relevant status fields
patch := client.MergeFrom(gs.DeepCopy())
gs.Status.State = mpsv1alpha1.GameServerStateActive
gs.Status.SessionID = args.SessionID
gs.Status.SessionCookie = args.SessionCookie

err = h.client.Status().Patch(r.Context(), &gs, patch)
err = h.client.Status().Update(r.Context(), &gs)
if err != nil {
internalServerError(ctx, w, err, "cannot update game server")
return
Expand Down