v3.0.0-beta.1+incompat... Latest Latest

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

Go to latest
Published: Jun 12, 2017 License: Apache-2.0 Imports: 6 Imported by: 0




View Source
const (
	// External provisioner annotation in PV object
	AnnProvisionedBy = ""
	// The label key that this provisioner uses for PV node affinity
	// hostname is not the best choice, but it's what pod and node affinity also use
	NodeLabelKey = metav1.LabelHostname


This section is empty.


func CreateLocalPVSpec

func CreateLocalPVSpec(config *LocalPVConfig) *v1.PersistentVolume

CreateLocalPVSpec returns a PV spec that can be used for PV creation


type LocalPVConfig

type LocalPVConfig struct {
	Name            string
	HostPath        string
	StorageClass    string
	ProvisionerName string
	AffinityAnn     string

LocalPVConfig defines the parameters for creating a local PV

type RuntimeConfig

type RuntimeConfig struct {
	// Unique name of this provisioner
	Name string
	// K8s API client
	Client *kubernetes.Clientset
	// Cache to store PVs managed by this provisioner
	Cache *cache.VolumeCache
	// K8s API layer
	APIUtil util.APIUtil
	// Volume util layer
	VolUtil util.VolumeUtil

RuntimeConfig stores all the objects that the provisioner needs to run

type UserConfig

type UserConfig struct {
	// Node object for this node
	Node *v1.Node
	// The hostpath directory
	HostDir string
	// The mount point of the hostpath volume
	MountDir string
	// key = storageclass, value = relative directory to search in
	DiscoveryMap map[string]string

UserConfig stores all the user-defined parameters to the provisioner

Jump to

Keyboard shortcuts

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