func NewController(config *rest.Config, scheme *runtime.Scheme) *Controller {
	c := &Controller{
		config:    config,
		scheme:    scheme,
		logger:    log.Log.WithName("istio.controller"),
		namespace: os.Getenv("POD_NAMESPACE"),
	}
	istioClient, err := c.initializeIstioClient(config)
	if err != nil {
		return nil
	}
	c.istioClient = istioClient
	return c
}
NewController - creates new instance of istio controller
package istio
import (
	"context"
	"fmt"
	"os"
	dynatracev1beta1 "github.com/Dynatrace/dynatrace-operator/api/v1beta1"
	"github.com/Dynatrace/dynatrace-operator/dtclient"
	"github.com/go-logr/logr"
	istiov1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
	istioclientset "istio.io/client-go/pkg/clientset/versioned"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/client-go/rest"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
	"sigs.k8s.io/controller-runtime/pkg/log"
)
type probeResult int
const (
	probeObjectFound probeResult = iota
	probeObjectNotFound
	probeTypeFound
	probeTypeNotFound
	probeUnknown
)
type Controller struct {
	istioClient istioclientset.Interface
	scheme      *runtime.Scheme
	logger    logr.Logger
	config    *rest.Config
	namespace string
}