Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HostPathVolumeValidation ¶
func HostPathVolumeValidation(sl validator.StructLevel)
func VolumeMountValidation ¶
func VolumeMountValidation(sl validator.StructLevel)
Types ¶
type HostPathDevicePluginConfig ¶
type HostPathDevicePluginConfig struct {
// ResourceName defines a extended resource name which the device plugin serves
ResourceName string `yaml:"resourceName" validate:"required"`
// SocketName defines a filename of unix socket to be created that the device plugin listens
SocketName string `yaml:"socketName" validate:"required"`
// HostPath specifies the host path volume that the plugin serves as a extended resource
HostPath corev1.HostPathVolumeSource `yaml:"hostPath"`
// VolumeMount specifies how the extended resource mounts the HostPath to containers. Name field will be ignored.
VolumeMount corev1.VolumeMount `yaml:"volumeMount"`
// NumDevices specifies how many extended resource the device plugin serves
NumDevices int `yaml:"numDevices" validate:"min=1"`
// HealthCheckInterval specifies the healthcheck interval of the Spec.HostPath
HealthCheckInterval time.Duration `yaml:"healthCheckInterval"`
}
HostPathDevicePluginConfig holds a config for HostPathDevicePlugin
func MustLoadConfig ¶
func MustLoadConfig(configPath string) HostPathDevicePluginConfig
func (HostPathDevicePluginConfig) HostPathVolumeName ¶
func (c HostPathDevicePluginConfig) HostPathVolumeName() string
func (HostPathDevicePluginConfig) Socket ¶
func (c HostPathDevicePluginConfig) Socket() string
Click to show internal directories.
Click to hide internal directories.