kubeadm

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kubelet           = "kubelet"
	Apiserver         = "apiserver"
	Scheduler         = "scheduler"
	ControllerManager = "controller-manager"
)

These are the components that can be configured through the "extra-config"

Variables

View Source
var PodsByLayer = []pod{
	{"apiserver", "component", "kube-apiserver"},
	{"proxy", "k8s-app", "kube-proxy"},
	{"etcd", "component", "etcd"},
	{"scheduler", "component", "kube-scheduler"},
	{"controller", "component", "kube-controller-manager"},
	{"addon-manager", "component", "kube-addon-manager"},
	{"dns", "k8s-app", "kube-dns"},
}

PodsByLayer are queries we run when health checking, sorted roughly by dependency layer

View Source
var SkipAdditionalPreflights = map[string][]string{}

SkipAdditionalPreflights are additional preflights we skip depending on the runtime in use.

View Source
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)

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

func NewKubeletConfig(k8s config.KubernetesConfig, r cruntime.Manager) (string, error)

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

func ParseFeatureArgs(featureGates string) (map[string]bool, string, error)

func ParseKubernetesVersion added in v0.22.3

func ParseKubernetesVersion(version string) (semver.Version, error)

func Supports added in v0.28.1

func Supports(featureName string) bool

Supports indicates whether a feature name is supported on the feature gates for kubeadm

func VersionIsBetween added in v0.22.3

func VersionIsBetween(version, gte, lte semver.Version) bool

Types

type ComponentExtraArgs added in v0.22.3

type ComponentExtraArgs struct {
	Component string
	Options   map[string]string
}

func NewComponentExtraArgs added in v0.22.3

func NewComponentExtraArgs(opts util.ExtraOptionSlice, version semver.Version, featureGates string) ([]ComponentExtraArgs, error)

type KubeadmBootstrapper

type KubeadmBootstrapper struct {
	// contains filtered or unexported fields
}

func NewKubeadmBootstrapper

func NewKubeadmBootstrapper(api libmachine.API) (*KubeadmBootstrapper, error)

func (*KubeadmBootstrapper) DeleteCluster added in v0.34.0

func (k *KubeadmBootstrapper) DeleteCluster(k8s config.KubernetesConfig) error

DeleteCluster removes the components that were started earlier

func (*KubeadmBootstrapper) GetApiServerStatus added in v0.31.0

func (k *KubeadmBootstrapper) GetApiServerStatus(ip net.IP) (string, error)

func (*KubeadmBootstrapper) GetKubeletStatus added in v0.31.0

func (k *KubeadmBootstrapper) GetKubeletStatus() (string, error)

func (*KubeadmBootstrapper) LogCommands added in v0.34.0

LogCommands returns a map of log type to a command which will display that log.

func (*KubeadmBootstrapper) PullImages added in v0.34.0

func (k *KubeadmBootstrapper) PullImages(k8s config.KubernetesConfig) error

PullImages downloads images that will be used by RestartCluster

func (*KubeadmBootstrapper) RestartCluster

func (k *KubeadmBootstrapper) RestartCluster(k8s config.KubernetesConfig) error

RestartCluster restarts the Kubernetes cluster configured by kubeadm

func (*KubeadmBootstrapper) SetupCerts

func (k *KubeadmBootstrapper) SetupCerts(k8s config.KubernetesConfig) error

SetupCerts sets up certificates within the cluster.

func (*KubeadmBootstrapper) StartCluster

func (k *KubeadmBootstrapper) StartCluster(k8s config.KubernetesConfig) error

func (*KubeadmBootstrapper) UpdateCluster

func (k *KubeadmBootstrapper) UpdateCluster(cfg config.KubernetesConfig) error

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.

Jump to

Keyboard shortcuts

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