Documentation
¶
Index ¶
- Constants
- func Cleanup(ctx context.Context)
- func CleanupWDS(ctx context.Context, wds *kubernetes.Clientset, ksWds *ksClient.Clientset, ...)
- func CreateBindingPolicy(ctx context.Context, wds *ksClient.Clientset, name string, ...)
- func CreateCustomTransform(ctx context.Context, wds *ksClient.Clientset, name, apiGroup, resource string, ...)
- func CreateDeployment(ctx context.Context, wds *kubernetes.Clientset, ns string, name string, ...)
- func CreateDynamicClient(config *rest.Config) *dynamic.DynamicClient
- func CreateJob(ctx context.Context, wds *kubernetes.Clientset, ns string, name string, ...)
- func CreateKSClient(config *rest.Config) *ksClient.Clientset
- func CreateKubeClient(config *rest.Config) *kubernetes.Clientset
- func CreateNS(ctx context.Context, client *kubernetes.Clientset, name string)
- func CreateOcmWorkClient(config *rest.Config) *ocmWorkClient.Clientset
- func CreateService(ctx context.Context, wds *kubernetes.Clientset, ns string, name string, ...)
- func CreateStatusCollector(ctx context.Context, wds *ksClient.Clientset, name string, ...)
- func Delete1By1[ObjectListType metav1.ListInterface](ctx context.Context, kind string, client ResourceInterface[ObjectListType], ...)
- func DeleteAll[ObjectListType metav1.ListInterface](ctx context.Context, client ResourceCollectionInterface[ObjectListType], ...)
- func DeleteBindingPolicy(ctx context.Context, wds *ksClient.Clientset, name string)
- func DeleteDeployment(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)
- func DeletePods(ctx context.Context, client *kubernetes.Clientset, ns string, ...)
- func DeleteWECDeployments(ctx context.Context, wec *kubernetes.Clientset, ns string)
- func Expect1PodOfEach(ctx context.Context, client *kubernetes.Clientset, ns string, ...)
- func GetBindingTime(ctx context.Context, clientset *ksClient.Clientset, name string) time.Time
- func GetConfig(context string) *rest.Config
- func GetDeployment(ctx context.Context, wec *kubernetes.Clientset, ns, name string) *appsv1.Deployment
- func GetDeploymentTime(ctx context.Context, clientset *kubernetes.Clientset, ns string, name string) time.Time
- func GetManifestworkTime(ctx context.Context, ocmWorkImbs *ocmWorkClient.Clientset, ns string, ...) time.Time
- func GetNumDeploymentReplicas(ctx context.Context, wec *kubernetes.Clientset, ns string) int
- func ReadContainerArgsInDeployment(ctx context.Context, client *kubernetes.Clientset, ns string, ...) []string
- func ScaleDeployment(ctx context.Context, client *kubernetes.Clientset, ns string, name string, ...)
- func SetupKubestellar(ctx context.Context, releasedFlag bool, otherFlags ...string)
- func ValidateBinding(ctx context.Context, wds ksClient.Interface, name string, ...)
- func ValidateNumDeploymentReplicas(ctx context.Context, wec *kubernetes.Clientset, ns string, numReplicas int)
- func ValidateNumDeployments(ctx context.Context, where string, wec *kubernetes.Clientset, ns string, ...)
- func ValidateNumJobs(ctx context.Context, wec *kubernetes.Clientset, ns string, num int)
- func ValidateNumManifestworks(ctx context.Context, ocmWorkIts *ocmWorkClient.Clientset, ns string, num int)
- func ValidateNumServices(ctx context.Context, wec *kubernetes.Clientset, ns string, num int)
- func ValidateSingletonStatus(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)
- func ValidateSingletonStatusNonZeroValue(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)
- func ValidateSingletonStatusZeroValue(ctx context.Context, wds *kubernetes.Clientset, ns string, name string)
- func WaitForCombinedStatus(ctx context.Context, ksClient *ksClient.Clientset, ...)
- func WaitForDepolymentAvailability(ctx context.Context, client kubernetes.Interface, ns string, name string)
- type ResourceCollectionInterface
- type ResourceInterface
Constants ¶
const ( // GotNot means that the attempt to list Deployments failed GotNoList int = -1 // GotNotExactly1 means that the number of Deployments is more or less than 1 GotNotExactly1 int = -2 // GotNoReplicas means that the Deployment does not specify a number of replicas. GotNoReplicas int = -3 )
Variables ¶
This section is empty.
Functions ¶
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, testAndStatusCollection []ksapi.DownsyncPolicyClause, mutators ...func(*ksapi.BindingPolicy) error)
func CreateCustomTransform ¶ added in v0.22.0
func CreateDeployment ¶
func CreateDynamicClient ¶
func CreateDynamicClient(config *rest.Config) *dynamic.DynamicClient
func CreateKubeClient ¶
func CreateKubeClient(config *rest.Config) *kubernetes.Clientset
func CreateOcmWorkClient ¶
func CreateOcmWorkClient(config *rest.Config) *ocmWorkClient.Clientset
func CreateService ¶
func CreateStatusCollector ¶ added in v0.24.0
func Delete1By1 ¶ added in v0.21.2
func Delete1By1[ObjectListType metav1.ListInterface](ctx context.Context, kind string, 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 DeleteDeployment ¶
func DeletePods ¶ added in v0.21.2
func DeleteWECDeployments ¶
func DeleteWECDeployments(ctx context.Context, wec *kubernetes.Clientset, ns string)
func Expect1PodOfEach ¶ added in v0.21.2
func GetBindingTime ¶ added in v0.24.0
func GetDeployment ¶ added in v0.26.0
func GetDeployment(ctx context.Context, wec *kubernetes.Clientset, ns, name string) *appsv1.Deployment
func GetDeploymentTime ¶ added in v0.24.0
func GetManifestworkTime ¶ added in v0.24.0
func GetNumDeploymentReplicas ¶ added in v0.25.0
GetNumDeploymentReplicas returns the number of replicas of the one and only Deployment in the given namespace, or one of the values above that explain what went wrong.
func ReadContainerArgsInDeployment ¶ added in v0.24.0
func ScaleDeployment ¶ added in v0.24.0
func SetupKubestellar ¶
func ValidateBinding ¶ added in v0.24.0
func ValidateNumDeployments ¶
func ValidateNumDeployments(ctx context.Context, where string, wec *kubernetes.Clientset, ns string, num int, problemFuncs ...func(*appsv1.Deployment) string)
ValidateNumDeployments waits a limited amount of time for the number of Deployment 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 ValidateNumServices ¶
func ValidateSingletonStatus ¶
func ValidateSingletonStatusNonZeroValue ¶ added in v0.24.0
func ValidateSingletonStatusZeroValue ¶ added in v0.22.0
func WaitForCombinedStatus ¶ added in v0.25.0
func WaitForCombinedStatus(ctx context.Context, ksClient *ksClient.Clientset, kubeClient *kubernetes.Clientset, ns, objectName, policyName string, validate func(*ksapi.CombinedStatus) error)
WaitForCombinedStatus is a helper func which expects the workload object to be a Deployment. CombinedStatus name is the concatenation of: - the UID of the workload object - the string "." - the UID of the BindingPolicy object.
func WaitForDepolymentAvailability ¶ added in v0.24.0
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) }