func setUpConfig() error {
	cfg = &Config{
		kubeConfigFile: filepath.Join(os.Getenv("HOME"), ".kube", "config"),
		LogLevel:       "info",
	}
	err := cfg.Load(configPath)
	if err != nil {
		log.Println("WARNING: Failed to read configuration file from disk:", err)
	}
	externalCheckURL, err := getEnvVar(KHExternalReportingURL)
	if err != nil {
		if len(podNamespace) == 0 {
			return errors.New("KH_EXTERNAL_REPORTING_URL environment variable not set and POD_NAMESPACE environment variable was blank.  Could not determine Kuberhealthy callback URL.")
		}
		log.Infoln("KH_EXTERNAL_REPORTING_URL environment variable not set, using default value")
		externalCheckURL = "http://kuberhealthy." + podNamespace + ".svc.cluster.local/externalCheckStatus"
	}
	cfg.ExternalCheckReportingURL = externalCheckURL
	log.Infoln("External check reporting URL set to:", cfg.ExternalCheckReportingURL)
	return nil
}
setUpConfig loads and sets default Kuberhealthy configurations
Everytime kuberhealthy sees a configuration change, configurations should reload and reset
package main
import (
	"context"
	"errors"
	"fmt"
	"os"
	"os/signal"
	"path/filepath"
	"syscall"
	"time"
	"github.com/integrii/flaggy"
	log "github.com/sirupsen/logrus"
	"k8s.io/client-go/dynamic"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/tools/clientcmd"
	khcheckv1 "github.com/kuberhealthy/kuberhealthy/v2/pkg/apis/khcheck/v1"
	khjobv1 "github.com/kuberhealthy/kuberhealthy/v2/pkg/apis/khjob/v1"
	khstatev1 "github.com/kuberhealthy/kuberhealthy/v2/pkg/apis/khstate/v1"
	"github.com/kuberhealthy/kuberhealthy/v2/pkg/kubeClient"
	"github.com/kuberhealthy/kuberhealthy/v2/pkg/masterCalculation"
)
var cfg *Config
var configPath = "/etc/config/kuberhealthy.yaml"
var podNamespace = os.Getenv("POD_NAMESPACE")
var isMaster bool                   
var upcomingMasterState bool        
var lastMasterChangeTime time.Time  
var listenNamespace string          
var checkReaperRunInterval = os.Getenv("CHECK_REAPER_RUN_INTERVAL")
var terminationGracePeriod = time.Minute * 5  
var podHostname string
const KHExternalReportingURL = "KH_EXTERNAL_REPORTING_URL"
const DefaultRunInterval = time.Minute * 10
var DefaultTimeout = time.Minute * 5
const KHCheckNameAnnotationKey = "comcast.github.io/check-name"
var khStateClient *khstatev1.KHStateV1Client
var khCheckClient *khcheckv1.KHCheckV1Client
var khJobClient *khjobv1.KHJobV1Client
const stateCRDGroup = "comcast.github.io"
const stateCRDVersion = "v1"
const stateCRDResource = "khstates"
const checkCRDGroup = "comcast.github.io"
const checkCRDVersion = "v1"
const checkCRDResource = "khchecks"
var kubernetesClient *kubernetes.Clientset
var dynamicClient dynamic.Interface