storage_class

package
v1.78.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilter added in v1.78.0

func ApplyFilter(obj *unstructured.Unstructured) (go_hook.FilterResult, error)

ApplyFilter is a FilterFunc for a StorageClass binding.

func DeleteChangedObjects added in v1.78.0

func DeleteChangedObjects[T interface {
	Namer
	comparable
}](input *go_hook.HookInput, objects []storagev1.StorageClass, desired []T, objectToDesired func(storagev1.StorageClass) T)

DeleteChangedObjects deletes every StorageClass object that is still desired but whose parameters, as objectToDesired reads them back into an entry, differ from the desired entry with the same name. The templates then recreate it: StorageClass parameters are immutable. An object that is no longer desired is left alone.

func DeleteObjectsIf added in v1.78.0

func DeleteObjectsIf(input *go_hook.HookInput, objects []storagev1.StorageClass, shouldDeleteFunc func(storagev1.StorageClass) bool)

DeleteObjectsIf deletes every StorageClass object shouldDelete selects, so that the templates recreate the ones still wanted: most StorageClass fields are immutable.

func ExcludeByAnchoredPatterns added in v1.78.0

func ExcludeByAnchoredPatterns[T Namer](classes []T, patterns []string) ([]T, error)

ExcludeByAnchoredPatterns returns the entries whose name matches none of the regular expressions. Every pattern is anchored as ^(pattern)$, so a plain name stays an exact name: `fast` excludes `fast` and not `ultra-fast-ssd`. The result is always a new slice.

func MergeOverridingByName added in v1.78.0

func MergeOverridingByName[T Namer](base, overrides []T) []T

MergeOverridingByName returns base with every entry replaced, in its place, by the override with exactly the same name; the remaining overrides are appended in their order. A name overrides lists more than once yields a single entry, the last one. Neither input is changed.

Names are compared exactly, not as patterns: provider class names are often prefixes of each other (network-ssd and network-ssd-nonreplicated).

func NormalizeName added in v1.78.0

func NormalizeName(value string) string

NormalizeName turns a cloud-side name — a zVirt storage domain, a DVP storage class — into a name Kubernetes accepts for an object: a lowercase RFC 1123 subdomain.

See https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names

func SortByName added in v1.78.0

func SortByName[T Namer](classes []T)

SortByName orders the entries by name in place, keeping the relative order of equal names.

Types

type Namer added in v1.78.0

type Namer interface {
	GetName() string
}

Namer is a StorageClass entry of a module: anything that knows the name of the StorageClass it stands for.

Jump to

Keyboard shortcuts

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