Documentation ¶
Index ¶
- func CopyVolumeDefaults(volumeRequest v1.VolumeRequest, volumeBinding v1.VolumeBinding, ...) v1.VolumeRequest
- func CreateEphemeralVolumeClass(req router.Request, resp router.Response) error
- func FindDefaultStorageClass(ctx context.Context, c client.Reader) (string, error)
- func GetDefaultVolumeSize(ctx context.Context, c client.Client) (v1.Quantity, error)
- func GetVolumeClassInstances(ctx context.Context, c client.Client, namespace string) (map[string]adminv1.ProjectVolumeClassInstance, ...)
- func GetVolumeClassNames(ctx context.Context, c client.Client, namespace string, storageClassNames bool) ([]string, error)
- func NormalizeMode(mode string) string
- func ResolveVolumeRequest(ctx context.Context, c client.Client, volumeRequest v1.VolumeRequest, ...) (v1.VolumeRequest, error)
- func SliceToMap[T any, K comparable](s []T, keyFunc func(obj T) K) map[K]T
- func SyncVolumeClasses(req router.Request, resp router.Response) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyVolumeDefaults ¶
func CopyVolumeDefaults(volumeRequest v1.VolumeRequest, volumeBinding v1.VolumeBinding, volumeDefaults v1.VolumeDefault) v1.VolumeRequest
func FindDefaultStorageClass ¶
func GetDefaultVolumeSize ¶ added in v0.10.0
func GetVolumeClassInstances ¶
func GetVolumeClassInstances(ctx context.Context, c client.Client, namespace string) (map[string]adminv1.ProjectVolumeClassInstance, *adminv1.ProjectVolumeClassInstance, error)
GetVolumeClassInstances returns an array of all project and cluster volume classes available in the namespace. If a project volume class is set to default, this ensures that no cluster volume classes are default to avoid conflicts. The class determined to be default, if it exists, is also returned.
func GetVolumeClassNames ¶
func NormalizeMode ¶
func ResolveVolumeRequest ¶ added in v0.10.0
func ResolveVolumeRequest(ctx context.Context, c client.Client, volumeRequest v1.VolumeRequest, volumeBinding v1.VolumeBinding, volumeClasses map[string]adminv1.ProjectVolumeClassInstance, defaultVolumeClass *adminv1.ProjectVolumeClassInstance, existingResolvedVolume v1.VolumeResolvedOffering) (v1.VolumeRequest, error)
func SliceToMap ¶
func SliceToMap[T any, K comparable](s []T, keyFunc func(obj T) K) map[K]T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.