aututils

package
v0.20.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RuleScaleTypeAddDisk is name for add disk scale type
	RuleScaleTypeAddDisk = "add-disk"
	// RuleScaleTypeResizeDisk is name for resize disk scale type
	RuleScaleTypeResizeDisk = "resize-disk"
	// RuleMaxSize is name for rule max size
	RuleMaxSize = "maxsize"
	// PxPoolAvailableCapacityMetric is metric for pool available capacity
	PxPoolAvailableCapacityMetric = "100 * ( px_pool_stats_available_bytes/ px_pool_stats_total_bytes)"
	// PxPoolTotalCapacityMetric is metric for pool total capacity
	PxPoolTotalCapacityMetric = "px_pool_stats_total_bytes/(1024*1024*1024)"
	// PxVolumeUsagePercentMetric is metric for volume usage percentage
	PxVolumeUsagePercentMetric = "100 * (px_volume_usage_bytes / px_volume_capacity_bytes)"
	// PxVolumeTotalCapacityMetric is metric for total volume capacity
	PxVolumeTotalCapacityMetric = "px_volume_capacity_bytes / 1000000000"
	// RuleActionsScalePercentage is name for scale percentage rule action
	RuleActionsScalePercentage = "scalepercentage"
	// RuleActionsScaleSize is name for scale size rule action
	RuleActionsScaleSize = "scalesize"

	// RuleScaleType is name for scale type
	RuleScaleType = "scaletype"
	// VolumeSpecAction is name for volume spec action
	VolumeSpecAction = "openstorage.io.action.volume/resize"
	// StorageSpecAction is name for storage spec action
	StorageSpecAction = "openstorage.io.action.storagepool/expand"
)

Variables

This section is empty.

Functions

func PVCRuleByTotalSize

func PVCRuleByTotalSize(capacity int, scalePercentage int, maxSize string) apapi.AutopilotRule

PVCRuleByTotalSize resizes volume by its total size

func PVCRuleByUsageCapacity

func PVCRuleByUsageCapacity(usagePercentage int, scalePercentage int, maxSize string) apapi.AutopilotRule

PVCRuleByUsageCapacity returns an autopilot pvc expand rule that uses usage of pvc size

func PoolRuleByAvailableCapacity

func PoolRuleByAvailableCapacity(usage, scalePercentage uint64, expandType string) apapi.AutopilotRule

PoolRuleByAvailableCapacity returns an autopilot pool expand rule that uses usage of pool size

func PoolRuleByTotalSize

func PoolRuleByTotalSize(total, scalePercentage uint64, expandType string, labelSelector map[string]string) apapi.AutopilotRule

PoolRuleByTotalSize returns an autopilot pool expand rule that uses total pool size

func PoolRuleFixedScaleSizeByAvailableCapacity

func PoolRuleFixedScaleSizeByAvailableCapacity(usage int, scaleSize, expandType string) apapi.AutopilotRule

PoolRuleFixedScaleSizeByAvailableCapacity returns an autopilot pool expand rule that uses usage of pool size and fixed scale size action

func PoolRuleFixedScaleSizeByTotalSize

func PoolRuleFixedScaleSizeByTotalSize(total int, scaleSize, expandType string, labelSelector map[string]string) apapi.AutopilotRule

PoolRuleFixedScaleSizeByTotalSize returns an autopilot pool expand rule that uses total pool size and fixed scale size action

Types

This section is empty.

Jump to

Keyboard shortcuts

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