Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultOptionsForComponentAndVersion(component string, version semver.Version) (map[string]string, error)
- func ExtraConfigForComponent(component string, opts util.ExtraOptionSlice, version semver.Version) (map[string]string, error)
- func NewKubeletConfig(k8s config.KubernetesConfig, r cruntime.Manager) (string, error)
- func ParseFeatureArgs(featureGates string) (map[string]bool, string, error)
- func ParseKubernetesVersion(version string) (semver.Version, error)
- func Supports(featureName string) bool
- func VersionIsBetween(version, gte, lte semver.Version) bool
- type Bootstrapper
- func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error
- func (k *Bootstrapper) GetAPIServerStatus(ip net.IP, apiserverPort int) (string, error)
- func (k *Bootstrapper) GetKubeletStatus() (string, error)
- func (k *Bootstrapper) LogCommands(o bootstrapper.LogOptions) map[string]string
- func (k *Bootstrapper) PullImages(k8s config.KubernetesConfig) error
- func (k *Bootstrapper) RestartCluster(k8s config.KubernetesConfig) error
- func (k *Bootstrapper) SetupCerts(k8s config.KubernetesConfig) error
- func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error
- func (k *Bootstrapper) UpdateCluster(cfg config.KubernetesConfig) error
- type ComponentExtraArgs
- type VersionedExtraOption
Constants ¶
const ( Kubelet = "kubelet" Kubeadm = "kubeadm" Apiserver = "apiserver" Scheduler = "scheduler" ControllerManager = "controller-manager" )
These are the components that can be configured through the "extra-config"
Variables ¶
var PodsByLayer = []pod{
{"apiserver", "component", "kube-apiserver"},
{"proxy", "k8s-app", "kube-proxy"},
{"etcd", "component", "etcd"},
{"scheduler", "component", "kube-scheduler"},
{"controller", "component", "kube-controller-manager"},
{"dns", "k8s-app", "kube-dns"},
}
PodsByLayer are queries we run when health checking, sorted roughly by dependency layer
var SkipAdditionalPreflights = map[string][]string{}
SkipAdditionalPreflights are additional preflights we skip depending on the runtime in use.
var SkipPreflights = []string{
"DirAvailable--etc-kubernetes-manifests",
"DirAvailable--data-minikube",
"Port-10250",
"FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml",
"FileAvailable--etc-kubernetes-manifests-etcd.yaml",
"Swap",
"CRI",
}
SkipPreflights are preflight checks we always skip.
Functions ¶
func DefaultOptionsForComponentAndVersion ¶ added in v0.22.3
func DefaultOptionsForComponentAndVersion(component string, version semver.Version) (map[string]string, error)
DefaultOptionsForComponentAndVersion returns the default option for a component and version
func ExtraConfigForComponent ¶ added in v0.22.3
func ExtraConfigForComponent(component string, opts util.ExtraOptionSlice, version semver.Version) (map[string]string, error)
ExtraConfigForComponent generates a map of flagname-value pairs for a k8s component.
func NewKubeletConfig ¶ added in v0.22.3
NewKubeletConfig generates a new systemd unit containing a configured kubelet based on the options present in the KubernetesConfig.
func ParseFeatureArgs ¶ added in v0.28.1
ParseFeatureArgs parses feature args into extra args
func ParseKubernetesVersion ¶ added in v0.22.3
ParseKubernetesVersion parses the kubernetes version
func Supports ¶ added in v0.28.1
Supports indicates whether a feature name is supported on the feature gates for kubeadm
func VersionIsBetween ¶ added in v0.22.3
VersionIsBetween checks if a version is between (or including) two given versions
Types ¶
type Bootstrapper ¶ added in v1.0.0
type Bootstrapper struct {
// contains filtered or unexported fields
}
Bootstrapper is a bootstrapper using kubeadm
func NewKubeadmBootstrapper ¶
func NewKubeadmBootstrapper(api libmachine.API) (*Bootstrapper, error)
NewKubeadmBootstrapper creates a new kubeadm.Bootstrapper
func (*Bootstrapper) DeleteCluster ¶ added in v1.0.0
func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error
DeleteCluster removes the components that were started earlier
func (*Bootstrapper) GetAPIServerStatus ¶ added in v1.0.0
GetAPIServerStatus returns the api-server status
func (*Bootstrapper) GetKubeletStatus ¶ added in v1.0.0
func (k *Bootstrapper) GetKubeletStatus() (string, error)
GetKubeletStatus returns the kubelet status
func (*Bootstrapper) LogCommands ¶ added in v1.0.0
func (k *Bootstrapper) LogCommands(o bootstrapper.LogOptions) map[string]string
LogCommands returns a map of log type to a command which will display that log.
func (*Bootstrapper) PullImages ¶ added in v1.0.0
func (k *Bootstrapper) PullImages(k8s config.KubernetesConfig) error
PullImages downloads images that will be used by RestartCluster
func (*Bootstrapper) RestartCluster ¶ added in v1.0.0
func (k *Bootstrapper) RestartCluster(k8s config.KubernetesConfig) error
RestartCluster restarts the Kubernetes cluster configured by kubeadm
func (*Bootstrapper) SetupCerts ¶ added in v1.0.0
func (k *Bootstrapper) SetupCerts(k8s config.KubernetesConfig) error
SetupCerts sets up certificates within the cluster.
func (*Bootstrapper) StartCluster ¶ added in v1.0.0
func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error
StartCluster starts the cluster
func (*Bootstrapper) UpdateCluster ¶ added in v1.0.0
func (k *Bootstrapper) UpdateCluster(cfg config.KubernetesConfig) error
UpdateCluster updates the cluster
type ComponentExtraArgs ¶ added in v0.22.3
ComponentExtraArgs holds extra args for a component
func NewComponentExtraArgs ¶ added in v0.22.3
func NewComponentExtraArgs(opts util.ExtraOptionSlice, version semver.Version, featureGates string) ([]ComponentExtraArgs, error)
NewComponentExtraArgs creates a new ComponentExtraArgs
type VersionedExtraOption ¶ added in v0.22.3
type VersionedExtraOption struct { // The flag and component that will be set Option util.ExtraOption // This flag will only be applied to versions before or equal to this version // If it is the default value, it will have no upper bound on versions the // flag is applied to LessThanOrEqual semver.Version // The flag will only be applied to versions after or equal to this version // If it is the default value, it will have no lower bound on versions the // flag is applied to GreaterThanOrEqual semver.Version }
VersionedExtraOption holds information on flags to apply to a specific range of versions
func NewUnversionedOption ¶ added in v0.23.0
func NewUnversionedOption(component, k, v string) VersionedExtraOption
NewUnversionedOption returns a VersionedExtraOption that applies to all versions.