storageclass

package
v0.0.0-...-dae0845 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	//These are from 'app' package
	// cmd/provisioner-localpv/app/config.go
	KeyQuotaSoftLimit = "softLimitGrace"
	KeyQuotaHardLimit = "hardLimitGrace"
)

Variables

This section is empty.

Functions

func NewStorageClass

func NewStorageClass(opts ...StorageClassOption) (*storagev1.StorageClass, error)

Types

type Kubeclient

type Kubeclient struct {
	// contains filtered or unexported fields
}

Kubeclient enables kubernetes API operations on StorageClass instance

func NewKubeClient

func NewKubeClient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient

func (*Kubeclient) Create

Create creates a StorageClass in kubernetes cluster

func (*Kubeclient) CreateCollection

func (k *Kubeclient) CreateCollection(
	ctx context.Context,
	list *storagev1.StorageClassList,
) (*storagev1.StorageClassList, error)

CreateCollection creates a list of StorageClasses in kubernetes cluster

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(ctx context.Context, name string, deleteOpts *metav1.DeleteOptions) error

Delete deletes a StorageClass instance from the kubernetes cluster

func (*Kubeclient) DeleteCollection

func (k *Kubeclient) DeleteCollection(ctx context.Context, listOpts metav1.ListOptions, deleteOpts *metav1.DeleteOptions) error

DeleteCollection deletes a collection of StorageClass objects.

func (*Kubeclient) Get

Get returns a StorageClass resource instances present in kubernetes cluster

func (*Kubeclient) List

List returns a list of StorageClasses instances present in kubernetes cluster

func (*Kubeclient) Update

Update updates a StorageClass in kubernetes cluster

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption abstracts creating an instance of kubeclient

func WithClientSet

func WithClientSet(c *kubernetes.Clientset) KubeclientBuildOption

WithClientSet sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeclientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

type StorageClassOption

type StorageClassOption func(*storagev1.StorageClass) error

func WithAllowedTopologies

func WithAllowedTopologies(allowedTopologies map[string][]string) StorageClassOption

func WithAnnotations

func WithAnnotations(annotations map[string]string) StorageClassOption

func WithBlockDeviceSelectors

func WithBlockDeviceSelectors(bdSelectors map[string]string) StorageClassOption

func WithDevice

func WithDevice() StorageClassOption

func WithExt4Quota

func WithExt4Quota(softLimit, hardLimit string) StorageClassOption

func WithFSType

func WithFSType(filesystem string) StorageClassOption

func WithGenerateName

func WithGenerateName(generateName string) StorageClassOption

func WithHostpath

func WithHostpath(hostpathDir string) StorageClassOption

func WithLabels

func WithLabels(labels map[string]string) StorageClassOption

func WithLocalPV

func WithLocalPV() StorageClassOption

func WithName

func WithName(name string) StorageClassOption

func WithNodeAffinityLabels

func WithNodeAffinityLabels(nodeLabelKeys []string) StorageClassOption

func WithParameters

func WithParameters(parameters map[string]string) StorageClassOption

func WithReclaimPolicy

func WithReclaimPolicy(reclaimPolicy corev1.PersistentVolumeReclaimPolicy) StorageClassOption

func WithVolumeBindingMode

func WithVolumeBindingMode(volBindingMode storagev1.VolumeBindingMode) StorageClassOption

func WithXfsQuota

func WithXfsQuota(softLimit, hardLimit string) StorageClassOption

Jump to

Keyboard shortcuts

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