utils

package
v0.0.0-...-d4f16e2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentPodsNumInTargetClusters

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

func DesiredPodsNumInTargetClusters

func DesiredPodsNumInTargetClusters(weights []policyv1alpha1.StaticClusterWeight, replicaNum int32) map[string]int

func GetClustersWithName

func GetClustersWithName(ctx context.Context, client runtimeClient.Client, clusterName []string) ([]clusterv1alpha1.Cluster, error)

func GetNodesInClusters

func GetNodesInClusters(ctx context.Context, client runtimeClient.Client, clusters []clusterv1alpha1.Cluster) (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