util

package
v0.0.0-...-4d19ac6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientFromSecret

func GetClientFromSecret(metaClient clientset.Interface, name, namespace string) (*clientset.Clientset, error)

func GetMaxQuota

func GetMaxQuota(quotalist *corev1.ResourceQuotaList) corev1.ResourceList

func GetNamespaceQuota

func GetNamespaceQuota(client clientset.Interface, namespace string) (corev1.ResourceList, error)

GetNamespaceQuota returns the namespace quota for cpu and memory resouces. If there are multiple quota resources available, the largest quota is chosen.

func GetNodeCondition

func GetNodeCondition(status *corev1.NodeStatus, conditionType corev1.NodeConditionType) (int, *corev1.NodeCondition)

func GetPodRequirements

func GetPodRequirements(pod *corev1.Pod) corev1.ResourceList

func GetPodSchedulingInfo

func GetPodSchedulingInfo(pod *corev1.Pod) string

func GetProvisionedSlices

func GetProvisionedSlices(namespace *corev1.Namespace, clusterID, key string) ([]*internalcache.Slice, error)

func GetSchedulingInfo

func GetSchedulingInfo(namespace *corev1.Namespace) (map[string]int, corev1.ResourceList, error)

GetSchedulingInfo returns the placement result and the quotaslice size

func GetSuperClusterCapacity

func GetSuperClusterCapacity(client clientset.Interface) (corev1.ResourceList, error)

func GetSuperClusterID

func GetSuperClusterID(client clientset.Interface) (string, error)

func Min

func Min(a, b int) int

func SyncSuperClusterState

func SyncSuperClusterState(metaClient clientset.Interface, super *v1alpha4.Cluster, cache internalcache.Cache) error

func SyncVirtualClusterState

func SyncVirtualClusterState(metaClient clientset.Interface, vc *v1alpha1.VirtualCluster, cache internalcache.Cache) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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