// patchMetadataAndSpec patches the Metadata and Spec for FieldExport into
// k8s. The field export 'res' also gets updated with content returned from
// apiserver.
// TODO(vijtrip2@): Refactor this and use single 'patchMetadataAndSpec' method
// for all reconcilers
patchMetadataAndSpec patches the Metadata and Spec for FieldExport into
k8s. The field export 'res' also gets updated with content returned from
apiserver.
TODO(vijtrip2@): Refactor this and use single 'patchMetadataAndSpec' method
for all reconcilers
// patchMetadataAndSpec patches the Metadata and Spec for FieldExport into // k8s . The field export ' res ' also gets updated with content returned from // apiserver . // TODO ( vijtrip2@ ) : Refactor this and use single ' patchMetadataAndSpec ' method // for all reconcilers
func (r *fieldExportReconciler) patchMetadataAndSpec(
	ctx context.Context,
	res *ackv1alpha1.FieldExport,
	base *ackv1alpha1.FieldExport,
) error {
	resStatusCopy := res.DeepCopy().Status
	err := r.kc.Patch(
		ctx,
		res,
		client.MergeFrom(base),
	)
	res.Status = resStatusCopy
	return err
}
func ( r * fieldExportReconciler ) patchMetadataAndSpec ( ctx context . Context , res * ackv1alpha1 . FieldExport , base * ackv1alpha1 . FieldExport , ) error { resStatusCopy := res . DeepCopy ( ) . Status err := r . kc . Patch ( ctx , res , client . MergeFrom ( base ) , ) res . Status = resStatusCopy return err }
patchMetadataAndSpec patches the Metadata and Spec for FieldExport into
k8s.
patchMetadataAndSpec patches the Metadata and Spec for FieldExport into k8s .
// k8s Client Patch call updates the status of original object with the // content returned from apiserver. // Keep a copy of status field to reset the status of 'res' after patch call