Documentation ¶
Index ¶
Constants ¶
View Source
const ( // External provisioner annotation in PV object AnnProvisionedBy = "pv.kubernetes.io/provisioned-by" // 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 )
Variables ¶
This section is empty.
Functions ¶
func CreateLocalPVSpec ¶
func CreateLocalPVSpec(config *LocalPVConfig) *v1.PersistentVolume
CreateLocalPVSpec returns a PV spec that can be used for PV creation
Types ¶
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 { *UserConfig // 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
Click to show internal directories.
Click to hide internal directories.