Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct {
ConfigFile string
Klog map[string]*utils.KlogFlagVal
Kubeconfig string
Oneshot bool
Options string
Port int
NoOwnerRefs bool
Overrides ConfigOverrideArgs
}
Args are the command line arguments of NfdWorker.
type ConfigOverrideArgs ¶
type ConfigOverrideArgs struct {
NoPublish *bool
NoOwnerRefs *bool
FeatureSources *utils.StringSliceVal
LabelSources *utils.StringSliceVal
}
ConfigOverrideArgs are args that override config file options
type Labels ¶
Labels are a Kubernetes representation of discovered features.
func GetFeatureLabels ¶
func GetFeatureLabels(source source.LabelSource, labelWhiteList regexp.Regexp) (labels Labels, err error)
getFeatureLabels returns node labels for features discovered by the supplied source.
type NFDConfig ¶
type NFDConfig struct {
Core coreConfig
Sources sourcesConfig
}
NFDConfig contains the configuration settings of NfdWorker.
type NfdWorker ¶
type NfdWorker interface {
Run() error
Stop()
}
NfdWorker is the interface for nfd-worker daemon
func NewNfdWorker ¶
func NewNfdWorker(opts ...NfdWorkerOption) (NfdWorker, error)
NewNfdWorker creates new NfdWorker instance.
type NfdWorkerOption ¶
type NfdWorkerOption interface {
// contains filtered or unexported methods
}
NfdWorkerOption sets properties of the NfdWorker instance.
func WithArgs ¶
func WithArgs(args *Args) NfdWorkerOption
WithArgs is used for passing settings from command line arguments.
func WithKubernetesClient ¶
func WithKubernetesClient(cli k8sclient.Interface) NfdWorkerOption
WithKuberneteClient forces to use the given kubernetes client, without initializing one from kubeconfig.
func WithNFDClient ¶
func WithNFDClient(cli nfdclient.Interface) NfdWorkerOption
WithNFDClient forces to use the given client for the NFD API, without initializing one from kubeconfig.