node

package
v1.7.0-beta.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Docker default bridge network is named "bridge" (https://docs.docker.com/network/bridge/#use-the-default-bridge-network)
	DefaultNetwork  = "bridge"
	ClusterLabelKey = "io.x-k8s.kic.cluster" // ClusterLabelKey is applied to each node docker container for identification
	NodeRoleKey     = "io.k8s.sigs.kic.role"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateConfig

type CreateConfig struct {
	Name          string            // used for container name and hostname
	Image         string            // container image to use to create the node.
	ClusterLabel  string            // label the containers we create using minikube so we can clean up
	Role          string            // currently only role supported is control-plane
	Mounts        []oci.Mount       // volume mounts
	APIServerPort int               // kubernetes api server port
	PortMappings  []oci.PortMapping // ports to map to container from host
	CPUs          string            // number of cpu cores assign to container
	Memory        string            // memory (mbs) to assign to the container
	Envs          map[string]string // environment variables to pass to the container
	ExtraArgs     []string          // a list of any extra option to pass to oci binary during creation time, for example --expose 8080...
	OCIBinary     string            // docker or podman
}

type Node

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

Node represents a handle to a kic node This struct must be created by one of: CreateControlPlane

func CreateNode

func CreateNode(p CreateConfig) (*Node, error)

CreateNode creates a new container node

func Find

func Find(ociBinary string, name string, cmder command.Runner) (*Node, error)

Find finds a node

func (*Node) Copy

func (n *Node) Copy(ociBinary string, asset assets.CopyableFile) error

Copy copies a local asset into the node

func (*Node) IP

func (n *Node) IP() (ipv4 string, ipv6 string, err error)

IP returns the IP address of the node

func (*Node) Remove

func (n *Node) Remove() error

Remove removes the node

func (*Node) WriteFile

func (n *Node) WriteFile(dest, content string, perm string) error

WriteFile writes content to dest on the node

Jump to

Keyboard shortcuts

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