host_cleaning

package
v3.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultAllowedBackendStorageVolumeUsagePercentage       uint64 = 70
	DefaultAllowedBackendStorageVolumeUsageMarginPercentage uint64 = 5
	DefaultAllowedLocalCacheVolumeUsagePercentage           uint64 = 70
	DefaultAllowedLocalCacheVolumeUsageMarginPercentage     uint64 = 5
)

Variables

View Source
var ErrUnsupportedContainerBackend = errors.New("unsupported container backend")

Functions

func PopAutoCleanupNotice

func PopAutoCleanupNotice(_ context.Context, werfServiceDir string) (string, bool, error)

PopAutoCleanupNotice returns a message about the last auto host cleanup run and whether it requires the user's attention, then forgets the run, so the user is notified about it only once. An empty message means there is nothing to notify about.

Types

type AutoHostCleanupOptions

type AutoHostCleanupOptions struct {
	HostCleanupOptions

	TmpDir      *string
	HomeDir     *string
	ProjectName *string
}

type CommonOptions

type CommonOptions struct {
	RmForce                       bool
	RmiForce                      bool
	SkipUsedImages                bool
	RmContainersThatUseWerfImages bool
	DryRun                        bool
}

type HostCleanupOptions

type HostCleanupOptions struct {
	BackendStoragePath                     *string
	AllowedBackendStorageVolumeUsage       *units.UnitValue
	AllowedBackendStorageVolumeUsageMargin *units.UnitValue
	AllowedLocalCacheVolumeUsage           *units.UnitValue
	AllowedLocalCacheVolumeUsageMargin     *units.UnitValue

	DryRun bool
	Force  bool
}

type HostPurgeOptions

type HostPurgeOptions struct {
	DryRun                        bool
	RmContainersThatUseWerfImages bool
}

type LocalBackendCleaner

type LocalBackendCleaner struct {
	// contains filtered or unexported fields
}

func (*LocalBackendCleaner) BackendName

func (cleaner *LocalBackendCleaner) BackendName() string

func (*LocalBackendCleaner) RunGC

func (cleaner *LocalBackendCleaner) RunGC(ctx context.Context, options RunGCOptions) (RunGCReport, error)

func (*LocalBackendCleaner) ShouldRunAutoGC

func (cleaner *LocalBackendCleaner) ShouldRunAutoGC(ctx context.Context, options RunAutoGCOptions) (bool, error)

type RunAutoGCOptions

type RunAutoGCOptions struct {
	AllowedStorageVolumeUsageBytes uint64
	StoragePath                    string
}

type RunGCOptions

type RunGCOptions struct {
	AllowedStorageVolumeUsageBytes       uint64
	AllowedStorageVolumeUsageMarginBytes uint64
	StoragePath                          string
	Force                                bool
	DryRun                               bool
}

type RunGCReport

type RunGCReport struct {
	// ImagesDeleted counts the werf images removed by their IDs. Images removed by backend pruning
	// are not counted: backends report deleted layers and untagged references there, not images.
	ImagesDeleted  int
	SpaceReclaimed uint64
	UsedBytes      uint64
	TotalBytes     uint64
	AllowedBytes   uint64
	StoragePath    string
}

RunGCReport describes what the backend storage GC did and the storage state it left behind.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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