utils

package
v0.0.0-...-e29486c Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentPodsNumInTargetNodeGroups

func CurrentPodsNumInTargetNodeGroups(ctx context.Context, client runtimeClient.Client, deploy *appsv1.Deployment, policy *policyv1alpha1.PropagationPolicy) (map[string]int32, map[string]string, error)

func DesiredPodsNumInTargetNodeGroups

func DesiredPodsNumInTargetNodeGroups(weights []policyv1alpha1.StaticNodeGroupWeight, replicaNum int32) map[string]int32

func GetNodeGroupsWithName

func GetNodeGroupsWithName(ctx context.Context, client runtimeClient.Client, nodeGroupName []string) ([]groupv1alpha1.NodeGroup, error)

func GetNodesInGroups

func GetNodesInGroups(ctx context.Context, client runtimeClient.Client, groups []groupv1alpha1.NodeGroup) (map[string]string, error)

func GetPodListFromDeploy

func GetPodListFromDeploy(ctx context.Context, client runtimeClient.Client, deploy *appsv1.Deployment) (*corev1.PodList, error)

func GetRelativeDeployment

func GetRelativeDeployment(ctx context.Context, client runtimeClient.Client, pod *corev1.Pod, policy *policyv1alpha1.PropagationPolicy) (*appsv1.Deployment, error)

func ParseNamespaceName

func ParseNamespaceName(namespaceName string) (string, string, error)

func WithCheck

func WithCheck(handler http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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