// markManaged places the supplied resource under the management of ACK.
// It adds the finalizer string, patches the object in etcd and updates
// the object 'res' in parameter with latest metadata.
markManaged places the supplied resource under the management of ACK.
It adds the finalizer string, patches the object in etcd and updates
the object 'res' in parameter with latest metadata.
// markManaged places the supplied resource under the management of ACK . // It adds the finalizer string patches the object in etcd and updates // the object ' res ' in parameter with latest metadata .
func (r *fieldExportReconciler) markManaged(
	ctx context.Context,
	res *ackv1alpha1.FieldExport,
) error {
	if !k8sctrlutil.ContainsFinalizer(res, fieldExportFinalizerString) {
		base := res.DeepCopy()
		k8sctrlutil.AddFinalizer(res, fieldExportFinalizerString)
		return r.patchMetadataAndSpec(ctx, res, base)
	}
	return nil
}
func ( r * fieldExportReconciler ) markManaged ( ctx context . Context , res * ackv1alpha1 . FieldExport , ) error { if ! k8sctrlutil . ContainsFinalizer ( res , fieldExportFinalizerString ) { base := res . DeepCopy ( ) k8sctrlutil . AddFinalizer ( res , fieldExportFinalizerString ) return r . patchMetadataAndSpec ( ctx , res , base ) } return nil }
markManaged places the supplied resource under the management of ACK.
markManaged places the supplied resource under the management of ACK .