cleaning

package
v2.85.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context, projectName string, storageManager *manager.StorageManager, options CleanupOptions) error

func Purge

func Purge(ctx context.Context, projectName string, storageManager *manager.StorageManager, options PurgeOptions) error

Types

type CleanupOptions

type CleanupOptions struct {
	ImageNameList                   []string
	LocalGit                        GitRepo
	KubernetesContextClients        []*kube.ContextClient
	KubernetesNamespacesByContext   map[string][]string
	WithoutKube                     bool // TODO: remove this legacy logic in v3.
	ConfigMetaCleanup               config.MetaCleanup
	KeepStagesBuiltWithinLastNHours *uint64
	DryRun                          bool
	Parallel                        bool
	ParallelTasksLimit              int64
	KeepList                        KeepList
	Report                          *cleanup_report.Report
}

type ContextResources

type ContextResources struct {
	ContextName    string
	ResourcesNames []string
}

type DeployedDockerImage

type DeployedDockerImage struct {
	Name             string
	ContextResources []*ContextResources
}

func AppendContextDeployedDockerImages

func AppendContextDeployedDockerImages(list []*DeployedDockerImage, contextName string, images []*allow_list.DeployedImage) (res []*DeployedDockerImage)

type GitRepo

type GitRepo interface {
	PlainOpen() (*git.Repository, error)
	IsCommitExists(ctx context.Context, commit string) (bool, error)
}

type KeepList added in v2.38.0

type KeepList mapset.Set[string]

func NewKeepList added in v2.38.0

func NewKeepList(val ...string) KeepList

func NewKeepListWithSize added in v2.38.0

func NewKeepListWithSize(n int) KeepList

type PurgeOptions

type PurgeOptions struct {
	RmContainersThatUseWerfImages bool
	DryRun                        bool
	Report                        *cleanup_report.Report
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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