cluster

package
v0.0.0-...-3c7030d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ComputeClasses [7]string = [7]string{"General-purpose", "Balanced", "Scale-out", "Scale-out arm64", "Performance", "Accelerator", "GPU Pod"}

Functions

func DescribePod

func DescribePod(client kubernetes.Interface, podName string, namespace string) (*v1.Pod, error)

func GetClusterNodes

func GetClusterNodes(clientset *kubernetes.Clientset) (map[string]Node, error)

func GetCurrentContext

func GetCurrentContext(kubeConfigPath string) ([]string, error)

func GetKubeConfig

func GetKubeConfig() (*rest.Config, string, error)

func ListNamespaces

func ListNamespaces(client kubernetes.Interface) (*v1.NamespaceList, error)

func ListNodes

func ListNodes(client kubernetes.Interface) (*v1.NodeList, error)

func ListPods

func ListPods(client kubernetes.Interface) (*v1.PodList, error)

Types

type ComputeClass

type ComputeClass int8
const (
	ComputeClassGeneralPurpose ComputeClass = 0
	ComputeClassBalanced       ComputeClass = 1
	ComputeClassScaleout       ComputeClass = 2
	ComputeClassScaleoutArm    ComputeClass = 3
	ComputeClassPerformance    ComputeClass = 4
	ComputeClassAccelerator    ComputeClass = 5
	ComputeClassGPUPod         ComputeClass = 6
)

type Node

type Node struct {
	Name         string
	Workloads    []Workload
	InstanceType string
	Region       string
	Spot         bool
	Cost         float64
	Accelerator  string
}

type Workload

type Workload struct {
	Name              string
	Node_name         string
	Containers        int
	Cpu               int64
	Memory            int64
	Storage           int64
	AcceleratorType   string
	AcceleratorAmount int64
	Cost              float64
	ComputeClass      ComputeClass
}

Jump to

Keyboard shortcuts

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