storage

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirStep

func CreateDirStep(shellImage string, name, destinationPath string) v1beta1.Step

CreateDirStep returns a Step that creates a given directory with a given name.

func GetPvcMount

func GetPvcMount(name string) corev1.VolumeMount

GetPvcMount returns a mounting of the volume with the mount path /pvc.

Types

type ArtifactBucket

type ArtifactBucket struct {
	Name     string
	Location string
	Secrets  []resource.SecretParam

	ShellImage  string
	GsutilImage string
}

ArtifactBucket contains the Storage bucket configuration defined in the Bucket config map. +k8s:deepcopy-gen=true

func (*ArtifactBucket) DeepCopy

func (in *ArtifactBucket) DeepCopy() *ArtifactBucket

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactBucket.

func (*ArtifactBucket) DeepCopyInto

func (in *ArtifactBucket) DeepCopyInto(out *ArtifactBucket)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ArtifactBucket) GetCopyFromStorageToSteps

func (b *ArtifactBucket) GetCopyFromStorageToSteps(name, sourcePath, destinationPath string) []v1beta1.Step

GetCopyFromStorageToSteps returns a container used to download artifacts from temporary storage

func (*ArtifactBucket) GetCopyToStorageFromSteps

func (b *ArtifactBucket) GetCopyToStorageFromSteps(name, sourcePath, destinationPath string) []v1beta1.Step

GetCopyToStorageFromSteps returns a container used to upload artifacts for temporary storage

func (*ArtifactBucket) GetSecretsVolumes

func (b *ArtifactBucket) GetSecretsVolumes() []corev1.Volume

GetSecretsVolumes returns the list of volumes for secrets to be mounted on pod

func (*ArtifactBucket) GetType

func (b *ArtifactBucket) GetType() string

GetType returns the type of the artifact storage

func (*ArtifactBucket) StorageBasePath

func (b *ArtifactBucket) StorageBasePath(pr *v1beta1.PipelineRun) string

StorageBasePath returns the path to be used to store artifacts in a pipelinerun temporary storage

type ArtifactPVC

type ArtifactPVC struct {
	Name                  string
	PersistentVolumeClaim *corev1.PersistentVolumeClaim

	ShellImage string
}

ArtifactPVC represents the pvc created by the pipelinerun for artifacts temporary storage. +k8s:deepcopy-gen=true

func (*ArtifactPVC) DeepCopy

func (in *ArtifactPVC) DeepCopy() *ArtifactPVC

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactPVC.

func (*ArtifactPVC) DeepCopyInto

func (in *ArtifactPVC) DeepCopyInto(out *ArtifactPVC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ArtifactPVC) GetCopyFromStorageToSteps

func (p *ArtifactPVC) GetCopyFromStorageToSteps(name, sourcePath, destinationPath string) []v1beta1.Step

GetCopyFromStorageToSteps returns a container used to download artifacts from temporary storage.

func (*ArtifactPVC) GetCopyToStorageFromSteps

func (p *ArtifactPVC) GetCopyToStorageFromSteps(name, sourcePath, destinationPath string) []v1beta1.Step

GetCopyToStorageFromSteps returns a container used to upload artifacts for temporary storage.

func (*ArtifactPVC) GetSecretsVolumes

func (p *ArtifactPVC) GetSecretsVolumes() []corev1.Volume

GetSecretsVolumes returns the list of volumes for secrets to be mounted on pod.

func (*ArtifactPVC) GetType

func (p *ArtifactPVC) GetType() string

GetType returns the type of the artifact storage.

func (*ArtifactPVC) StorageBasePath

func (p *ArtifactPVC) StorageBasePath(pr *v1beta1.PipelineRun) string

StorageBasePath returns the path to be used to store artifacts in a pipelinerun temporary storage.

type GCSResource

type GCSResource struct {
	Name     string                                `json:"name"`
	Type     resourcev1alpha1.PipelineResourceType `json:"type"`
	Location string                                `json:"location"`
	TypeDir  bool                                  `json:"typeDir"`
	//Secret holds a struct to indicate a field name and corresponding secret name to populate it
	Secrets []resourcev1alpha1.SecretParam `json:"secrets"`

	ShellImage  string `json:"-"`
	GsutilImage string `json:"-"`
}

GCSResource is a GCS endpoint from which to get artifacts which is required by a Build/Task for context (e.g. a archive from which to build an image).

func NewGCSResource

func NewGCSResource(name string, images pipeline.Images, r *resourcev1alpha1.PipelineResource) (*GCSResource, error)

NewGCSResource creates a new GCS resource to pass to a Task

func (*GCSResource) GetInputTaskModifier

func (s *GCSResource) GetInputTaskModifier(ts *v1beta1.TaskSpec, path string) (v1beta1.TaskModifier, error)

GetInputTaskModifier returns the TaskModifier to be used when this resource is an input.

func (GCSResource) GetName

func (s GCSResource) GetName() string

GetName returns the name of the resource

func (*GCSResource) GetOutputTaskModifier

func (s *GCSResource) GetOutputTaskModifier(ts *v1beta1.TaskSpec, path string) (v1beta1.TaskModifier, error)

GetOutputTaskModifier returns the TaskModifier to be used when this resource is an output.

func (*GCSResource) GetSecretParams

func (s *GCSResource) GetSecretParams() []resourcev1alpha1.SecretParam

GetSecretParams returns the resource secret params

func (GCSResource) GetType

GetType returns the type of the resource, in this case "storage"

func (*GCSResource) Replacements

func (s *GCSResource) Replacements() map[string]string

Replacements is used for template replacement on an GCSResource inside of a Taskrun.

type PipelineStorageResourceInterface

type PipelineStorageResourceInterface interface {
	v1beta1.PipelineResourceInterface
	GetSecretParams() []resource.SecretParam
}

PipelineStorageResourceInterface adds a function to the PipelineResourceInterface for retrieving secrets that are usually needed for storage PipelineResources.

func NewResource

NewResource returns an instance of the requested storage subtype, which can be used to add input and output steps and volumes to an executing pod.

Jump to

Keyboard shortcuts

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