kube

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kube implements functionality to build Kubernetes for the purposes of installing into the kind node image

Index

Constants

View Source
const ImportPath = "k8s.io/kubernetes"

ImportPath is the canonical import path for the kubernetes root package this is used by FindSource

Variables

This section is empty.

Functions

func FindSource

func FindSource() (root string, err error)

FindSource attempts to locate a kubernetes checkout using go's build package

Types

type Bits

type Bits interface {
	// BinaryPaths returns a list of paths to binaries on the host machine that
	// should be added to PATH in the Node image
	BinaryPaths() []string
	// ImagePaths returns a list of paths to image archives to be loaded into
	// the Node
	ImagePaths() []string
	// Version
	Version() string
}

Bits provides the locations of Kubernetes Binaries / Images needed on the cluster nodes Implementations should be registered with RegisterNamedBits

type Builder added in v0.9.0

type Builder interface {
	// Build returns a Bits and any errors encountered while building Kubernetes.
	// Some implementations (upstream binaries) may use this step to obtain
	// an existing build instead
	Build() (Bits, error)
}

Builder represents and implementation of building Kubernetes building may constitute downloading a release

func NewBazelBuilder added in v0.9.0

func NewBazelBuilder(logger log.Logger, kubeRoot, arch string) (Builder, error)

NewBazelBuilder returns a new Builder backed by bazel build, given kubeRoot, the path to the kubernetes source directory

func NewDockerBuilder added in v0.9.0

func NewDockerBuilder(logger log.Logger, kubeRoot, arch string) (Builder, error)

NewDockerBuilder returns a new Bits backed by the docker-ized build, given kubeRoot, the path to the kubernetes source directory

func NewNamedBuilder added in v0.9.0

func NewNamedBuilder(logger log.Logger, name, kubeRoot, arch string) (Builder, error)

NewNamedBuilder returns a new Builder by named implementation currently this includes: "bazel" -> NewBazelBuilder(kubeRoot) "docker" or "make" -> NewDockerBuilder(kubeRoot)

Jump to

Keyboard shortcuts

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