func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error {
	configMapPredicate := predicate.Funcs{
		CreateFunc: func(e event.CreateEvent) bool {
			if e.Object.GetNamespace() == r.watchNamespace && e.Object.GetName() == InstanceConfigMap {
				return true
			}
			return false
		},
		UpdateFunc: func(e event.UpdateEvent) bool {
			if e.ObjectNew.GetNamespace() == r.watchNamespace && e.ObjectNew.GetName() == InstanceConfigMap {
				return true
			}
			return false
		},
	}
	return ctrl.NewControllerManagedBy(mgr).
		For(&core.ConfigMap{}, builder.WithPredicates(configMapPredicate)).
		Complete(r)
}
// SetupWithManager sets up the controller with the Manager.
SetupWithManager sets up the controller with the Manager.
// SetupWithManager sets up the controller with the Manager .
func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error {
	configMapPredicate := predicate.Funcs{
		CreateFunc: func(e event.CreateEvent) bool {
			if e.Object.GetNamespace() == r.watchNamespace && e.Object.GetName() == InstanceConfigMap {
				return true
			}
			return false
		},
		UpdateFunc: func(e event.UpdateEvent) bool {
			if e.ObjectNew.GetNamespace() == r.watchNamespace && e.ObjectNew.GetName() == InstanceConfigMap {
				return true
			}
			return false
		},
	}
	return ctrl.NewControllerManagedBy(mgr).
		For(&core.ConfigMap{}, builder.WithPredicates(configMapPredicate)).
		Complete(r)
}
func ( r * ConfigMapReconciler ) SetupWithManager ( mgr ctrl . Manager ) error { configMapPredicate := predicate . Funcs { CreateFunc : func ( e event . CreateEvent ) bool { if e . Object . GetNamespace ( ) == r . watchNamespace && e . Object . GetName ( ) == InstanceConfigMap { return true } return false } , UpdateFunc : func ( e event . UpdateEvent ) bool { if e . ObjectNew . GetNamespace ( ) == r . watchNamespace && e . ObjectNew . GetName ( ) == InstanceConfigMap { return true } return false } , } return ctrl . NewControllerManagedBy ( mgr ) . For ( & core . ConfigMap { } , builder . WithPredicates ( configMapPredicate ) ) . Complete ( r ) }
SetupWithManager sets up the controller with the Manager.
SetupWithManager sets up the controller with the Manager .