func add(mgr manager.Manager, r reconcile.Reconciler) error {
	c, err := controller.New("awsfederatedrole-controller", mgr, controller.Options{Reconciler: r})
	if err != nil {
		return err
	}
	err = c.Watch(&source.Kind{Type: &awsv1alpha1.AWSFederatedRole{}}, &handler.EnqueueRequestForObject{})
	if err != nil {
		return err
	}
	return nil
}
add adds a new Controller to mgr with r as the reconcile.Reconciler
package awsfederatedrole
import (
	"context"
	goerr "errors"
	"fmt"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/service/iam"
	awsv1alpha1 "github.com/openshift/aws-account-operator/pkg/apis/aws/v1alpha1"
	"github.com/openshift/aws-account-operator/pkg/controller/utils"
	"github.com/openshift/aws-account-operator/pkg/awsclient"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/runtime"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/controller"
	"sigs.k8s.io/controller-runtime/pkg/handler"
	logf "sigs.k8s.io/controller-runtime/pkg/log"
	"sigs.k8s.io/controller-runtime/pkg/manager"
	"sigs.k8s.io/controller-runtime/pkg/reconcile"
	"sigs.k8s.io/controller-runtime/pkg/source"
)
const (
	controllerName = "awsdfederatedrole"
)
var (
	log           = logf.Log.WithName("controller_awsfederatedrole")
	awsSecretName = "aws-account-operator-credentials"
	errInvalidManagedPolicy = goerr.New("InvalidManagedPolicy")
)
func Add(mgr manager.Manager) error {
	return add(mgr, newReconciler(mgr))
}
func newReconciler(mgr manager.Manager) reconcile.Reconciler {
	reconciler := &ReconcileAWSFederatedRole{
		client:           utils.NewClientWithMetricsOrDie(log, mgr, controllerName),
		scheme:           mgr.GetScheme(),
		awsClientBuilder: &awsclient.Builder{},
	}
	return utils.NewReconcilerWithMetrics(reconciler, controllerName)
}