resources

package
v0.0.0-...-5a3499f Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MountName is the name of the pvc being mounted (which
	// will contain the entrypoint binary and eventually the logs)
	MountName = "tools"

	EntrypointImage = "gcr.io/k8s-prow/entrypoint@sha256:7c7cd8906ce4982ffee326218e9fc75da2d4896d53cabc9833b9cc8d2d6b2b8f"
)

Variables

This section is empty.

Functions

func AddEntrypoint

func AddEntrypoint(steps []corev1.Container) error

AddEntrypoint will modify each of the steps/containers such that the binary being run is no longer the one specified by the Command and the Args, but is instead the entrypoint binary, which will itself invoke the Command and Args, but also capture logs. TODO: This will not work when a step uses an image that has its own entrypoint, i.e. `Command` is a required field. In later iterations we can update the controller to inspect the image's `Entrypoint` and use that if required.

func AddInputResource

func AddInputResource(
	build *buildv1alpha1.Build,
	task *v1alpha1.Task,
	taskRun *v1alpha1.TaskRun,
	pipelineResourceLister listers.PipelineResourceLister,
	logger *zap.SugaredLogger,
) (*buildv1alpha1.Build, error)

AddInputResource will update the input build with the input resource from the task

func ApplyParameters

func ApplyParameters(b *buildv1alpha1.Build, tr *v1alpha1.TaskRun) *buildv1alpha1.Build

ApplyParameters applies the params from a TaskRun.Input.Parameters to a BuildSpec.

func ApplyResources

func ApplyResources(b *buildv1alpha1.Build, tr *v1alpha1.TaskRun, getter ResourceGetter) (*buildv1alpha1.Build, error)

ApplyResources applies the params from a TaskRun.Input.Resources to a BuildSpec.

func GetCopyStep

func GetCopyStep() corev1.Container

GetCopyStep will return a Build Step (Container) that will copy the entrypoint binary from the entrypoint image into the volume mounted at mountPoint, so that it can be mounted by subsequent steps and used to capture logs.

Types

type ResourceGetter

type ResourceGetter interface {
	Get(string) (*v1alpha1.PipelineResource, error)
}

Jump to

Keyboard shortcuts

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