sizingconfig

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 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
	XSMALL string = "x-small"
	SMALL  string = "small"
	MEDIUM string = "medium"
	LARGE  string = "large"
	XLARGE 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
	DEFAULT_SIZE_VOL     string = XSMALL
	DEFAULT_SIZE_CPU_RAM string = SMALL
)

Variables

View Source
var CPUSizeToCapacity = map[string]string{
	SMALL:  "600m",
	MEDIUM: "1200m",
	LARGE:  "1800m",

	XLARGE: "2400m",
}

Get a map of CPU T-Shirt sizes to capacities

View Source
var LimitSizeToRequestSize = map[string]string{
	XSMALL: SMALL,
	SMALL:  MEDIUM,
	MEDIUM: LARGE,
	LARGE:  XLARGE,
}

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

View Source
var RAMSizeToCapacity = map[string]string{
	SMALL:  "512Mi",
	MEDIUM: "1Gi",
	LARGE:  "2Gi",
	XLARGE: "3Gi",
}

Get a map of RAM T-Shirt sizes to capacities

View Source
var SizeIndex = map[string]int{
	XSMALL: 0,
	SMALL:  1,
	MEDIUM: 2,
	LARGE:  3,
	XLARGE: 4,
}

This is used for performing size comparisons

View Source
var VolSizeToCapacity = map[string]string{

	XSMALL: "1Gi",
	SMALL:  "2Gi",
	MEDIUM: "3Gi",
	LARGE:  "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