kic

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version is the current version of kic
	Version = "v0.0.11"
)

Variables

View Source
var (
	// BaseImage is the base image is used to spin up kic containers. it uses same base-image as kind.
	BaseImage = fmt.Sprintf("gcr.io/k8s-minikube/kicbase:%s@sha256:%s", Version, baseImageSHA)

	// FallbackImages are backup base images in case gcr isn't available
	FallbackImages = []string{

		fmt.Sprintf("kicbase/stable:%s@sha256:%s", Version, baseImageSHA),

		fmt.Sprintf("docker.pkg.github.com/kubernetes/minikube/kicbase:%s", Version),
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	MachineName       string            // maps to the container name being created
	CPU               int               // Number of CPU cores assigned to the container
	Memory            int               // max memory in MB
	StorePath         string            // libmachine store path
	OCIBinary         string            // oci tool to use (docker, podman,...)
	ImageDigest       string            // image name with sha to use for the node
	Mounts            []oci.Mount       // mounts
	APIServerPort     int               // Kubernetes api server port inside the container
	PortMappings      []oci.PortMapping // container port mappings
	Envs              map[string]string // key,value of environment variables passed to the node
	KubernetesVersion string            // Kubernetes version to install
	ContainerRuntime  string            // container runtime kic is running
}

Config is configuration for the kic driver used by registry

type Driver

type Driver struct {
	*drivers.BaseDriver
	*pkgdrivers.CommonDriver
	URL string

	NodeConfig Config
	OCIBinary  string // docker,podman
	// contains filtered or unexported fields
}

Driver represents a kic driver https://minikube.sigs.k8s.io/docs/reference/drivers/docker

func NewDriver

func NewDriver(c Config) *Driver

NewDriver returns a fully configured Kic driver

func (*Driver) Create

func (d *Driver) Create() error

Create a host using the driver's config

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver

func (*Driver) GetExternalIP

func (d *Driver) GetExternalIP() (string, error)

GetExternalIP returns an IP which is accessible from outside

func (*Driver) GetIP

func (d *Driver) GetIP() (string, error)

GetIP returns an IP or hostname that this host is available at

func (*Driver) GetSSHHostname

func (d *Driver) GetSSHHostname() (string, error)

GetSSHHostname returns hostname for use with ssh

func (*Driver) GetSSHKeyPath

func (d *Driver) GetSSHKeyPath() string

GetSSHKeyPath returns the ssh key path

func (*Driver) GetSSHPort

func (d *Driver) GetSSHPort() (int, error)

GetSSHPort returns port for use with ssh

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

GetSSHUsername returns the ssh username

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

GetState returns the state that the host is in (running, stopped, etc)

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

GetURL returns a Docker URL inside this host e.g. tcp://1.2.3.4:2376 more info https://github.com/docker/machine/blob/b170508bf44c3405e079e26d5fdffe35a64c6972/libmachine/provision/utils.go#L159_L175

func (*Driver) Kill

func (d *Driver) Kill() error

Kill stops a host forcefully, including any containers that we are managing.

func (*Driver) Remove

func (d *Driver) Remove() error

Remove will delete the Kic Node Container

func (*Driver) Restart

func (d *Driver) Restart() error

Restart a host

func (*Driver) RunSSHCommandFromDriver

func (d *Driver) RunSSHCommandFromDriver() error

RunSSHCommandFromDriver implements direct ssh control to the driver

func (*Driver) Start

func (d *Driver) Start() error

Start an already created kic container

func (*Driver) Stop

func (d *Driver) Stop() error

Stop a host gracefully, including any containers that we are managing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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