Documentation
¶
Index ¶
- type Builder
- func (builder *Builder) Create() (*Builder, error)
- func (builder *Builder) Delete() (*Builder, error)
- func (builder *Builder) Exists() bool
- func (builder *Builder) Get() (*nfdv1.NodeFeatureDiscovery, error)
- func (builder *Builder) Update(force bool) (*Builder, error)
- func (builder *Builder) UpdatePciDevices(deviceClassWhitelist []string, deviceLabelFields []string) error
- type CPUConfig
- type Config
- type PCIDevice
- type Sources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct { // Builder definition. Used to create // Builder object with minimum set of required elements. Definition *nfdv1.NodeFeatureDiscovery // Created Builder object on the cluster. Object *nfdv1.NodeFeatureDiscovery // contains filtered or unexported fields }
Builder provides a struct for NodeFeatureDiscovery object from the cluster and a NodeFeatureDiscovery definition.
func NewBuilderFromObjectString ¶
NewBuilderFromObjectString creates a Builder object from CSV alm-examples.
func (*Builder) Create ¶
Create makes a NodeFeatureDiscovery in the cluster and stores the created object in struct.
func (*Builder) Get ¶
func (builder *Builder) Get() (*nfdv1.NodeFeatureDiscovery, error)
Get returns NodeFeatureDiscovery object if found.
func (*Builder) Update ¶
Update renovates the existing NodeFeatureDiscovery object with the definition in builder.
func (*Builder) UpdatePciDevices ¶
func (builder *Builder) UpdatePciDevices(deviceClassWhitelist []string, deviceLabelFields []string) error
UpdatePciDevices updates the PCI device whitelist configuration in the worker config. Parameters:
- deviceClassWhitelist: List of PCI device class IDs to whitelist
- deviceLabelFields: List of fields to be used as labels for the PCI devices
Returns an error if the configuration update fails or if invalid parameters are provided.
type CPUConfig ¶
type CPUConfig struct { CPUID struct { AttributeBlacklist []string `yaml:"attributeBlacklist,omitempty"` AttributeWhitelist []string `yaml:"attributeWhitelist,omitempty"` } `yaml:"cpuid,omitempty"` }
CPUConfig cpu feature config.
type Config ¶
type Config struct {
Sources Sources `yaml:"sources"`
}
Config worker-config.
func (*Config) GetYamlString ¶
func (*Config) SetPciWhitelistConfig ¶
SetPciWhitelistConfig updates the PCI device whitelist and label fields.
type PCIDevice ¶
type PCIDevice struct { DeviceClassWhitelist []string `yaml:"deviceClassWhitelist,omitempty"` DeviceLabelFields []string `yaml:"deviceLabelFields,omitempty"` }
PCIDevice pci config.
type Sources ¶
type Sources struct { CPU *CPUConfig `yaml:"cpu,omitempty"` PCI *PCIDevice `yaml:"pci,omitempty"` USB []interface{} `yaml:"usb,omitempty"` // Add the necessary struct for USB if needed Custom []interface{} `yaml:"custom,omitempty"` // Add the necessary struct for Custom if needed }
Sources contains all sources.