utils

package
v1.13.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WaitForDeploymentRollout waits for the specified Deployment to reach its desired state within the given timeout.
	// This blocks until the Deployment's observed generation and ready replicas match the desired state,
	// ensuring it is fully rolled out.
	WaitForDeploymentRollout = func(c clientset.Interface, dep *appsv1.Deployment, timeoutSeconds int) error {
		return cmdutil.WaitForDeploymentRollout(c, dep, timeoutSeconds)
	}
)

Functions

func ParseTemplate

func ParseTemplate(strTmpl string, obj interface{}) ([]byte, error)

ParseTemplate validates and parses passed as argument template

func SimulateDeploymentUnready added in v1.12.0

func SimulateDeploymentUnready(c clientset.Interface, name, namespace string) error

SimulateDeploymentUnready simulates a "not ready" status by incrementing the replicas of the specified Deployment, thus marking it as unready. This is useful for testing the handling of Deployment readiness in Karmada.

func SimulateNetworkErrorOnOp added in v1.12.0

func SimulateNetworkErrorOnOp(c clientset.Interface, operation, resource string) error

SimulateNetworkErrorOnOp simulates a network error during the specified operation on a resource by prepending a reactor to the fake client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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