cleanup

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cleanup for clean pvc mount for taskrun

Index

Constants

View Source
const (
	// PVCFinalizersForPod Finalizers in pvc about pod
	PVCFinalizersForPod = "kubernetes.io/pvc-protection"
	// ConditionCleanup is triggered when doing GC
	ConditionCleanup = "Cleanup"
)

Variables

This section is empty.

Functions

func CleanTaskRunsPVC

func CleanTaskRunsPVC(ctx context.Context,
	taskLables client.MatchingLabels,
	shouldSkip ShouldSkipCleanup,
) (succeeded []types.NamespacedName, fails map[string]error, err error)

CleanTaskRunsPVC clean taskrun workspace pvc that dynamic create Params: taskLabels for filt taskrun with label, maybe is empty shouldSkip for skip clean Results: succeeded, fails indicate clean pvc successful and failed list

func IsVolumeShouldSkip

func IsVolumeShouldSkip(workspaces []tekton.WorkspaceBinding, v tekton.WorkspaceBinding) bool

IsVolumeShouldSkip indicates if the pvc is nil or created by manual should skip clean

Types

type ShouldSkipCleanup

type ShouldSkipCleanup func(ctx context.Context, workspace tekton.WorkspaceBinding) bool

Jump to

Keyboard shortcuts

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