Documentation ¶
Overview ¶
Package kube implements functionality to build Kubernetes for the purposes of installing into the kind node image
Index ¶
Constants ¶
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 ¶
FindSource attempts to locate a kubernetes checkout using go's build package
func NamedBitsRegistered ¶
NamedBitsRegistered returns true if name is in the registry backing NewNamedBits
Types ¶
type AptBits ¶
type AptBits struct { }
AptBits implements Bits for the official upstream debian packages
func (*AptBits) Install ¶
func (b *AptBits) Install(install InstallContext) error
Install implements Bits.Install
type BazelBuildBits ¶
type BazelBuildBits struct {
// contains filtered or unexported fields
}
BazelBuildBits implements Bits for a local Bazel build
func (*BazelBuildBits) Install ¶
func (b *BazelBuildBits) Install(install InstallContext) error
Install implements Bits.Install
func (*BazelBuildBits) Paths ¶
func (b *BazelBuildBits) Paths() map[string]string
Paths implements Bits.Paths
type Bits ¶
type Bits interface { // Build returns any errors encountered while building it Kubernetes. // Some implementations (upstream binaries) may use this step to obtain // an existing build isntead Build() error // Paths returns a map of path on host machine to desired path in the image // These paths will be populated in the image relative to some base path, // obtainable by NodeInstall.BasePath() // Note: if Images are populated to images/, the cluster provisioning // will load these prior to calling kubeadm Paths() map[string]string // Install should install the built sources on the node, assuming paths // have been populated Install(InstallContext) error }
Bits provides the locations of Kubernetes Binaries / Images needed on the cluster nodes Implementations should be registered with RegisterNamedBits
func NewAptBits ¶
NewAptBits returns a new Bits backed by the upstream debian packages
func NewBazelBuildBits ¶
NewBazelBuildBits returns a new Bits backed by bazel build, given kubeRoot, the path to the kubernetes source directory
func NewDockerBuildBits ¶
NewDockerBuildBits returns a new Bits backed by the docker-ized build, given kubeRoot, the path to the kubernetes source directory
type DockerBuildBits ¶
type DockerBuildBits struct {
// contains filtered or unexported fields
}
DockerBuildBits implements Bits for a local docker-ized make / bash build
func (*DockerBuildBits) Install ¶
func (b *DockerBuildBits) Install(install InstallContext) error
Install implements Bits.Install
func (*DockerBuildBits) Paths ¶
func (b *DockerBuildBits) Paths() map[string]string
Paths implements Bits.Paths
type InstallContext ¶
type InstallContext interface { // Returns the base path Paths() were populated relative to BasePath() string // Run execs (cmd, ...args) in the build container and returns error Run(string, ...string) error // CombinedOutputLines is like Run but returns the output lines CombinedOutputLines(string, ...string) ([]string, error) }
InstallContext should be implemented by users of Bits to allow installing the bits in a Docker image