sources

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildContextSource

type BuildContextSource interface {
	Setup(ctx context.Context, out io.Writer, artifact *latest.Artifact, initialTag string, dependencies []string) (string, error)
	Pod(args []string) *v1.Pod
	ModifyPod(ctx context.Context, p *v1.Pod) error
	Cleanup(ctx context.Context) error
}

BuildContextSource is the generic type for the different build context sources the kaniko builder can use

func Retrieve

func Retrieve(clusterDetails *latest.ClusterDetails, artifact *latest.KanikoArtifact) BuildContextSource

Retrieve returns the correct build context based on the config

type GCSBucket

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

func (*GCSBucket) Cleanup

func (g *GCSBucket) Cleanup(ctx context.Context) error

Cleanup deletes the tarball from the GCS bucket

func (*GCSBucket) ModifyPod

func (g *GCSBucket) ModifyPod(ctx context.Context, p *v1.Pod) error

ModifyPod does nothing here, since we just need to let kaniko run to completion

func (*GCSBucket) Pod

func (g *GCSBucket) Pod(args []string) *v1.Pod

Pod returns the pod template for this builder

func (*GCSBucket) Setup

func (g *GCSBucket) Setup(ctx context.Context, out io.Writer, artifact *latest.Artifact, initialTag string, dependencies []string) (string, error)

Setup uploads the context to the provided GCS bucket

type LocalDir

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

LocalDir refers to kaniko using a local directory as a buildcontext skaffold copies the buildcontext into the local directory via kubectl cp

func (*LocalDir) Cleanup

func (g *LocalDir) Cleanup(ctx context.Context) error

Cleanup deletes the buildcontext tarball stored on the local filesystem

func (*LocalDir) ModifyPod

func (g *LocalDir) ModifyPod(ctx context.Context, p *v1.Pod) error

ModifyPod first copies over the buildcontext tarball into the init container tmp dir via kubectl cp Via kubectl exec, we extract the tarball to the empty dir Then, via kubectl exec, create the /tmp/complete file via kubectl exec to complete the init container

func (*LocalDir) Pod

func (g *LocalDir) Pod(args []string) *v1.Pod

Pod returns the pod template to ModifyPod

func (*LocalDir) Setup

func (g *LocalDir) Setup(ctx context.Context, out io.Writer, artifact *latest.Artifact, initialTag string, dependencies []string) (string, error)

Setup for LocalDir creates a tarball of the buildcontext and stores it in /tmp

Jump to

Keyboard shortcuts

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