Documentation ¶
Index ¶
- Constants
- type Addon
- type Audit
- type CNI
- type CalicoCfg
- type Calicoctl
- type Chart
- type Cluster
- type ClusterCondition
- type ClusterConditionType
- type ClusterSpec
- func (cfg *ClusterSpec) ClusterDNS() string
- func (cfg *ClusterSpec) ClusterIP() string
- func (cfg *ClusterSpec) CorednsClusterIP() string
- func (cfg *ClusterSpec) GenerateCertSANs() []string
- func (cfg *ClusterSpec) GroupHosts() map[string][]*KubeHost
- func (cfg *ClusterSpec) ParseRolesList(hostMap map[string]*KubeHost) map[string][]*KubeHost
- func (cfg *ClusterSpec) SetDefaultClusterSpec() (*ClusterSpec, map[string][]*KubeHost)
- type Components
- type Connection
- type ConnectionType
- type ContainerRuntime
- type ControlPlaneEndpoint
- type CoreDNS
- type Crictl
- type CustomScripts
- type DNS
- type DockerCompose
- type DockerManifest
- type DockerRegistry
- type Dpdk
- type ETCD
- type EtcdCluster
- type ExternalEtcd
- type ExternalZone
- type FlannelCfg
- type Harbor
- type Helm
- type HostCfg
- type HybridnetCfg
- type HybridnetNetwork
- type HybridnetSubnet
- type Iso
- type Kata
- type KubeHost
- type KubeOvnCni
- type KubeOvnController
- type KubeOvnPinger
- type KubeSphere
- type KubeVip
- type KubeovnCfg
- type Kubernetes
- type KubernetesDistribution
- type Manifest
- type ManifestRegistry
- type ManifestSpec
- type MultiCluster
- type MultiClusterList
- type MultiClusterSpec
- type MultiClusterStatus
- type MultusCNI
- type NetworkConfig
- type NodeFeatureDiscovery
- type NodeLocalDNS
- type OpenEBSCfg
- type OperatingSystem
- type OvsOvn
- type RegistryConfig
- type Repository
- type Sources
- type StorageConfig
- type System
- type Yaml
Constants ¶
const ( DefaultPreDir = "kubekey" DefaultTmpDir = "/tmp/kubekey" DefaultSSHPort = 22 DefaultLBPort = 6443 DefaultApiserverPort = 6443 DefaultLBDomain = "lb.kubesphere.local" DefaultNetworkPlugin = "calico" DefaultPodsCIDR = "10.233.64.0/18" DefaultServiceCIDR = "10.233.0.0/18" DefaultKubeImageNamespace = "kubesphere" DefaultClusterName = "cluster.local" DefaultDNSDomain = "cluster.local" DefaultArch = "amd64" DefaultSSHTimeout = 30 DefaultEtcdVersion = "v3.5.13" DefaultEtcdPort = "2379" DefaultDockerVersion = "24.0.9" DefaultCriDockerdVersion = "0.3.10" DefaultContainerdVersion = "1.7.13" DefaultRuncVersion = "v1.1.12" DefaultCrictlVersion = "v1.29.0" DefaultKubeVersion = "v1.23.15" DefaultCalicoVersion = "v3.27.3" DefaultFlannelVersion = "v0.21.3" DefaultFlannelCniPluginVersion = "v1.1.2" DefaultCniVersion = "v1.2.0" DefaultCiliumVersion = "v1.15.3" DefaulthybridnetVersion = "v0.8.6" DefaultKubeovnVersion = "v1.10.10" DefalutMultusVersion = "v3.8" DefaultHelmVersion = "v3.14.3" DefaultDockerComposeVersion = "v2.26.1" DefaultRegistryVersion = "2" DefaultHarborVersion = "v2.10.1" DefaultMaxPods = 110 DefaultPodPidsLimit = 10000 DefaultNodeCidrMaskSize = 24 DefaultIPIPMode = "Always" DefaultVXLANMode = "Never" DefaultVethMTU = 0 DefaultBackendMode = "vxlan" DefaultProxyMode = "ipvs" DefaultCrioEndpoint = "unix:///var/run/crio/crio.sock" DefaultContainerdEndpoint = "unix:///run/containerd/containerd.sock" DefaultCriDockerdEndpoint = "unix:///var/run/cri-dockerd.sock" DefaultIsulaEndpoint = "unix:///var/run/isulad.sock" Etcd = "etcd" Master = "master" ControlPlane = "control-plane" Worker = "worker" K8s = "k8s" Registry = "registry" DefaultEtcdBackupDir = "/var/backups/kube_etcd" DefaultEtcdBackupPeriod = 1440 DefaultKeepBackNumber = 5 DefaultEtcdBackupScriptDir = "/usr/local/bin/kube-scripts" DefaultPodGateway = "10.233.64.1" DefaultJoinCIDR = "100.64.0.0/16" DefaultNetworkType = "geneve" DefaultTunnelType = "geneve" DefaultPodNicType = "veth-pair" DefaultModules = "kube_ovn_fastpath.ko" DefaultRPMs = "openvswitch-kmod" DefaultVlanID = "100" DefaultOvnLabel = "node-role.kubernetes.io/control-plane" DefaultDPDKVersion = "19.11" DefaultDNSAddress = "114.114.114.114" DefaultDpdkTunnelIface = "br-phy" DefaultCNIConfigPriority = "01" DefaultOpenEBSBasePath = "/var/openebs/local" Docker = "docker" Containerd = "containerd" Crio = "crio" Isula = "isula" Haproxy = "haproxy" Kubevip = "kube-vip" DefaultKubeVipMode = "ARP" )
const ( KubeKey = "kubekey" Kubeadm = "kubeadm" External = "external" )
const HostClusterLabel = "cluster-role.kubesphere.io/host"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audit ¶ added in v3.0.8
type Audit struct {
Enabled *bool `yaml:"enabled" json:"enabled,omitempty"`
}
Audit contains the configuration for the kube-apiserver audit in cluster
type CalicoCfg ¶
type CalicoCfg struct { IPIPMode string `yaml:"ipipMode" json:"ipipMode,omitempty"` VXLANMode string `yaml:"vxlanMode" json:"vxlanMode,omitempty"` VethMTU int `yaml:"vethMTU" json:"vethMTU,omitempty"` Ipv4NatOutgoing *bool `yaml:"ipv4NatOutgoing" json:"ipv4NatOutgoing,omitempty"` DefaultIPPOOL *bool `yaml:"defaultIPPOOL" json:"defaultIPPOOL,omitempty"` EnableTypha *bool `yaml:"enableTypha" json:"enableTypha,omitempty"` Replicas int `yaml:"replicas" json:"replicas,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector" json:"nodeSelector,omitempty"` }
func (*CalicoCfg) EnableDefaultIPPOOL ¶ added in v3.0.11
EnableDefaultIPPOOL is used to determine whether to create default ippool
func (*CalicoCfg) EnableIPV4POOL_NAT_OUTGOING ¶ added in v3.0.8
EnableIPV4POOL_NAT_OUTGOING is used to determine whether to enable CALICO_IPV4POOL_NAT_OUTGOING.
type Calicoctl ¶ added in v3.0.8
type Calicoctl struct {
Version string `yaml:"version" json:"version"`
}
type Chart ¶
type Chart struct { Name string `yaml:"name" json:"name,omitempty"` Repo string `yaml:"repo" json:"repo,omitempty"` Path string `yaml:"path" json:"path,omitempty"` Version string `yaml:"version" json:"version,omitempty"` ValuesFile string `yaml:"valuesFile" json:"valuesFile,omitempty"` Values []string `yaml:"values" json:"values,omitempty"` Wait bool `yaml:"wait" json:"wait,omitempty"` }
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` }
type ClusterCondition ¶ added in v3.1.0
type ClusterCondition struct { // Type of the condition Type ClusterConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // The last time this condition was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` // Last time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition. Reason string `json:"reason,omitempty"` // A human readable message indicating details about the transition. Message string `json:"message,omitempty"` }
type ClusterConditionType ¶ added in v3.1.0
type ClusterConditionType string
const ( // Cluster agent is initialized and waiting for connecting ClusterInitialized ClusterConditionType = "Initialized" // Cluster agent is available ClusterAgentAvailable ClusterConditionType = "AgentAvailable" // Cluster has been one of federated clusters ClusterFederated ClusterConditionType = "Federated" // Cluster external access ready ClusterExternalAccessReady ClusterConditionType = "ExternalAccessReady" // Cluster is all available for requests ClusterReady ClusterConditionType = "Ready" // Openpitrix runtime is created ClusterOpenPitrixRuntimeReady ClusterConditionType = "OpenPitrixRuntimeReady" // ClusterKubeConfigCertExpiresInSevenDays indicates that the cluster certificate is about to expire. ClusterKubeConfigCertExpiresInSevenDays ClusterConditionType = "KubeConfigCertExpiresInSevenDays" )
type ClusterSpec ¶
type ClusterSpec struct { Hosts []HostCfg `yaml:"hosts" json:"hosts,omitempty"` RoleGroups map[string][]string `yaml:"roleGroups" json:"roleGroups,omitempty"` ControlPlaneEndpoint ControlPlaneEndpoint `yaml:"controlPlaneEndpoint" json:"controlPlaneEndpoint,omitempty"` System System `yaml:"system" json:"system,omitempty"` Etcd EtcdCluster `yaml:"etcd" json:"etcd,omitempty"` DNS DNS `yaml:"dns" json:"dns,omitempty"` Kubernetes Kubernetes `yaml:"kubernetes" json:"kubernetes,omitempty"` Network NetworkConfig `yaml:"network" json:"network,omitempty"` Storage StorageConfig `yaml:"storage" json:"storage,omitempty"` Registry RegistryConfig `yaml:"registry" json:"registry,omitempty"` Addons []Addon `yaml:"addons" json:"addons,omitempty"` KubeSphere KubeSphere `json:"kubesphere,omitempty"` }
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) ClusterDNS ¶
func (cfg *ClusterSpec) ClusterDNS() string
ClusterDNS is used to get the dns server address inside the cluster.
func (*ClusterSpec) ClusterIP ¶
func (cfg *ClusterSpec) ClusterIP() string
ClusterIP is used to get the kube-apiserver service address inside the cluster.
func (*ClusterSpec) CorednsClusterIP ¶
func (cfg *ClusterSpec) CorednsClusterIP() string
CorednsClusterIP is used to get the coredns service address inside the cluster.
func (*ClusterSpec) GenerateCertSANs ¶
func (cfg *ClusterSpec) GenerateCertSANs() []string
GenerateCertSANs is used to generate cert sans for cluster.
func (*ClusterSpec) GroupHosts ¶
func (cfg *ClusterSpec) GroupHosts() map[string][]*KubeHost
GroupHosts is used to group hosts according to the configuration file.s
func (*ClusterSpec) ParseRolesList ¶
func (cfg *ClusterSpec) ParseRolesList(hostMap map[string]*KubeHost) map[string][]*KubeHost
ParseRolesList is used to parse the host grouping list.
func (*ClusterSpec) SetDefaultClusterSpec ¶
func (cfg *ClusterSpec) SetDefaultClusterSpec() (*ClusterSpec, map[string][]*KubeHost)
type Components ¶
type Components struct { Helm Helm `yaml:"helm" json:"helm"` CNI CNI `yaml:"cni" json:"cni"` ETCD ETCD `yaml:"etcd" json:"etcd"` ContainerRuntimes []ContainerRuntime `yaml:"containerRuntimes" json:"containerRuntimes"` Crictl Crictl `yaml:"crictl" json:"crictl,omitempty"` DockerRegistry DockerRegistry `yaml:"docker-registry" json:"docker-registry"` Harbor Harbor `yaml:"harbor" json:"harbor"` DockerCompose DockerCompose `yaml:"docker-compose" json:"docker-compose"` Calicoctl Calicoctl `yaml:"calicoctl" json:"calicoctl"` }
type Connection ¶ added in v3.1.0
type Connection struct { // type defines how host cluster will connect to host cluster // ConnectionTypeDirect means direct connection, this requires // kubeconfig and kubesphere apiserver endpoint provided // ConnectionTypeProxy means using kubesphere proxy, no kubeconfig // or kubesphere apiserver endpoint required Type ConnectionType `json:"type,omitempty"` // KubeSphere API Server endpoint. Example: http://10.10.0.11:8080 // Should provide this field explicitly if connection type is direct. // Will be populated by ks-apiserver if connection type is proxy. KubeSphereAPIEndpoint string `json:"kubesphereAPIEndpoint,omitempty"` // Kubernetes API Server endpoint. Example: https://10.10.0.1:6443 // Should provide this field explicitly if connection type is direct. // Will be populated by ks-apiserver if connection type is proxy. KubernetesAPIEndpoint string `json:"kubernetesAPIEndpoint,omitempty"` // External Kubernetes API Server endpoint // Will be populated by ks-apiserver if connection type is proxy and ExternalKubeAPIEnabled is true. ExternalKubernetesAPIEndpoint string `json:"externalKubernetesAPIEndpoint,omitempty"` // KubeConfig content used to connect to cluster api server // Should provide this field explicitly if connection type is direct. // Will be populated by ks-proxy if connection type is proxy. KubeConfig []byte `json:"kubeconfig,omitempty"` // Token used by agents of member cluster to connect to host cluster proxy. // This field is populated by apiserver only if connection type is proxy. Token string `json:"token,omitempty"` // KubeAPIServerPort is the port which listens for forwarding kube-apiserver traffic // Only applicable when connection type is proxy. KubernetesAPIServerPort uint16 `json:"kubernetesAPIServerPort,omitempty"` // KubeSphereAPIServerPort is the port which listens for forwarding kubesphere apigateway traffic // Only applicable when connection type is proxy. KubeSphereAPIServerPort uint16 `json:"kubesphereAPIServerPort,omitempty"` }
type ConnectionType ¶ added in v3.1.0
type ConnectionType string
const ( ConnectionTypeDirect ConnectionType = "direct" ConnectionTypeProxy ConnectionType = "proxy" )
type ContainerRuntime ¶
type ControlPlaneEndpoint ¶
type ControlPlaneEndpoint struct { InternalLoadbalancer string `yaml:"internalLoadbalancer" json:"internalLoadbalancer,omitempty"` Domain string `yaml:"domain" json:"domain,omitempty"` ExternalDNS *bool `yaml:"externalDNS" json:"externalDNS"` Address string `yaml:"address" json:"address,omitempty"` Port int `yaml:"port" json:"port,omitempty"` KubeVip KubeVip `yaml:"kubevip" json:"kubevip,omitempty"` }
ControlPlaneEndpoint defines the control plane endpoint information for cluster.
func SetDefaultLBCfg ¶
func SetDefaultLBCfg(cfg *ClusterSpec, masterGroup []*KubeHost) ControlPlaneEndpoint
func (*ControlPlaneEndpoint) EnableExternalDNS ¶ added in v3.0.8
func (c *ControlPlaneEndpoint) EnableExternalDNS() bool
EnableExternalDNS is used to determine whether to use external dns to resolve kube-apiserver domain.
func (ControlPlaneEndpoint) IsInternalLBEnabled ¶
func (c ControlPlaneEndpoint) IsInternalLBEnabled() bool
func (ControlPlaneEndpoint) IsInternalLBEnabledVip ¶
func (c ControlPlaneEndpoint) IsInternalLBEnabledVip() bool
type CoreDNS ¶ added in v3.1.0
type CoreDNS struct { AdditionalConfigs string `yaml:"additionalConfigs" json:"additionalConfigs"` ExternalZones []ExternalZone `yaml:"externalZones" json:"externalZones"` RewriteBlock string `yaml:"rewriteBlock" json:"rewriteBlock"` UpstreamDNSServers []string `yaml:"upstreamDNSServers" json:"upstreamDNSServers"` }
type CustomScripts ¶
type CustomScripts struct { Name string `yaml:"name" json:"name,omitempty"` Bash string `yaml:"bash" json:"bash,omitempty"` Materials []string `yaml:"materials" json:"materials,omitempty"` }
CustomScripts defines the custom shell scripts for each node to exec before and finished kubernetes install.
type DNS ¶ added in v3.1.0
type DNS struct { DNSEtcHosts string `yaml:"dnsEtcHosts" json:"dnsEtcHosts"` CoreDNS CoreDNS `yaml:"coredns" json:"coredns"` NodeLocalDNS NodeLocalDNS `yaml:"nodelocaldns" json:"nodelocaldns"` }
type DockerCompose ¶
type DockerCompose struct {
Version string `yaml:"version" json:"version"`
}
type DockerManifest ¶
type DockerManifest struct {
Version string `yaml:"version" json:"version"`
}
type DockerRegistry ¶
type DockerRegistry struct {
Version string `yaml:"version" json:"version"`
}
type EtcdCluster ¶
type EtcdCluster struct { // Type of etcd cluster, can be set to 'kubekey' 'kubeadm' 'external' Type string `yaml:"type" json:"type,omitempty"` // ExternalEtcd describes how to connect to an external etcd cluster when type is set to external External ExternalEtcd `yaml:"external" json:"external,omitempty"` BackupDir string `yaml:"backupDir" json:"backupDir,omitempty"` BackupPeriod int `yaml:"backupPeriod" json:"backupPeriod,omitempty"` KeepBackupNumber int `yaml:"keepBackupNumber" json:"keepBackupNumber,omitempty"` BackupScriptDir string `yaml:"backupScript" json:"backupScript,omitempty"` DataDir *string `yaml:"dataDir" json:"dataDir,omitempty"` HeartbeatInterval *int `yaml:"heartbeatInterval" json:"heartbeatInterval,omitempty"` ElectionTimeout *int `yaml:"electionTimeout" json:"electionTimeout,omitempty"` SnapshotCount *int `yaml:"snapshotCount" json:"snapshotCount,omitempty"` AutoCompactionRetention *int `yaml:"autoCompactionRetention" json:"autoCompactionRetention,omitempty"` Metrics *string `yaml:"metrics" json:"metrics,omitempty"` QuotaBackendBytes *int64 `yaml:"quotaBackendBytes" json:"quotaBackendBytes,omitempty"` MaxRequestBytes *int64 `yaml:"maxRequestBytes" json:"maxRequestBytes,omitempty"` MaxSnapshots *int `yaml:"maxSnapshots" json:"maxSnapshots,omitempty"` MaxWals *int `yaml:"maxWals" json:"maxWals,omitempty"` LogLevel *string `yaml:"logLevel" json:"logLevel"` }
func SetDefaultEtcdCfg ¶
func SetDefaultEtcdCfg(cfg *ClusterSpec) EtcdCluster
type ExternalEtcd ¶
type ExternalEtcd struct { // Endpoints of etcd members. Useful for using external etcd. // If not provided, kubeadm will run etcd in a static pod. Endpoints []string `yaml:"endpoints" json:"endpoints,omitempty"` // CAFile is an SSL Certificate Authority file used to secure etcd communication. CAFile string `yaml:"caFile" json:"caFile,omitempty"` // CertFile is an SSL certification file used to secure etcd communication. CertFile string `yaml:"certFile" json:"certFile,omitempty"` // KeyFile is an SSL key file used to secure etcd communication. KeyFile string `yaml:"keyFile" json:"keyFile,omitempty"` }
ExternalEtcd describes how to connect to an external etcd cluster KubeKey, Kubeadm and External are mutually exclusive
type ExternalZone ¶ added in v3.1.0
type FlannelCfg ¶
type HostCfg ¶
type HostCfg struct { Name string `yaml:"name,omitempty" json:"name,omitempty"` Address string `yaml:"address,omitempty" json:"address,omitempty"` InternalAddress string `yaml:"internalAddress,omitempty" json:"internalAddress,omitempty"` Port int `yaml:"port,omitempty" json:"port,omitempty"` User string `yaml:"user,omitempty" json:"user,omitempty"` Password string `yaml:"password,omitempty" json:"password,omitempty"` PrivateKey string `yaml:"privateKey,omitempty" json:"privateKey,omitempty"` PrivateKeyPath string `yaml:"privateKeyPath,omitempty" json:"privateKeyPath,omitempty"` Arch string `yaml:"arch,omitempty" json:"arch,omitempty"` Timeout *int64 `yaml:"timeout,omitempty" json:"timeout,omitempty"` // Labels defines the kubernetes labels for the node. Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"` }
HostCfg defines host information for cluster.
func SetDefaultHostsCfg ¶
func SetDefaultHostsCfg(cfg *ClusterSpec) []HostCfg
type HybridnetCfg ¶ added in v3.1.0
type HybridnetCfg struct { DefaultNetworkType string `yaml:"defaultNetworkType" json:"defaultNetworkType,omitempty"` EnableNetworkPolicy *bool `yaml:"enableNetworkPolicy" json:"enableNetworkPolicy,omitempty"` Init *bool `yaml:"init" json:"init,omitempty"` PreferVxlanInterfaces string `yaml:"preferVxlanInterfaces" json:"preferVxlanInterfaces,omitempty"` PreferVlanInterfaces string `yaml:"preferVlanInterfaces" json:"preferVlanInterfaces,omitempty"` PreferBGPInterfaces string `yaml:"preferBGPInterfaces" json:"preferBGPInterfaces,omitempty"` Networks []HybridnetNetwork `yaml:"networks" json:"networks,omitempty"` }
func (*HybridnetCfg) EnableInit ¶ added in v3.1.0
func (h *HybridnetCfg) EnableInit() bool
EnableInit is used to determine whether to create default network
func (*HybridnetCfg) NetworkPolicy ¶ added in v3.1.0
func (h *HybridnetCfg) NetworkPolicy() bool
NetworkPolicy is used to determine whether to enable network policy
type HybridnetNetwork ¶ added in v3.1.0
type HybridnetNetwork struct { Name string `yaml:"name" json:"name,omitempty"` NetID *int `yaml:"netID" json:"netID,omitempty"` Type string `yaml:"type" json:"type,omitempty"` Mode string `yaml:"mode" json:"mode,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector" json:"nodeSelector,omitempty"` Subnets []HybridnetSubnet `yaml:"subnets" json:"subnets,omitempty"` }
type HybridnetSubnet ¶ added in v3.1.0
type HybridnetSubnet struct { Name string `yaml:"name" json:"name,omitempty"` NetID *int `yaml:"netID" json:"netID,omitempty"` CIDR string `yaml:"cidr" json:"cidr,omitempty"` Gateway string `yaml:"gateway" json:"gateway,omitempty"` Start string `yaml:"start" json:"start,omitempty"` End string `yaml:"end" json:"end,omitempty"` ReservedIPs []string `yaml:"reservedIPs" json:"reservedIPs,omitempty"` ExcludeIPs []string `yaml:"excludeIPs" json:"excludeIPs,omitempty"` }
type Kata ¶
type Kata struct {
Enabled *bool `yaml:"enabled" json:"enabled,omitempty"`
}
Kata contains the configuration for the kata in cluster
type KubeOvnCni ¶
type KubeOvnCni struct { EnableMirror bool `yaml:"enableMirror" json:"enableMirror,omitempty"` Iface string `yaml:"iface" json:"iface,omitempty"` CNIConfigPriority string `yaml:"CNIConfigPriority" json:"CNIConfigPriority,omitempty"` Modules string `yaml:"modules" json:"modules,omitempty"` RPMs string `yaml:"RPMs" json:"RPMs,omitempty"` }
type KubeOvnController ¶
type KubeOvnController struct { PodGateway string `yaml:"podGateway" json:"podGateway,omitempty"` CheckGateway *bool `yaml:"checkGateway" json:"checkGateway,omitempty"` LogicalGateway bool `yaml:"logicalGateway" json:"logicalGateway,omitempty"` ExcludeIps string `yaml:"excludeIps" json:"excludeIps,omitempty"` NetworkType string `yaml:"networkType" json:"networkType,omitempty"` VlanInterfaceName string `yaml:"vlanInterfaceName" json:"vlanInterfaceName,omitempty"` VlanID string `yaml:"vlanID" json:"vlanID,omitempty"` PodNicType string `yaml:"podNicType" json:"podNicType,omitempty"` EnableLB *bool `yaml:"enableLB" json:"enableLB,omitempty"` EnableNP *bool `yaml:"enableNP" json:"enableNP,omitempty"` EnableEipSnat *bool `yaml:"enableEipSnat" json:"enableEipSnat,omitempty"` EnableExternalVPC *bool `yaml:"enableExternalVPC" json:"enableExternalVPC,omitempty"` }
type KubeOvnPinger ¶
type KubeSphere ¶
type KubeSphere struct { Enabled bool `json:"enabled,omitempty"` Version string `json:"version,omitempty"` Configurations string `json:"configurations,omitempty"` }
KubeSphere defines the configuration information of the KubeSphere.
type KubeovnCfg ¶
type KubeovnCfg struct { EnableSSL bool `yaml:"enableSSL" json:"enableSSL,omitempty"` JoinCIDR string `yaml:"joinCIDR" json:"joinCIDR,omitempty"` Label string `yaml:"label" json:"label,omitempty"` TunnelType string `yaml:"tunnelType" json:"tunnelType,omitempty"` SvcYamlIpfamilypolicy string `yaml:"svcYamlIpfamilypolicy" json:"svcYamlIpfamilypolicy,omitempty"` Dpdk Dpdk `yaml:"dpdk" json:"dpdk,omitempty"` OvsOvn OvsOvn `yaml:"ovs-ovn" json:"ovs-ovn,omitempty"` KubeOvnController KubeOvnController `yaml:"kube-ovn-controller" json:"kube-ovn-controller,omitempty"` KubeOvnCni KubeOvnCni `yaml:"kube-ovn-cni" json:"kube-ovn-cni,omitempty"` KubeOvnPinger KubeOvnPinger `yaml:"kube-ovn-pinger" json:"kube-ovn-pinger,omitempty"` }
func (*KubeovnCfg) KubeovnCheckGateway ¶
func (k *KubeovnCfg) KubeovnCheckGateway() bool
func (*KubeovnCfg) KubeovnEnableEipSnat ¶
func (k *KubeovnCfg) KubeovnEnableEipSnat() bool
func (*KubeovnCfg) KubeovnEnableExternalVPC ¶
func (k *KubeovnCfg) KubeovnEnableExternalVPC() bool
func (*KubeovnCfg) KubeovnEnableLB ¶
func (k *KubeovnCfg) KubeovnEnableLB() bool
func (*KubeovnCfg) KubeovnEnableNP ¶
func (k *KubeovnCfg) KubeovnEnableNP() bool
type Kubernetes ¶
type Kubernetes struct { Type string `yaml:"type" json:"type,omitempty"` Version string `yaml:"version" json:"version,omitempty"` ClusterName string `yaml:"clusterName" json:"clusterName,omitempty"` DNSDomain string `yaml:"dnsDomain" json:"dnsDomain,omitempty"` DisableKubeProxy bool `yaml:"disableKubeProxy" json:"disableKubeProxy,omitempty"` MasqueradeAll bool `yaml:"masqueradeAll" json:"masqueradeAll,omitempty"` MaxPods int `yaml:"maxPods" json:"maxPods,omitempty"` PodPidsLimit int `yaml:"podPidsLimit" json:"podPidsLimit,omitempty"` NodeCidrMaskSize int `yaml:"nodeCidrMaskSize" json:"nodeCidrMaskSize,omitempty"` ApiserverCertExtraSans []string `yaml:"apiserverCertExtraSans" json:"apiserverCertExtraSans,omitempty"` ProxyMode string `yaml:"proxyMode" json:"proxyMode,omitempty"` AutoRenewCerts *bool `yaml:"autoRenewCerts" json:"autoRenewCerts,omitempty"` // +optional Nodelocaldns *bool `yaml:"nodelocaldns" json:"nodelocaldns,omitempty"` ContainerManager string `yaml:"containerManager" json:"containerManager,omitempty"` ContainerRuntimeEndpoint string `yaml:"containerRuntimeEndpoint" json:"containerRuntimeEndpoint,omitempty"` NodeFeatureDiscovery NodeFeatureDiscovery `yaml:"nodeFeatureDiscovery" json:"nodeFeatureDiscovery,omitempty"` Kata Kata `yaml:"kata" json:"kata,omitempty"` ApiServerArgs []string `yaml:"apiserverArgs" json:"apiserverArgs,omitempty"` ControllerManagerArgs []string `yaml:"controllerManagerArgs" json:"controllerManagerArgs,omitempty"` SchedulerArgs []string `yaml:"schedulerArgs" json:"schedulerArgs,omitempty"` KubeletArgs []string `yaml:"kubeletArgs" json:"kubeletArgs,omitempty"` KubeProxyArgs []string `yaml:"kubeProxyArgs" json:"kubeProxyArgs,omitempty"` FeatureGates map[string]bool `yaml:"featureGates" json:"featureGates,omitempty"` KubeletConfiguration runtime.RawExtension `yaml:"kubeletConfiguration" json:"kubeletConfiguration,omitempty"` KubeProxyConfiguration runtime.RawExtension `yaml:"kubeProxyConfiguration" json:"kubeProxyConfiguration,omitempty"` Audit Audit `yaml:"audit" json:"audit,omitempty"` }
Kubernetes contains the configuration for the cluster
func SetDefaultClusterCfg ¶
func SetDefaultClusterCfg(cfg *ClusterSpec) Kubernetes
func (*Kubernetes) EnableAudit ¶ added in v3.0.8
func (k *Kubernetes) EnableAudit() bool
EnableAudit is used to determine whether to enable kube-apiserver audit.
func (*Kubernetes) EnableAutoRenewCerts ¶
func (k *Kubernetes) EnableAutoRenewCerts() bool
EnableAutoRenewCerts is used to determine whether to enable AutoRenewCerts.
func (*Kubernetes) EnableKataDeploy ¶
func (k *Kubernetes) EnableKataDeploy() bool
EnableKataDeploy is used to determine whether to deploy kata.
func (*Kubernetes) EnableNodeFeatureDiscovery ¶
func (k *Kubernetes) EnableNodeFeatureDiscovery() bool
EnableNodeFeatureDiscovery is used to determine whether to deploy node-feature-discovery.
func (*Kubernetes) EnableNodelocaldns ¶
func (k *Kubernetes) EnableNodelocaldns() bool
EnableNodelocaldns is used to determine whether to deploy nodelocaldns.
func (*Kubernetes) IsAtLeastV124 ¶ added in v3.1.0
func (k *Kubernetes) IsAtLeastV124() bool
IsAtLeastV124 is used to determine whether the k8s version is greater than v1.24.
type KubernetesDistribution ¶
type Manifest ¶
type Manifest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ManifestSpec `json:"spec,omitempty"` }
Manifest is the Schema for the manifests API
type ManifestRegistry ¶
type ManifestRegistry struct {
Auths runtime.RawExtension `yaml:"auths" json:"auths,omitempty"`
}
type ManifestSpec ¶
type ManifestSpec struct { Arches []string `yaml:"arches" json:"arches"` OperatingSystems []OperatingSystem `yaml:"operatingSystems" json:"operatingSystems"` KubernetesDistributions []KubernetesDistribution `yaml:"kubernetesDistributions" json:"kubernetesDistributions"` Components Components `yaml:"components" json:"components"` Images []string `yaml:"images" json:"images"` ManifestRegistry ManifestRegistry `yaml:"registry" json:"registry"` }
ManifestSpec defines the desired state of Manifest
type MultiCluster ¶ added in v3.1.0
type MultiCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MultiClusterSpec `json:"spec,omitempty"` Status MultiClusterStatus `json:"status,omitempty"` }
func (MultiCluster) IsHostCluster ¶ added in v3.1.0
func (m MultiCluster) IsHostCluster() bool
type MultiClusterList ¶ added in v3.1.0
type MultiClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MultiCluster `json:"items"` }
type MultiClusterSpec ¶ added in v3.1.0
type MultiClusterSpec struct { // Join cluster as a kubefed cluster JoinFederation bool `json:"joinFederation,omitempty"` // Desired state of the cluster Enable bool `json:"enable,omitempty"` // Provider of the cluster, this field is just for description Provider string `json:"provider,omitempty"` // Connection holds info to connect to the member cluster Connection Connection `json:"connection,omitempty"` // ExternalKubeAPIEnabled export kubeapiserver to public use a lb type service if connection type is proxy ExternalKubeAPIEnabled bool `json:"externalKubeAPIEnabled,omitempty"` }
type MultiClusterStatus ¶ added in v3.1.0
type MultiClusterStatus struct { // Represents the latest available observations of a cluster's current state. Conditions []ClusterCondition `json:"conditions,omitempty"` // GitVersion of the kubernetes cluster, this field is populated by cluster controller KubernetesVersion string `json:"kubernetesVersion,omitempty"` // GitVersion of the /kapis/version api response, this field is populated by cluster controller KubeSphereVersion string `json:"kubeSphereVersion,omitempty"` // Count of the kubernetes cluster nodes // This field may not reflect the instant status of the cluster. NodeCount int `json:"nodeCount,omitempty"` // Zones are the names of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // +optional Zones []string `json:"zones,omitempty"` // Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'. // +optional Region *string `json:"region,omitempty"` // Configz is status of components enabled in the member cluster. This is synchronized with member cluster // every amount of time, like 5 minutes. // +optional Configz map[string]bool `json:"configz,omitempty"` // UID is the kube-system namespace UID of the cluster, which represents the unique ID of the cluster. UID types.UID `json:"uid,omitempty"` }
type NetworkConfig ¶
type NetworkConfig struct { Plugin string `yaml:"plugin" json:"plugin,omitempty"` KubePodsCIDR string `yaml:"kubePodsCIDR" json:"kubePodsCIDR,omitempty"` KubeServiceCIDR string `yaml:"kubeServiceCIDR" json:"kubeServiceCIDR,omitempty"` Calico CalicoCfg `yaml:"calico" json:"calico,omitempty"` Flannel FlannelCfg `yaml:"flannel" json:"flannel,omitempty"` Kubeovn KubeovnCfg `yaml:"kubeovn" json:"kubeovn,omitempty"` MultusCNI MultusCNI `yaml:"multusCNI" json:"multusCNI,omitempty"` Hybridnet HybridnetCfg `yaml:"hybridnet" json:"hybridnet,omitempty"` }
func SetDefaultNetworkCfg ¶
func SetDefaultNetworkCfg(cfg *ClusterSpec) NetworkConfig
func (*NetworkConfig) EnableMultusCNI ¶
func (n *NetworkConfig) EnableMultusCNI() bool
type NodeFeatureDiscovery ¶
type NodeFeatureDiscovery struct {
Enabled *bool `yaml:"enabled" json:"enabled,omitempty"`
}
NodeFeatureDiscovery contains the configuration for the node-feature-discovery in cluster
type NodeLocalDNS ¶ added in v3.1.0
type NodeLocalDNS struct {
ExternalZones []ExternalZone `yaml:"externalZones" json:"externalZones"`
}
type OpenEBSCfg ¶
type OpenEBSCfg struct {
BasePath string `yaml:"basePath" json:"basePath,omitempty"`
}
type OperatingSystem ¶
type OperatingSystem struct { Arch string `yaml:"arch" json:"arch"` Type string `yaml:"type" json:"type,omitempty"` Id string `yaml:"id" json:"id"` Version string `yaml:"version" json:"version"` OsImage string `yaml:"osImage" json:"osImage"` Repository Repository `yaml:"repository" json:"repository"` }
type RegistryConfig ¶
type RegistryConfig struct { Type string `yaml:"type" json:"type,omitempty"` RegistryMirrors []string `yaml:"registryMirrors" json:"registryMirrors,omitempty"` InsecureRegistries []string `yaml:"insecureRegistries" json:"insecureRegistries,omitempty"` PrivateRegistry string `yaml:"privateRegistry" json:"privateRegistry,omitempty"` DataRoot string `yaml:"dataRoot" json:"dataRoot,omitempty"` NamespaceOverride string `yaml:"namespaceOverride" json:"namespaceOverride,omitempty"` BridgeIP string `yaml:"bridgeIP" json:"bridgeIP,omitempty"` Auths runtime.RawExtension `yaml:"auths" json:"auths,omitempty"` }
RegistryConfig defines the configuration information of the image's repository.
func (*RegistryConfig) GetHost ¶ added in v3.1.0
func (r *RegistryConfig) GetHost() string
type Repository ¶
type Repository struct {
Iso Iso `yaml:"iso" json:"iso"`
}
type StorageConfig ¶
type StorageConfig struct {
OpenEBS OpenEBSCfg `yaml:"openebs" json:"openebs,omitempty"`
}
func SetDefaultStorageCfg ¶
func SetDefaultStorageCfg(cfg *ClusterSpec) StorageConfig
type System ¶
type System struct { NtpServers []string `yaml:"ntpServers" json:"ntpServers,omitempty"` Timezone string `yaml:"timezone" json:"timezone,omitempty"` Rpms []string `yaml:"rpms" json:"rpms,omitempty"` Debs []string `yaml:"debs" json:"debs,omitempty"` PreInstall []CustomScripts `yaml:"preInstall" json:"preInstall,omitempty"` PostInstall []CustomScripts `yaml:"postInstall" json:"postInstall,omitempty"` SkipConfigureOS bool `yaml:"skipConfigureOS" json:"skipConfigureOS,omitempty"` }
System defines the system config for each node in cluster.