volumeclaim

package
v0.0.0-...-b563e91 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ReasonCouldntCreateWorkspacePVC indicates that a Pipeline expects a workspace from a
	// volumeClaimTemplate but couldn't create a claim.
	ReasonCouldntCreateWorkspacePVC = "CouldntCreateWorkspacePVC"
)

Variables

This section is empty.

Functions

func GetPersistentVolumeClaimName

func GetPersistentVolumeClaimName(claim *corev1.PersistentVolumeClaim, wb v1beta1.WorkspaceBinding, owner metav1.OwnerReference) string

GetPersistentVolumeClaimName gets the name of PersistentVolumeClaim for a Workspace and PipelineRun or TaskRun. claim must be a PersistentVolumeClaim from a volumeClaimTemplate. The returned name must be consistent given the same workspaceBinding name and ownerReference UID - because it is first used for creating a PVC and later, possibly several TaskRuns to lookup the PVC to mount. We use ownerReference UID over ownerReference name to distinguish runs with the same name.

Types

type PvcHandler

type PvcHandler interface {
	CreatePersistentVolumeClaimsForWorkspaces(ctx context.Context, wb []v1beta1.WorkspaceBinding, ownerReference metav1.OwnerReference, namespace string) error
}

func NewPVCHandler

func NewPVCHandler(clientset clientset.Interface, logger *zap.SugaredLogger) PvcHandler

Jump to

Keyboard shortcuts

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