Documentation
¶
Index ¶
- Constants
- func ExecuteTemplate(tmplStr string, tmplData interface{}) (bytes.Buffer, error)
- func ValidName(name string) bool
- type Cluster
- func (c *Cluster) AdminKubeconfig() (string, error)
- func (c *Cluster) AdminKubeconfigPath() string
- func (c *Cluster) BaseRootfsPath() string
- func (c *Cluster) Create(clusterSettings *ClusterSettings, clusterCache *cache.Cache) error
- func (c *Cluster) Destroy() error
- func (c *Cluster) ListImages() ([]machinectl.Image, error)
- func (c *Cluster) MachineRootfsPath() string
- func (c *Cluster) Machines() ([]machinectl.Machine, error)
- func (c *Cluster) MasterMachines() ([]machinectl.Machine, error)
- func (c *Cluster) RemoveImages(timeout time.Duration) error
- func (c *Cluster) Start(numberNodes int, cniPluginDir string, cniPlugin string) error
- func (c *Cluster) Stop() error
- func (c *Cluster) StopMachines(timeout time.Duration) error
- func (c *Cluster) WorkerMachines() ([]machinectl.Machine, error)
- type ClusterSettings
Constants ¶
View Source
const DockerDaemonConfig = `` /* 199-byte string literal not displayed */
View Source
const DockerSystemdDropin = `[Service]
Environment="DOCKER_OPTS=--exec-opt native.cgroupdriver=cgroupfs"
`
View Source
const KubeSpawnRuncWrapperScript = `` /* 555-byte string literal not displayed */
View Source
const KubeadmConfigTmpl = `` /* 452-byte string literal not displayed */
View Source
const KubeletSystemdDropinTmpl = `` /* 448-byte string literal not displayed */
--enforce-node-allocatable= and --eviction-hard= are set to make the kubelet *not* evicting pods from the system, even when memory or disk space is low. Otherwise `kube-spawn start` could fail because the k8s containers started by kubeadm get evicted immediately.
View Source
const KubespawnBootstrapScriptTmpl = `` /* 693-byte string literal not displayed */
View Source
const RktletSystemdUnitTmpl = `` /* 310-byte string literal not displayed */
View Source
const WeaveSystemdNetworkdConfig = `[Match]
Name=weave datapath vethwe*
[Link]
Unmanaged=yes
`
https://github.com/kinvolk/kube-spawn/issues/99 https://github.com/weaveworks/weave/issues/2601
Variables ¶
This section is empty.
Functions ¶
func ExecuteTemplate ¶
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func (*Cluster) AdminKubeconfig ¶
func (*Cluster) AdminKubeconfigPath ¶
func (*Cluster) BaseRootfsPath ¶
func (*Cluster) Create ¶
func (c *Cluster) Create(clusterSettings *ClusterSettings, clusterCache *cache.Cache) error
Create creates a new kube-spawn cluster environment. It does..
- Validate the cluster settings
- Download the required files into the cache
- Generate the shared, readonly rootfs directory structure (later mounted via overlayfs)
- Copy the required files from the source directories and cache to the target locations
func (*Cluster) ListImages ¶
func (c *Cluster) ListImages() ([]machinectl.Image, error)
func (*Cluster) MachineRootfsPath ¶
func (*Cluster) MasterMachines ¶
func (c *Cluster) MasterMachines() ([]machinectl.Machine, error)
func (*Cluster) WorkerMachines ¶
func (c *Cluster) WorkerMachines() ([]machinectl.Machine, error)
type ClusterSettings ¶
type ClusterSettings struct { CNIPluginDir string CNIPlugin string ContainerRuntime string ClusterCIDR string PodNetworkCIDR string HyperkubeImage string KubeadmResetOptions string KubernetesSourceDir string KubernetesVersion string RuntimeEndpoint string RktBinaryPath string RktStage1ImagePath string RktletBinaryPath string UseLegacyCgroupDriver bool }
Click to show internal directories.
Click to hide internal directories.