package config

type Dns struct {
	Servers                []string `yaml:"servers" env-default:"8.8.8.8,8.8.4.4"`
	DisableHostNameservers bool     `yaml:"disable_host_nameservers"`
}

type RegistryMirror struct {
	Host       string `yaml:"host"`
	SkipVerify bool   `yaml:"skip_verify"`
}

type Orchestrator struct {
	Version                   string `yaml:"version" env-default:"v1.29.0"`
	ClusterName               string `yaml:"cluster_name" env-default:"k8s-cluster.local"`
	BinDir                    string `yaml:"bin_dir" env-default:"/usr/local/bin"`
	SysctlFilePath            string `yaml:"sysctl_file_path" env-default:"/etc/sysctl.d/99-sysctl.conf"`
	LoadbalancerApiserverPort int    `yaml:"loadbalancer_apiserver_port" env-default:"6443"`
	Dns                       Dns    `yaml:"dns"`
	CloudProvider             string `yaml:"cloud_provider"`
	ExgernalCloudProvider     string `yaml:"external_cloud_provider"`
	ContainerEngine           struct {
		Type    string `yaml:"type" env-default:"containerd"`
		Install bool   `yaml:"install"`
	} `yaml:"container_engine"`
	PingAccessIp             bool   `yaml:"ping_access_ip"`
	AutoRenewCertificates    bool   `yaml:"auto_renew_certificates"`
	EventTtl                 string `yaml:"event_ttl" env-default:"1h0m0s"`
	PodSecurityPolicyEnabled bool   `yaml:"pod_security_policy_enabled"`

	Network struct {
		Plugin           string `yaml:"plugin" env-default:"calico"`
		ServiceAddresses string `yaml:"service_addresses" env-default:"10.233.0.0/18"`
		PodsSubnet       string `yaml:"pods_subnet" env-default:"10.233.64.0/18"`
	} `yaml:"network"`
	RegistryMirrors []RegistryMirror `yaml:"registry_mirrors"`
}
