utils

package
v1.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeploymentPause

func DeploymentPause(name, namespace string, count int32) *appsv1.Deployment

func GetAvailableContainerNetworkPods

func GetAvailableContainerNetworkPods(ctx context.Context, client klient.Client) (int, error)

GetAvailableContainerNetworkPods return number of container pods can create in this cluster not very accurate but is enough for tests

Types

type Pod

type Pod struct {
	Pod *corev1.Pod
}

func NewPod

func NewPod(name, namespace, group, image string) *Pod

NewPod create pod with custom group id, pod is anti-affinity with in same group

func (*Pod) Expose

func (p *Pod) Expose(svcType string) *corev1.Service

type Sts

type Sts struct {
	Sts *appsv1.StatefulSet
}

func NewSts

func NewSts(name, namespace, group, image string, replicas int) *Sts

func (*Sts) Expose

func (p *Sts) Expose(svcType string) *corev1.Service

Jump to

Keyboard shortcuts

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