storage

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClaim added in v1.0.0

func CreateClaim(namespace, scName string) v1.PersistentVolumeClaim

func DefineImmediateBindingTests added in v0.9.0

func DefineImmediateBindingTests(d *deploy.Deployment, f *framework.Framework)

func DefineKataTests added in v0.9.0

func DefineKataTests(d *deploy.Deployment)

func DefineLateBindingTests added in v0.9.0

func DefineLateBindingTests(d *deploy.Deployment, f *framework.Framework)

func PVWriteReadSingleNodeCheck

func PVWriteReadSingleNodeCheck(client clientset.Interface, timeouts *framework.TimeoutContext, claim *v1.PersistentVolumeClaim, id string)

PVWriteReadSingleNodeCheck checks that a PV retains data on a single node.

It starts two pods: - The first pod writes 'hello word' to the /mnt/test (= the volume) on one node. - The second pod runs grep 'hello world' on /mnt/test on the same node.

The node is selected by Kubernetes when scheduling the first pod. It's then selected via its name for the second pod.

If both succeed, Kubernetes actually allocated something that is persistent across pods.

This is a common test that can be called from a StorageClassTest.PvCheck.

func TestDynamicProvisioning added in v0.9.0

func TestDynamicProvisioning(client clientset.Interface, timeouts *framework.TimeoutContext, claim *v1.PersistentVolumeClaim, mode storagev1.VolumeBindingMode, id string)

TestDynamicLateBindingProvisioning is a variant of k8s.io/kubernetes/test/e2e/storage/testsuites/provisioning.go which works with late and immediate binding and can be invoked in parallel with different IDs.

func TestReschedule added in v1.0.0

func TestReschedule(client clientset.Interface, timeouts *framework.TimeoutContext, claim *v1.PersistentVolumeClaim, driverName, id string)

Types

type BackoffManager added in v0.7.0

type BackoffManager interface {
	Backoff() clock.Timer
}

BackoffManager manages backoff with a particular scheme based on its underlying implementation. It provides an interface to return a timer for backoff, and caller shall backoff until Timer.C returns. If the second Backoff() is called before the timer from the first Backoff() call finishes, the first timer will NOT be drained. The BackoffManager is supposed to be called in a single-threaded environment.

func NewExponentialBackoffManager added in v0.7.0

func NewExponentialBackoffManager(initBackoff, maxBackoff, resetDuration time.Duration, backoffFactor, jitter float64, c clock.Clock) BackoffManager

NewExponentialBackoffManager returns a manager for managing exponential backoff. Each backoff is jittered and backoff will not exceed the given max. If the backoff is not called within resetDuration, the backoff is reset. This backoff manager is used to reduce load during upstream unhealthiness.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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