utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NvidiaEnabledSKUs /* If a new GPU sku becomes available, add a key to this map, but only if you have a confirmation
	NvidiaEnabledSKUs = map[string]bool{

		"standard_nc6":   true,
		"standard_nc12":  true,
		"standard_nc24":  true,
		"standard_nc24r": true,

		"standard_nv6":      true,
		"standard_nv12":     true,
		"standard_nv12s_v3": true,
		"standard_nv24":     true,
		"standard_nv24s_v3": true,
		"standard_nv24r":    true,
		"standard_nv48s_v3": true,

		"standard_nd6s":   true,
		"standard_nd12s":  true,
		"standard_nd24s":  true,
		"standard_nd24rs": true,

		"standard_nc6s_v2":   true,
		"standard_nc12s_v2":  true,
		"standard_nc24s_v2":  true,
		"standard_nc24rs_v2": true,

		"standard_nc6s_v3":   true,
		"standard_nc12s_v3":  true,
		"standard_nc24s_v3":  true,
		"standard_nc24rs_v3": true,
		"standard_nd40s_v3":  true,
		"standard_nd40rs_v2": true,

		"standard_nc4as_t4_v3":  true,
		"standard_nc8as_t4_v3":  true,
		"standard_nc16as_t4_v3": true,
		"standard_nc64as_t4_v3": true,

		"standard_nd96asr_v4":       true,
		"standard_nd112asr_a100_v4": true,
		"standard_nd120asr_a100_v4": true,

		"standard_nd96amsr_a100_v4":  true,
		"standard_nd112amsr_a100_v4": true,
		"standard_nd120amsr_a100_v4": true,

		"standard_nc24ads_a100_v4": true,
		"standard_nc48ads_a100_v4": true,
		"standard_nc96ads_a100_v4": true,
		"standard_ncads_a100_v4":   true,

		"standard_nc8ads_a10_v4":  true,
		"standard_nc16ads_a10_v4": true,
		"standard_nc32ads_a10_v4": true,

		"standard_nv6ads_a10_v5":   true,
		"standard_nv12ads_a10_v5":  true,
		"standard_nv18ads_a10_v5":  true,
		"standard_nv36ads_a10_v5":  true,
		"standard_nv36adms_a10_v5": true,
		"standard_nv72ads_a10_v5":  true,

		"standard_nd96ams_v4":      true,
		"standard_nd96ams_a100_v4": true,
	}

	// MarinerNvidiaEnabledSKUs List of GPU SKUs currently enabled and validated for Mariner. Will expand the support
	// to cover other SKUs available in Azure
	MarinerNvidiaEnabledSKUs = map[string]bool{

		"standard_nc6s_v3":   true,
		"standard_nc12s_v3":  true,
		"standard_nc24s_v3":  true,
		"standard_nc24rs_v3": true,
		"standard_nd40s_v3":  true,
		"standard_nd40rs_v2": true,

		"standard_nc4as_t4_v3":  true,
		"standard_nc8as_t4_v3":  true,
		"standard_nc16as_t4_v3": true,
		"standard_nc64as_t4_v3": true,
	}
)

Functions

func GetAllSingleValuedRequirementLabels

func GetAllSingleValuedRequirementLabels(instanceType *cloudprovider.InstanceType) map[string]string

func IsNvidiaEnabledSKU

func IsNvidiaEnabledSKU(vmSize string) bool

IsNvidiaEnabledSKU determines if an VM SKU has nvidia driver support

func ParseAgentPoolNameFromID

func ParseAgentPoolNameFromID(id string) (string, error)

ParseAgentPoolNameFromID parses the id stored on the instance ID

func ParseSubIDFromID

func ParseSubIDFromID(id string) (*string, error)

ParseSubIDFromID parses the id stored on the instance ID

func WithDefaultBool added in v0.2.1

func WithDefaultBool(key string, def bool) bool

WithDefaultBool returns the boolean value of the supplied environment variable or, if not present, the supplied default value.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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