utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StorageClassName is the name of the test storage class
	StorageClassName = "my-storage-class"

	// ProvisionerName is the name of the test storage class provisioner
	ProvisionerName = "my-provisioner"
)

Variables

View Source
var StorageClass storagev1.StorageClass = storagev1.StorageClass{
	ObjectMeta: metav1.ObjectMeta{
		Name: StorageClassName,
	},
	Provisioner:          ProvisionerName,
	AllowVolumeExpansion: ptr.To(true),
	VolumeBindingMode:    ptr.To(storagev1.VolumeBindingImmediate),
	ReclaimPolicy:        ptr.To(corev1.PersistentVolumeReclaimDelete),
}

StorageClass is a test storage class

Functions

func CreatePVC

func CreatePVC(ctx context.Context,
	k8sClient client.Client,
	name string,
	capacity string) (*corev1.PersistentVolumeClaim, error)

CreatePVC is a helper function used to create a test PVC

func CreatePersistentVolumeClaimAutoscaler added in v0.1.2

func CreatePersistentVolumeClaimAutoscaler(ctx context.Context,
	k8sClient client.Client,
	name string,
	scaleTargetRef string,
	maxCapacity string) (*v1alpha1.PersistentVolumeClaimAutoscaler, error)

CreatePersistentVolumeClaimAutoscaler is a helper function used to create a test PVC Autoscaler resource.

Types

This section is empty.

Jump to

Keyboard shortcuts

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