Documentation ¶
Index ¶
Constants ¶
const DeviceAnnotationDelim = ","
DeviceAnnotationDelim is the character used to separate devices in the annotation `io.kubernetes.cri-o.Devices`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the internal device configuration it holds onto the contents of the additional_devices field, allowing admins to configure devices that are given to all containers.
func (*Config) LoadDevices ¶
LoadDevices takes a slice of strings of additional_devices specified in the config. It saves the resulting Device structs, so they are processed once and used later.
type Device ¶
type Device struct { Device rspec.LinuxDevice Resource rspec.LinuxDeviceCgroup }
Device holds the runtime spec fields needed for a device
func DevicesFromAnnotation ¶
DevicesFromAnnotation takes an annotation string of the form io.kubernetes.cri-o.Device=$PATH:$PATH:$MODE,$PATH... and returns a Device object that can be passed to a create config