kubernetes/pkg/volume/hostpath/host_path.go

// ProbeVolumePlugins is the primary entrypoint for volume plugins.
// The volumeConfig arg provides the ability to configure volume behavior.  It is implemented as a pointer to allow nils.
// The hostPathPlugin is used to store the volumeConfig and give it, when needed, to the func that Recycles.
// Tests that exercise recycling should not use this func but instead use ProbeRecyclablePlugins() to override default behavior.
func ProbeVolumePlugins(volumeConfig volume.VolumeConfig) []volume.VolumePlugin {}

func FakeProbeVolumePlugins(volumeConfig volume.VolumeConfig) []volume.VolumePlugin {}

type hostPathPlugin

var _

var _

var _

var _

var _

const hostPathPluginName

func (plugin *hostPathPlugin) Init(host volume.VolumeHost) error {}

func (plugin *hostPathPlugin) GetPluginName() string {}

func (plugin *hostPathPlugin) GetVolumeName(spec *volume.Spec) (string, error) {}

func (plugin *hostPathPlugin) CanSupport(spec *volume.Spec) bool {}

func (plugin *hostPathPlugin) RequiresRemount(spec *volume.Spec) bool {}

func (plugin *hostPathPlugin) SupportsMountOption() bool {}

func (plugin *hostPathPlugin) SupportsSELinuxContextMount(spec *volume.Spec) (bool, error) {}

func (plugin *hostPathPlugin) GetAccessModes() []v1.PersistentVolumeAccessMode {}

func (plugin *hostPathPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod) (volume.Mounter, error) {}

func (plugin *hostPathPlugin) NewUnmounter(volName string, podUID types.UID) (volume.Unmounter, error) {}

// Recycle recycles/scrubs clean a HostPath volume.
// Recycle blocks until the pod has completed or any error occurs.
// HostPath recycling only works in single node clusters and is meant for testing purposes only.
func (plugin *hostPathPlugin) Recycle(pvName string, spec *volume.Spec, eventRecorder recyclerclient.RecycleEventRecorder) error {}

func (plugin *hostPathPlugin) NewDeleter(logger klog.Logger, spec *volume.Spec) (volume.Deleter, error) {}

func (plugin *hostPathPlugin) NewProvisioner(logger klog.Logger, options volume.VolumeOptions) (volume.Provisioner, error) {}

func (plugin *hostPathPlugin) ConstructVolumeSpec(volumeName, mountPath string) (volume.ReconstructedVolume, error) {}

func newDeleter(spec *volume.Spec, host volume.VolumeHost) (volume.Deleter, error) {}

func newProvisioner(options volume.VolumeOptions, host volume.VolumeHost, plugin *hostPathPlugin) (volume.Provisioner, error) {}

type hostPath

func (hp *hostPath) GetPath() string {}

type hostPathMounter

var _

func (b *hostPathMounter) GetAttributes() volume.Attributes {}

// SetUp does nothing.
func (b *hostPathMounter) SetUp(mounterArgs volume.MounterArgs) error {}

// SetUpAt does not make sense for host paths - probably programmer error.
func (b *hostPathMounter) SetUpAt(dir string, mounterArgs volume.MounterArgs) error {}

func (b *hostPathMounter) GetPath() string {}

type hostPathUnmounter

var _

// TearDown does nothing.
func (c *hostPathUnmounter) TearDown() error {}

// TearDownAt does not make sense for host paths - probably programmer error.
func (c *hostPathUnmounter) TearDownAt(dir string) error {}

type hostPathProvisioner

// Create for hostPath simply creates a local /tmp/%/%s directory as a new PersistentVolume, default /tmp/hostpath_pv/%s.
// This Provisioner is meant for development and testing only and WILL NOT WORK in a multi-node cluster.
func (r *hostPathProvisioner) Provision(selectedNode *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (*v1.PersistentVolume, error) {}

type hostPathDeleter

func (r *hostPathDeleter) GetPath() string {}

// Delete for hostPath removes the local directory so long as it is beneath /tmp/*.
// THIS IS FOR TESTING AND LOCAL DEVELOPMENT ONLY!  This message should scare you away from using
// this deleter for anything other than development and testing.
func (r *hostPathDeleter) Delete() error {}

func getVolumeSource(spec *volume.Spec) (*v1.HostPathVolumeSource, bool, error) {}

type hostPathTypeChecker

type fileTypeChecker

func (ftc *fileTypeChecker) Exists() bool {}

func (ftc *fileTypeChecker) IsFile() bool {}

func (ftc *fileTypeChecker) MakeFile() error {}

func (ftc *fileTypeChecker) IsDir() bool {}

func (ftc *fileTypeChecker) MakeDir() error {}

func (ftc *fileTypeChecker) IsBlock() bool {}

func (ftc *fileTypeChecker) IsChar() bool {}

func (ftc *fileTypeChecker) IsSocket() bool {}

func (ftc *fileTypeChecker) GetPath() string {}

func newFileTypeChecker(path string, hu hostutil.HostUtils) hostPathTypeChecker {}

// checkType checks whether the given path is the exact pathType
func checkType(path string, pathType *v1.HostPathType, hu hostutil.HostUtils) error {}

func checkTypeInternal(ftc hostPathTypeChecker, pathType *v1.HostPathType) error {}

// makeDir creates a new directory.
// If pathname already exists as a directory, no error is returned.
// If pathname already exists as a file, an error is returned.
func makeDir(pathname string) error {}

// makeFile creates an empty file.
// If pathname already exists, whether a file or directory, no error is returned.
func makeFile(pathname string) error {}