kubevolumes

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePersistentVolumeClaim

func CreatePersistentVolumeClaim(ctx context.Context, k8sClient kubernetes.Interface, pvcName, namespace, storageClass string, storageSize resource.Quantity) error

func GetDefaultStorageClassName

func GetDefaultStorageClassName(ctx context.Context, k8sclient *kubernetes.Clientset) (string, error)

func GetPersistentVolumeClaimAndWaitForVolume

func GetPersistentVolumeClaimAndWaitForVolume(ctx context.Context, k8sClient kubernetes.Interface, namespace string, pvcName string) (*v1.PersistentVolumeClaim, error)

func NewEmptyDirVolume

func NewEmptyDirVolume(name string) v1.Volume

func NewHostPathVolume

func NewHostPathVolume(name, hostPath string, mountType v1.HostPathType) v1.Volume

func NewPersistentVolumeClaimVolume

func NewPersistentVolumeClaimVolume(name, claimName string, readOnly bool) v1.Volume

func NewProjectedVolumeFromSecrets

func NewProjectedVolumeFromSecrets(name string, secretNames ...string) v1.Volume

func NewVolumeFromConfigMap

func NewVolumeFromConfigMap(name, configName string) v1.Volume

func NewVolumeFromSecret

func NewVolumeFromSecret(name, secretName string) v1.Volume

func NewVolumeFromSecretOptional

func NewVolumeFromSecretOptional(name, secretName string, optional bool) v1.Volume

func NewVolumeMount

func NewVolumeMount(name, path string, readOnly bool) v1.VolumeMount

func NewVolumeSubPathMount

func NewVolumeSubPathMount(name, path string, subPath string, readOnly bool) v1.VolumeMount

func RemoveClaimRefOfPV

func RemoveClaimRefOfPV(ctx context.Context, k8sClient kubernetes.Interface, pvc *v1.PersistentVolumeClaim) error

func SetClaimRefOfPV

func SetClaimRefOfPV(ctx context.Context, k8sClient kubernetes.Interface, volumeName string, claimRef v1.ObjectReference) error

func SetPVReclaimPolicyToRetain

func SetPVReclaimPolicyToRetain(ctx context.Context, k8sClient kubernetes.Interface, pvc *v1.PersistentVolumeClaim) error

func ValidateStorageClassExists

func ValidateStorageClassExists(ctx context.Context, client *kubernetes.Clientset, storageClassName string) error

func WaitForPVCToBeDeleted

func WaitForPVCToBeDeleted(ctx context.Context, k8sClient kubernetes.Interface, namespace, pvc string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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