sizingconfig

package
v0.80.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// The nature of the beast in this code is we got a lot of magic strings
	SizeXSmall string = "x-small"
	SizeSmall  string = "small"
	SizeMedium string = "medium"
	SizeLarge  string = "large"
	SizeXLarge string = "x-large"
	// We need to define default sizes because if a ClowdApp doesn't provide
	// volume or ram/cpu capacities we just get an empty string, so we need
	// defaults to plug in there
	DefaultSizeVol    string = SizeXSmall
	DefaultSizeCPURAM string = SizeXSmall
)

Variables

View Source
var CPUSizeToCapacity = map[string]string{
	SizeXSmall: "300m",
	SizeSmall:  "600m",
	SizeMedium: "1200m",
	SizeLarge:  "1800m",

	SizeXLarge: "2400m",
}

Get a map of CPU T-Shirt sizes to capacities

For any given size get the next size up Allows for size to limit mapping without conditionality

View Source
var RAMSizeToCapacity = map[string]string{
	SizeXSmall: "512Mi",
	SizeSmall:  "1Gi",
	SizeMedium: "2Gi",
	SizeLarge:  "3Gi",
	SizeXLarge: "4Gi",
}

Get a map of RAM T-Shirt sizes to capacities

View Source
var SizeIndex = map[string]int{
	SizeXSmall: 0,
	SizeSmall:  1,
	SizeMedium: 2,
	SizeLarge:  3,
	SizeXLarge: 4,
}

This is used for performing size comparisons

View Source
var VolSizeToCapacity = map[string]string{

	SizeXSmall: "1Gi",
	SizeSmall:  "2Gi",
	SizeMedium: "3Gi",
	SizeLarge:  "5Gi",
}

Get a map of volume T-Shirt size to capacities

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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