cluster

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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

func ExecuteTemplate(tmplStr string, tmplData interface{}) (bytes.Buffer, error)

func ValidName

func ValidName(name string) bool

Types

type Cluster

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

func New

func New(dir, name string) (*Cluster, error)

func (*Cluster) AdminKubeconfig

func (c *Cluster) AdminKubeconfig() (string, error)

func (*Cluster) AdminKubeconfigPath

func (c *Cluster) AdminKubeconfigPath() string

func (*Cluster) BaseRootfsPath

func (c *Cluster) BaseRootfsPath() string

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) Destroy

func (c *Cluster) Destroy() error

func (*Cluster) ListImages

func (c *Cluster) ListImages() ([]machinectl.Image, error)

func (*Cluster) MachineRootfsPath

func (c *Cluster) MachineRootfsPath() string

func (*Cluster) Machines

func (c *Cluster) Machines() ([]machinectl.Machine, error)

func (*Cluster) MasterMachines

func (c *Cluster) MasterMachines() ([]machinectl.Machine, error)

func (*Cluster) RemoveImages

func (c *Cluster) RemoveImages(timeout time.Duration) error

func (*Cluster) Start

func (c *Cluster) Start(numberNodes int, cniPluginDir string, cniPlugin string) error

func (*Cluster) Stop

func (c *Cluster) Stop() error

func (*Cluster) StopMachines

func (c *Cluster) StopMachines(timeout time.Duration) 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳