cluster

package
v0.0.0-...-d0a74a8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ComputeClasses [4]string = [4]string{"Regular", "Balanced", "Scale-out", "Scale-out arm64"}

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 (
	ComputeClassRegular     ComputeClass = 0
	ComputeClassBalanced    ComputeClass = 1
	ComputeClassScaleout    ComputeClass = 2
	ComputeClassScaleoutArm ComputeClass = 3
)

type Node

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

type Workload

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

Jump to

Keyboard shortcuts

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