Skip to content

Commit

Permalink
copy object onto new one
Browse files Browse the repository at this point in the history
Signed-off-by: Burak Sekili <[email protected]>
  • Loading branch information
buraksekili committed Jul 12, 2023
1 parent 8550716 commit f4f3125
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/apidefinition_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ func (r *ApiDefinitionReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return err
}

_ = r.Client.Get(ctx, client.ObjectKeyFromObject(desired), desired) // nolint:errcheck
latestDesired := &tykv1alpha1.ApiDefinition{}
_ = r.Client.Get(ctx, client.ObjectKeyFromObject(desired), latestDesired) // nolint:errcheck
desired.ObjectMeta = latestDesired.ObjectMeta

desired.Spec = upstreamRequestStruct.Spec
return nil
})

Expand Down

0 comments on commit f4f3125

Please sign in to comment.