func NewApiServer(mgr ctrl.Manager, crt, key []byte) error {
	crtBytes = crt
	keyBytes = key
	server := &ApiServer{client: mgr.GetClient(), config: mgr.GetConfig(), scheme: mgr.GetScheme()}
	if err := server.setupIndexers(mgr); err != nil {
		return err
	}
	return mgr.Add(server)
}
NewApiServer creates a new ApiServer and initializes the crd/key variables (can be nil)
package http
import (
	"context"
	"crypto/tls"
	"fmt"
	"net"
	"net/http"
	"os"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/client-go/rest"
	ctrl "sigs.k8s.io/controller-runtime"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/log"
	mpsv1alpha1 "github.com/playfab/thundernetes/operator/api/v1alpha1"
)
var (
	crtBytes []byte
	keyBytes []byte
)
const (
	listeningPort = 5000
)
type ApiServer struct {
	client client.Client
	config *rest.Config
	scheme *runtime.Scheme
}