config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

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