framework

package
v0.0.0-...-e9741b0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecorateWithWaitGroup

func DecorateWithWaitGroup(wg *sync.WaitGroup, f func())

func EnsureNamespaces

func EnsureNamespaces(ctx context.Context, client client.Client, namespaces ...string)

func GetImageConfig

func GetImageConfig(ctx context.Context, client runtimeclient.Client) (*ocpconfigv1.Image, error)

func GetImageRepository

func GetImageRepository(image string) string

func GetNodesWithLabel

func GetNodesWithLabel(ctx context.Context, client runtimeclient.Client, labelKey string, labelInValue string) (*corev1.NodeList, error)

func GetPodLog

func GetPodLog(ctx context.Context, clientset *kubernetes.Clientset, namespace, podName, containerName string) (string, error)

func GetPodsWithLabel

func GetPodsWithLabel(ctx context.Context, client runtimeclient.Client, namespace, labelKey, labelInValue string) (*v1.PodList, error)

func GetRandomNodeName

func GetRandomNodeName(ctx context.Context, client runtimeclient.Client, labelKey string, labelInValue string) (string, error)

func GetReplacedImageURI

func GetReplacedImageURI(image, replacedRegistry string) string

func HaveEquivalentNodeAffinity

func HaveEquivalentNodeAffinity(expected interface{}) types.GomegaMatcher

func LoadClient

func LoadClient() (client.Client, error)

LoadClient returns a new controller-runtime client.

func LoadClientset

func LoadClientset() (*kubernetes.Clientset, error)

LoadClientset returns a new Kubernetes Clientset.

func NewEphemeralNamespace

func NewEphemeralNamespace() *corev1.Namespace

func NormalizeNameString

func NormalizeNameString(name string) string

func RegisterScheme

func RegisterScheme(s *runtime.Scheme) error

func StartChannelMonitor

func StartChannelMonitor(ch chan error, descr string)

func StorePodsLog

func StorePodsLog(ctx context.Context, clientset *kubernetes.Clientset, client runtimeclient.Client, namespace, labelKey, labelInValue, containerName, dir string) error

func ValidateCreation

func ValidateCreation(cl client.Client, ctx context.Context) func(gomega.Gomega)

func ValidateDeletion

func ValidateDeletion(cl client.Client, ctx context.Context) func(gomega.Gomega)

func VerifyCOAreUpdated

func VerifyCOAreUpdated(g Gomega, ctx context.Context, client runtimeclient.Client, operatorName string)

func VerifyCOAreUpdating

func VerifyCOAreUpdating(g Gomega, ctx context.Context, client runtimeclient.Client, operatorName string)

func VerifyConditions

func VerifyConditions(ctx context.Context, c client.Client, conditionTypeStatusTuples ...ConditionTypeStatusTuple) func(g gomega.Gomega)

func VerifyDaemonSetPodNodeAffinity

func VerifyDaemonSetPodNodeAffinity(ctx context.Context, client runtimeclient.Client, ns *v1.Namespace, labelKey string, labelInValue string, nodeSelectorRequirement *v1.NodeSelectorRequirement) func(g gomega.Gomega)

func VerifyMCPAreUpdated

func VerifyMCPAreUpdated(ctx context.Context, client runtimeclient.Client, poolName string)

func VerifyMCPsAreUpdating

func VerifyMCPsAreUpdating(g Gomega, ctx context.Context, client runtimeclient.Client)

func VerifyPodAnnotations

func VerifyPodAnnotations(ctx context.Context, client runtimeclient.Client, ns *v1.Namespace, labelKey string, labelInValue string, entries map[string]string) func(g gomega.Gomega)

func VerifyPodLabels

func VerifyPodLabels(ctx context.Context, client runtimeclient.Client, ns *v1.Namespace, labelKey string, labelInValue string, ifPresent bool, entries map[string]string) func(g gomega.Gomega)

func VerifyPodLabelsAreSet

func VerifyPodLabelsAreSet(ctx context.Context, client runtimeclient.Client, ns *v1.Namespace, labelKey string, labelInValue string, labelsKeyValuePair ...string) func(g gomega.Gomega)

func VerifyPodNodeAffinity

func VerifyPodNodeAffinity(ctx context.Context, client runtimeclient.Client, ns *v1.Namespace, labelKey string, labelInValue string, nodeSelectorTerms ...v1.NodeSelectorTerm) func(gomega.Gomega)

func VerifyPodsAreRunning

func VerifyPodsAreRunning(ctx context.Context, client runtimeclient.Client, ns *v1.Namespace, labelKey string, labelInValue string) func(gomega.Gomega)

func WaitForCOComplete

func WaitForCOComplete(ctx context.Context, client runtimeclient.Client, operatorName string)

func WaitForMCPComplete

func WaitForMCPComplete(ctx context.Context, client runtimeclient.Client)

func WriteToFile

func WriteToFile(dir, fileName, content string) error

Types

type ConditionTypeStatusTuple

type ConditionTypeStatusTuple struct {
	ConditionType   string
	ConditionStatus corev1.ConditionStatus
}

func NewConditionTypeStatusTuple

func NewConditionTypeStatusTuple(conditionType string, conditionStatus corev1.ConditionStatus) ConditionTypeStatusTuple

Jump to

Keyboard shortcuts

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