bsutil

package
v1.7.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package bsutil package will eventually be renamed to kubeadm package after getting rid of older one

Package bsutil will eventually be renamed to kubeadm package after getting rid of older one

Package bsutil will eventually be renamed to kubeadm package after getting rid of older one

Package bsutil will eventually be renamed to kubeadm package after getting rid of older one

Package bsutil will eventually be renamed to kubeadm package after getting rid of older one

Package bsutil will eventually be renamed to kubeadm package after getting rid of older one

Package bsutil will eventually be renamed to kubeadm package after getting rid of older one

Index

Constants

View Source
const (
	KubeadmCmdParam    = iota
	KubeadmConfigParam = iota
)
View Source
const (
	DefaultCNIConfigPath = "/etc/cni/net.d/k8s.conf"
	KubeletServiceFile   = "/lib/systemd/system/kubelet.service"
	// enum to differentiate kubeadm command line parameters from kubeadm config file parameters (see the
	// KubeadmExtraArgsWhitelist variable for more info)
	KubeletSystemdConfFile = "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf"
)
View Source
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

View Source
var KubeadmExtraArgsWhitelist = map[int][]string{
	KubeadmCmdParam: {
		"ignore-preflight-errors",
		"dry-run",
		"kubeconfig",
		"kubeconfig-dir",
		"node-name",
		"cri-socket",
		"experimental-upload-certs",
		"certificate-key",
		"rootfs",
	},
	KubeadmConfigParam: {
		"pod-network-cidr",
	},
}

KubeadmExtraArgsWhitelist is a whitelist of supported kubeadm params that can be supplied to kubeadm through minikube's ExtraArgs parameter. The list is split into two parts - params that can be supplied as flags on the command line and params that have to be inserted into the kubeadm config file. This is because of a kubeadm constraint which allows only certain params to be provided from the command line when the --config parameter is specified

View Source
var KubeadmYamlPath = path.Join(vmpath.GuestEphemeralDir, "kubeadm.yaml")

KubeadmYamlPath is the path to the kubeadm configuration

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

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

Functions

func AddAddons

func AddAddons(files *[]assets.CopyableFile, data interface{}) error

AddAddons adds addons to list of files

func AdjustResourceLimits

func AdjustResourceLimits(c command.Runner) error

AdjustResourceLimits makes fine adjustments to pod resources that aren't possible via kubeadm config.

func ConfigFileAssets

func ConfigFileAssets(cfg config.KubernetesConfig, kubeadm []byte, kubelet []byte, kubeletSvc []byte, defaultCNIConfig []byte) []assets.CopyableFile

ConfigFileAssets returns configuration file assets

func CreateFlagsFromExtraArgs

func CreateFlagsFromExtraArgs(extraOptions config.ExtraOptionSlice) string

CreateFlagsFromExtraArgs converts kubeadm extra args into flags to be supplied from the command linne

func ElevateKubeSystemPrivileges

func ElevateKubeSystemPrivileges(client kubernetes.Interface) error

ElevateKubeSystemPrivileges gives the kube-system service account cluster admin privileges to work with RBAC.

func EtcdDataDir

func EtcdDataDir() string

EtcdDataDir is where etcd data is stored.

func ExistingConfig

func ExistingConfig(c command.Runner) error

ExistingConfig checks if there are config files from possible previous kubernets cluster

func GenerateKubeadmYAML

func GenerateKubeadmYAML(k8s config.KubernetesConfig, r cruntime.Manager) ([]byte, error)

GenerateKubeadmYAML generates the kubeadm.yaml file

func InvokeKubeadm

func InvokeKubeadm(version string) string

InvokeKubeadm returns the invocation command for Kubeadm

func NewKubeletConfig

func NewKubeletConfig(k8s config.KubernetesConfig, r cruntime.Manager) ([]byte, error)

NewKubeletConfig generates a new systemd unit containing a configured kubelet based on the options present in the KubernetesConfig.

func NewKubeletService

func NewKubeletService(cfg config.KubernetesConfig) ([]byte, error)

NewKubeletService returns a generated systemd unit file for the kubelet

func ParseKubernetesVersion

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

ParseKubernetesVersion parses the kubernetes version

func TransferBinaries

func TransferBinaries(cfg config.KubernetesConfig, c command.Runner) error

TransferBinaries transfers all required Kubernetes binaries

Types

This section is empty.

Directories

Path Synopsis
Package kverify verifies a running kubernetes cluster is healthy
Package kverify verifies a running kubernetes cluster is healthy

Jump to

Keyboard shortcuts

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