Documentation
¶
Overview ¶
Package extract implements support for extracting required K8s binaries and required K8s images from GCS buckets containing release or ci builds artifacts.
Additionally, it is also possible to manage local repositories of the aforementioned artifacts or repository hosted on http/https web servers.
Index ¶
- Variables
- func ResolveLabel(src string) (version string, err error)
- type Extractor
- type Option
- func OnlyKubeadm(onlyKubeadm bool) Option
- func OnlyKubelet(onlyKubelet bool) Option
- func OnlyKubernetesBinaries(onlyBinaries bool) Option
- func OnlyKubernetesImages(onlyImages bool) Option
- func WithNameOverride(newName string) Option
- func WithNamePrefix(namePrefix string) Option
- func WithVersionFile(enable bool) Option
- func WithVersionFolder(versionFolder bool) Option
- type SourceType
Constants ¶
This section is empty.
Variables ¶
var ( // AllKubernetesImages defines of image tarballs included in a K8s release AllKubernetesImages = []string{"kube-apiserver.tar", "kube-controller-manager.tar", "kube-scheduler.tar", "kube-proxy.tar"} // AllImagesPattern defines a pattern for searching all the images in a folder AllImagesPattern = []string{"*.tar"} )
Functions ¶
func ResolveLabel ¶
ResolveLabel provide a utility func for resolving a label
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor defines attributes for a Kubernetes artifact extractor
func NewExtractor ¶
NewExtractor returns a new extractor configured with the given options
type Option ¶
type Option func(*Extractor)
Option is an Extractor configuration option supplied to NewExtractor
func OnlyKubeadm ¶
OnlyKubeadm option instructs the Extractor for retrieving kubeadm only
func OnlyKubelet ¶
OnlyKubelet option instructs the Extractor for retrieving kubelet only
func OnlyKubernetesBinaries ¶
OnlyKubernetesBinaries option instructs the Extractor for retrieving Kubernetes binaries only
func OnlyKubernetesImages ¶
OnlyKubernetesImages option instructs the Extractor for retrieving Kubernetes images tarballs only
func WithNameOverride ¶
WithNameOverride option instructs the Extractor to rename the bit
func WithNamePrefix ¶
WithNamePrefix option instructs the Extractor to adds a prefix to the name of each file before saving to destination
func WithVersionFile ¶
WithVersionFile option instructs the Extractor whether to add version file
func WithVersionFolder ¶
WithVersionFolder option instructs the Extractor to save all files in a folder named like the kubernetes version
type SourceType ¶
type SourceType int
SourceType defines src types
const ( // ReleaseLabelOrVersionSource describe a src that is hosted in releaseBuildURepository ReleaseLabelOrVersionSource SourceType = iota + 1 // CILabelOrVersionSource describe a src that is hosted in ciBuildRepository CILabelOrVersionSource // RemoteRepositorySource describe a src that is hosted in a remote http/https repository RemoteRepositorySource // LocalRepositorySource describe a src that is hosted in local repository LocalRepositorySource )
func GetSourceType ¶
func GetSourceType(src string) SourceType
GetSourceType returns the src type descriptor