Documentation
¶
Overview ¶
Package kubeadm contains kubeadm related constants and configuration
Index ¶
Constants ¶
const ConfigTemplateBetaV2 = `` /* 4485-byte string literal not displayed */
ConfigTemplateBetaV2 is the kubeadm config template for API version v1beta2
const ConfigTemplateBetaV3 = `` /* 4573-byte string literal not displayed */
ConfigTemplateBetaV3 is the kubeadm config template for API version v1beta3
const ObjectName = "config"
ObjectName is the name every generated object will have I.E. `metadata:\nname: config`
const Token = "abcdef.0123456789abcdef"
Token defines a dummy, well known token for automating TLS bootstrap process
Variables ¶
This section is empty.
Functions ¶
func Config ¶
func Config(data ConfigData) (config string, err error)
Config returns a kubeadm config generated from config data, in particular the kubernetes version
Types ¶
type ConfigData ¶
type ConfigData struct {
ClusterName string
KubernetesVersion string
// The ControlPlaneEndpoint, that is the address of the external loadbalancer
// if defined or the bootstrap node
ControlPlaneEndpoint string
// The Local API Server port
APIBindPort int
// The API server external listen IP (which we will port forward)
APIServerAddress string
// this should really be used for the --provider-id flag
// ideally cluster config should not depend on the node backend otherwise ...
NodeProvider string
// ControlPlane flag specifies the node belongs to the control plane
ControlPlane bool
// The IP address or comma separated list IP addresses of of the node
NodeAddress string
// The name for the node (not the address)
NodeName string
// The Token for TLS bootstrap
Token string
// KubeProxyMode defines the kube-proxy mode between iptables, ipvs or nftables
KubeProxyMode string
// The subnet used for pods
PodSubnet string
// The subnet used for services
ServiceSubnet string
// Kubernetes FeatureGates
FeatureGates map[string]bool
// Kubernetes API Server RuntimeConfig
RuntimeConfig map[string]string
// IPFamily of the cluster, it can be IPv4, IPv6 or DualStack
IPFamily config.ClusterIPFamily
// Labels are the labels, in the format "key1=val1,key2=val2", with which the respective node will be labeled
NodeLabels string
// RootlessProvider is true if kind is running with rootless mode
RootlessProvider bool
// DisableLocalStorageCapacityIsolation is typically set true based on RootlessProvider
// based on the Kubernetes version, if true kubelet localStorageCapacityIsolation is set false
DisableLocalStorageCapacityIsolation bool
// DerivedConfigData contains fields computed from the other fields for use
// in the config templates and should only be populated by calling Derive()
DerivedConfigData
}
ConfigData is supplied to the kubeadm config template, with values populated by the cluster package
func (*ConfigData) Derive ¶
func (c *ConfigData) Derive()
Derive automatically derives DockerStableTag if not specified
type DerivedConfigData ¶
type DerivedConfigData struct {
// AdvertiseAddress is the first address in NodeAddress
AdvertiseAddress string
// DockerStableTag is automatically derived from KubernetesVersion
DockerStableTag string
// SortedFeatureGates allows us to iterate FeatureGates deterministically
SortedFeatureGates []FeatureGate
// FeatureGatesString is of the form `Foo=true,Baz=false`
FeatureGatesString string
// RuntimeConfigString is of the form `Foo=true,Baz=false`
RuntimeConfigString string
// KubeadmFeatureGates contains Kubeadm only feature gates
KubeadmFeatureGates map[string]bool
// IPv4 values take precedence over IPv6 by default, if true set IPv6 default values
IPv6 bool
// kubelet cgroup driver, based on kubernetes version
CgroupDriver string
}
DerivedConfigData fields are automatically derived by ConfigData.Derive if they are not specified / zero valued