util

package
v0.22.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup()

func CleanupWDS

func CleanupWDS(ctx context.Context, wds *kubernetes.Clientset, ksWds *ksClient.Clientset, ns string)

CleanupWDS: removes all deployments and services from ns and all bindingPolicies from cluster

func CreateBindingPolicy

func CreateBindingPolicy(ctx context.Context, wds *ksClient.Clientset, name string,
	clusterSelector []metav1.LabelSelector, objectTest []ksapi.DownsyncObjectTest)

func CreateCustomTransform added in v0.22.0

func CreateCustomTransform(ctx context.Context, wds *ksClient.Clientset, name, apiGroup, resource string, remove ...string)

func CreateDeployment

func CreateDeployment(ctx context.Context, wds *kubernetes.Clientset, ns string, name string, labels map[string]string)

func CreateDynamicClient

func CreateDynamicClient(config *rest.Config) *dynamic.DynamicClient

func CreateJob added in v0.21.1

func CreateJob(ctx context.Context, wds *kubernetes.Clientset, ns string, name string, appName string)

func CreateKSClient

func CreateKSClient(config *rest.Config) *ksClient.Clientset

func CreateKubeClient

func CreateKubeClient(config *rest.Config) *kubernetes.Clientset

func CreateNS

func CreateNS(ctx context.Context, client *kubernetes.Clientset, name string)

func CreateOcmWorkClient

func CreateOcmWorkClient(config *rest.Config) *ocmWorkClient.Clientset

func CreateService

func CreateService(ctx context.Context, wds *kubernetes.Clientset, ns string, name string, appName string)

func Delete1By1 added in v0.21.2

func Delete1By1[ObjectListType metav1.ListInterface](ctx context.Context, client ResourceInterface[ObjectListType], listNames func(ObjectListType) []string)

func DeleteAll added in v0.21.2

func DeleteAll[ObjectListType metav1.ListInterface](ctx context.Context, client ResourceCollectionInterface[ObjectListType], listNames func(ObjectListType) []string)

func DeleteBindingPolicy

func DeleteBindingPolicy(ctx context.Context, wds *ksClient.Clientset, name string)

func DeleteDeployment

func DeleteDeployment(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)

func DeletePods added in v0.21.2

func DeletePods(ctx context.Context, client *kubernetes.Clientset, ns string, namePrefix string)

func DeleteWECDeployments

func DeleteWECDeployments(ctx context.Context, wec *kubernetes.Clientset, ns string)

func Expect1PodOfEach added in v0.21.2

func Expect1PodOfEach(ctx context.Context, client *kubernetes.Clientset, ns string, namePrefixes ...string)

func GetConfig

func GetConfig(context string) *rest.Config

func SetupKubestellar

func SetupKubestellar(releasedFlag bool)

func ValidateNumDeploymentReplicas

func ValidateNumDeploymentReplicas(ctx context.Context, wec *kubernetes.Clientset, ns string, numReplicas int)

func ValidateNumDeployments

func ValidateNumDeployments(ctx context.Context, wec *kubernetes.Clientset, ns string, num int, problemFuncs ...func(*appsv1.Deployment) string)

ValidateNumDeployments waits a limited amount of time for the number of Deployjment objects to equal the given count and all the problemFuncs to return the empty string for every Deployment.

func ValidateNumJobs added in v0.21.1

func ValidateNumJobs(ctx context.Context, wec *kubernetes.Clientset, ns string, num int)

func ValidateNumManifestworks

func ValidateNumManifestworks(ctx context.Context, ocmWorkIts *ocmWorkClient.Clientset, ns string, num int)

func ValidateNumServices

func ValidateNumServices(ctx context.Context, wec *kubernetes.Clientset, ns string, num int)

func ValidateSingletonStatus

func ValidateSingletonStatus(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)

func ValidateSingletonStatusZeroValue added in v0.22.0

func ValidateSingletonStatusZeroValue(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)

Types

type ResourceCollectionInterface added in v0.21.2

type ResourceCollectionInterface[ObjectListType metav1.ListInterface] interface {
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	List(ctx context.Context, opts metav1.ListOptions) (ObjectListType, error)
}

type ResourceInterface added in v0.21.2

type ResourceInterface[ObjectListType metav1.ListInterface] interface {
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	List(ctx context.Context, opts metav1.ListOptions) (ObjectListType, error)
}

Jump to

Keyboard shortcuts

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