host_cleaning

package
v1.2.278 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultAllowedDockerStorageVolumeUsagePercentage       float64 = 70.0
	DefaultAllowedDockerStorageVolumeUsageMarginPercentage float64 = 5.0
	DefaultAllowedLocalCacheVolumeUsagePercentage          float64 = 70.0
	DefaultAllowedLocalCacheVolumeUsageMarginPercentage    float64 = 5.0
)
View Source
const (
	MinImagesToDelete = 10
)

Variables

This section is empty.

Functions

func GetLocalDockerServerStoragePath added in v1.2.10

func GetLocalDockerServerStoragePath(ctx context.Context) (string, error)

func HostPurge

func HostPurge(ctx context.Context, containerBackend container_backend.ContainerBackend, options HostPurgeOptions) error

func RunAutoHostCleanup added in v1.2.11

func RunAutoHostCleanup(ctx context.Context, options AutoHostCleanupOptions) error

func RunGCForLocalDockerServer added in v1.2.10

func RunGCForLocalDockerServer(ctx context.Context, allowedVolumeUsagePercentage, allowedVolumeUsageMarginPercentage float64, dockerServerStoragePath string, force, dryRun bool) error

func RunHostCleanup added in v1.2.11

func RunHostCleanup(ctx context.Context, containerBackend container_backend.ContainerBackend, options HostCleanupOptions) error

func ShouldRunAutoGCForLocalDockerServer added in v1.2.11

func ShouldRunAutoGCForLocalDockerServer(ctx context.Context, allowedVolumeUsagePercentage float64, dockerServerStoragePath string) (bool, error)

func ShouldRunAutoHostCleanup added in v1.2.11

func ShouldRunAutoHostCleanup(ctx context.Context, options HostCleanupOptions) (bool, error)

Types

type AutoHostCleanupOptions added in v1.2.58

type AutoHostCleanupOptions struct {
	HostCleanupOptions

	ForceShouldRun bool
}

type CommonOptions

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

type HostCleanupOptions

type HostCleanupOptions struct {
	AllowedDockerStorageVolumeUsagePercentage       *uint
	AllowedDockerStorageVolumeUsageMarginPercentage *uint
	AllowedLocalCacheVolumeUsagePercentage          *uint
	AllowedLocalCacheVolumeUsageMarginPercentage    *uint
	DockerServerStoragePath                         *string

	CleanupDockerServer bool
	DryRun              bool
	Force               bool
}

type HostPurgeOptions

type HostPurgeOptions struct {
	DryRun                        bool
	RmContainersThatUseWerfImages bool
}

type ImagesLruSort added in v1.2.10

type ImagesLruSort []*LocalImageDesc

func (ImagesLruSort) Len added in v1.2.10

func (a ImagesLruSort) Len() int

func (ImagesLruSort) Less added in v1.2.10

func (a ImagesLruSort) Less(i, j int) bool

func (ImagesLruSort) Swap added in v1.2.10

func (a ImagesLruSort) Swap(i, j int)

type LocalDockerServerStorageCheckResult added in v1.2.11

type LocalDockerServerStorageCheckResult struct {
	VolumeUsage      volumeutils.VolumeUsage
	TotalImagesBytes uint64
	ImagesDescs      []*LocalImageDesc
}

func GetLocalDockerServerStorageCheck added in v1.2.11

func GetLocalDockerServerStorageCheck(ctx context.Context, dockerServerStoragePath string) (*LocalDockerServerStorageCheckResult, error)

func (*LocalDockerServerStorageCheckResult) GetBytesToFree added in v1.2.11

func (checkResult *LocalDockerServerStorageCheckResult) GetBytesToFree(targetVolumeUsage float64) uint64

type LocalImageDesc added in v1.2.10

type LocalImageDesc struct {
	ImageSummary types.ImageSummary
	LastUsedAt   time.Time
}

Jump to

Keyboard shortcuts

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