types

package
v0.8.1-beta.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	ControlPlaneComponent `json:",inline"`
}

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	User  ClusterUser   `json:"user"`
	Nodes []ClusterNode `json:"nodes"`

	RoleGroup RoleGroup    `json:"roleGroup"`
	Addons    []PluginMeta `json:"addons"`

	// for kubeadm configuration
	Kubernetes Kubernetes `json:"kubernetes"`

	Version InfraVersionInfo `json:"version"`
}

type ClusterNode

type ClusterNode struct {
	Name            string       `json:"name"`
	Address         string       `json:"address"`
	InternalAddress string       `json:"internalAddress"`
	NodeOptions     *NodeOptions `json:"options"`
}

type ClusterUser

type ClusterUser struct {
	// user name
	Name string `json:"name"`
	// sudo password
	Password string `json:"password"`
	// ssh privateKey
	PrivateKey     string `json:"privateKey"`
	PrivateKeyPath string `json:"privateKeyPath"`
}

type ContainerRuntime

type ContainerRuntime struct {
	ContainerRuntimeType     string `json:"containerRuntimeType"`
	ContainerRuntimeEndpoint string `json:"containerRuntimeEndpoint"`
	SandBoxImage             string `json:"sandBoxImage"`
}

type ControlPlaneComponent

type ControlPlaneComponent struct {
	// apiserver extra args
	ExtraArgs map[string]string `json:"extraArgs"`
}

type ControlPlaneEndpoint

type ControlPlaneEndpoint struct {
	Domain string `json:"domain"`
	Port   int    `json:"port"`

	// TODO support apiserver loadbalancer
	LoadBalancer string `json:"loadBalancer"`
}

type HelmChart

type HelmChart struct {
	Name         string         `json:"name"`
	Version      string         `json:"version"`
	Repo         string         `json:"repo"`
	Path         string         `json:"path"`
	ValueOptions values.Options `json:"options"`
}

type HugePageFeature

type HugePageFeature struct {
	HugePageSize string `json:"hugePageSize"`

	// HugeSizeWithUnit is the huge page size with unit, such as 2Mi, 1Gi.
	HugeSizeWithUnit string `json:"hugeSizeWithUnit"`
}

type InfraVersionInfo

type InfraVersionInfo struct {
	KubernetesVersion string `json:"kubernetesVersion"`
	EtcdVersion       string `json:"etcdVersion"`
	ContainerVersion  string `json:"containerVersion"`
	CRICtlVersion     string `json:"crictlVersion"`
	RuncVersion       string `json:"runcVersion"`
	CniVersion        string `json:"cniVersion"`
	HelmVersion       string `json:"helmVersion"`
}

type Kubernetes

type Kubernetes struct {
	// ClusterName string `json:"clusterName"`
	// DNSDomain string `json:"dnsDomain"`
	ProxyMode string `json:"proxyMode"`

	Networking Networking       `json:"networking"`
	CRI        ContainerRuntime `json:"cri"`

	ControlPlaneEndpoint ControlPlaneEndpoint `json:"controlPlaneEndpoint"`
	APIServer            APIServer            `json:"apiServer"`
	Scheduler            Scheduler            `json:"scheduler"`
}

func (*Kubernetes) AutoDefaultFill

func (k *Kubernetes) AutoDefaultFill()

type Networking

type Networking struct {
	// using network plugin, default is calico
	Plugin string `json:"plugin"`

	// apis/kubeadm/types.Networking
	ServiceSubnet string `json:"serviceSubnet"`
	PodSubnet     string `json:"podSubnet"`
	DNSDomain     string `json:"dnsDomain"`
}

type NodeOptions

type NodeOptions struct {
	HugePageFeature *HugePageFeature `json:"hugePageFeature"`
}

type PluginMeta

type PluginMeta struct {
	Name      string        `json:"name,omitempty"`
	Namespace string        `json:"namespace,omitempty"`
	Sources   PluginSources `json:"sources,omitempty"`
}

type PluginSources

type PluginSources struct {
	Chart *HelmChart `json:"chart"`
	Yaml  *Yaml      `json:"yaml"`
}

type RoleGroup

type RoleGroup struct {
	ETCD   []string `json:"etcd"`
	Master []string `json:"master"`
	Worker []string `json:"worker"`
}

func (*RoleGroup) IsValidate

func (g *RoleGroup) IsValidate() bool

type Scheduler

type Scheduler struct {
	ControlPlaneComponent `json:",inline"`
}

type Yaml

type Yaml struct {
	Path []string `json:"path,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL