func EmptyConfiguration() *config {
	return &config{}
}
EmptyConfiguration returns an empty instance of config. This should only be used for migration.
package configuration
import (
	"fmt"
	"github.com/imdario/mergo"
	"gopkg.in/yaml.v3"
	"io/ioutil"
	"k8s-management-go/app/constants"
	"k8s-management-go/app/utils/files"
	"k8s-management-go/app/utils/logger"
	"k8s-management-go/app/utils/loggingstate"
	"log"
	"os"
	"path/filepath"
	"strings"
)
type baseCustomConfig struct {
	K8SManagement struct {
		ConfigFile string `yaml:"configFile,omitempty"`
		BasePath   string `yaml:"basePath,omitempty"`
	} `yaml:"k8sManagement,omitempty"`
}
type DeploymentYAMLConfig struct {
	K8SManagement struct {
		IPConfig struct {
			Deployments []DeploymentStruct `yaml:"deployments,omitempty"`
		} `yaml:"ipconfig,omitempty"`
	} `yaml:"k8sManagement,omitempty"`
}
type DeploymentStruct struct {
	IPAddress string `yaml:"ipAddress,omitempty"`
	Namespace string `yaml:"namespace,omitempty"`
	Domain    string `yaml:"domain,omitempty"`
	Dummy     string `yaml:"dummy,omitempty"`
}
type config struct {
	K8SManagement struct {
		Log struct {
			Level              string `yaml:"level,omitempty"`
			File               string `yaml:"file,omitempty"`
			Encoding           string `yaml:"encoding,omitempty"`
			OverwriteOnRestart bool   `yaml:"overwriteOnRestart,omitempty"`
		} `yaml:"log,omitempty"`
		IPConfig struct {
			File        string             `yaml:"file,omitempty"`
			DummyPrefix string             `yaml:"dummyPrefix,omitempty"`
			Deployments []DeploymentStruct `yaml:"-"`
		} `yaml:"ipconfig,omitempty"`
		Project struct {
			BaseDirectory     string `yaml:"baseDirectory,omitempty"`
			TemplateDirectory string `yaml:"templateDirectory,omitempty"`
			SecretFiles       string `yaml:"secretFiles,omitempty"`
		} `yaml:"project,omitempty"`
		VersionCheck           bool   `yaml:"versionCheck,omitempty"`
		KeepGeneratedTemplates bool   `yaml:"keepGeneratedTemplates,omitempty"`
		DryRunOnly             bool   `yaml:"-"`
		CliOnly                bool   `yaml:"-"`
		BasePath               string `yaml:"-"`
	} `yaml:"k8sManagement,omitempty"`
	Jenkins struct {
		Jcasc struct {
			ConfigurationURL      string `yaml:"configurationUrl,omitempty"`
			AuthorizationStrategy struct {
				AllowAnonymousRead bool `yaml:"allowAnonymousRead,omitempty"`
			} `yaml:"authorizationStrategy,omitempty"`
			CredentialIDs struct {
				Docker string `yaml:"docker,omitempty"`
				Maven  string `yaml:"maven,omitempty"`
				Npm    string `yaml:"npm,omitempty"`
				Vcs    string `yaml:"vcs,omitempty"`
			} `yaml:"credentialIDs,omitempty"`
			SeedJobURL string `yaml:"seedJobURL,omitempty"`
		} `yaml:"jcasc,omitempty"`
		JobDSL struct {
			BaseURL             string `yaml:"baseURL,omitempty"`
			RepoValidatePattern string `yaml:"repoValidatePattern,omitempty"`
		} `yaml:"jobDSL,omitempty"`
		Controller struct {
			Passwords struct {
				AdminUser            string `yaml:"adminUser,omitempty"`
				AdminUserEncrypted   string `yaml:"adminUserEncrypted,omitempty"`
				DefaultUserEncrypted string `yaml:"defaultUserEncrypted,omitempty"`
			} `yaml:"passwords,omitempty"`
			CustomJenkinsLabel string `yaml:"customJenkinsLabel,omitempty"`
			DeploymentName     string `yaml:"deploymentName,omitempty"`
			DefaultURIPrefix   string `yaml:"defaultURIPrefix,omitempty"`
		} `yaml:"controller,omitempty"`
		Persistence struct {
			AccessMode   string `yaml:"accessMode,omitempty"`
			StorageClass string `yaml:"storageClass,omitempty"`
			StorageSize  string `yaml:"storageSize,omitempty"`
		} `yaml:"persistence,omitempty"`
		Container struct {
			Image      string `yaml:"image,omitempty"`
			Tag        string `yaml:"tag,omitempty"`
			PullPolicy string `yaml:"pullPolicy,omitempty"`
			PullSecret string `yaml:"pullSecret,omitempty"`
		} `yaml:"container,omitempty"`
	} `yaml:"jenkins,omitempty"`
	Nginx struct {
		Ingress struct {
			Container struct {
				Image      string `yaml:"image,omitempty"`
				PullSecret string `yaml:"pullSecret,omitempty"`
			} `yaml:"container,omitempty"`
			Deployment struct {
				ForEachNamespace bool   `yaml:"forEachNamespace,omitempty"`
				DeploymentName   string `yaml:"deploymentName,omitempty"`
			} `yaml:"deployment,omitempty"`
			Annotationclass string `yaml:"annotationclass,omitempty"`
		} `yaml:"ingress,omitempty"`
		Loadbalancer struct {
			Enabled bool `yaml:"enabled,omitempty"`
			Ports   struct {
				HTTP        uint64 `yaml:"http,omitempty"`
				HTTPTarget  uint64 `yaml:"httpTarget,omitempty"`
				HTTPS       uint64 `yaml:"https,omitempty"`
				HTTPSTarget uint64 `yaml:"httpsTarget,omitempty"`
			} `yaml:"ports,omitempty"`
			Annotations struct {
				Enabled bool `yaml:"enabled,omitempty"`
			} `yaml:"annotations,omitempty"`
			ExternalDNS struct {
				HostName string `yaml:"hostName,omitempty"`
				TTL      uint64 `yaml:"ttl,omitempty"`
			} `yaml:"externalDNS,omitempty"`
		} `yaml:"loadbalancer,omitempty"`
	} `yaml:"nginx,omitempty"`
	Kubernetes struct {
		Certificates struct {
			Default  string            `yaml:"default,omitempty"`
			Contexts map[string]string `yaml:"contexts,omitempty"`
		} `yaml:"certificates,omitempty"`
	} `yaml:"kubernetes,omitempty"`
	CustomConfig baseCustomConfig `yaml:"-"`
}
var conf *config