gidallocator

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 12 Imported by: 0 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

View Source
const (
	// VolumeGidAnnotationKey is the key of the annotation on the PersistentVolume
	// object that specifies a supplemental GID.
	VolumeGidAnnotationKey = "pv.beta.kubernetes.io/gid"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

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

Allocator allocates GIDs to PVs. It allocates from per-SC ranges and ensures that no two PVs of the same SC get the same GID.

func New

func New(client kubernetes.Interface) Allocator

New creates a new GID Allocator

func (*Allocator) AllocateNext

func (a *Allocator) AllocateNext(options controller.VolumeOptions) (int, error)

AllocateNext allocates the next available GID for the given VolumeOptions (claim's options for a volume it wants) from the appropriate GID table.

func (*Allocator) Release

func (a *Allocator) Release(volume *v1.PersistentVolume) error

Release releases the given volume's allocated GID from the appropriate GID table.

Jump to

Keyboard shortcuts

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