nfdmaster

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 53 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotations

type Annotations map[string]string

Annotations are used for NFD-related node metadata

type Args

type Args struct {
	CaFile               string
	CertFile             string
	ConfigFile           string
	Instance             string
	KeyFile              string
	Klog                 map[string]*utils.KlogFlagVal
	Kubeconfig           string
	CrdController        bool
	EnableNodeFeatureApi bool
	Port                 int
	// GrpcHealthPort is only needed to avoid races between tests (by skipping the health server).
	// Could be removed when gRPC labler service is dropped (when nfd-worker tests stop running nfd-master).
	GrpcHealthPort       int
	Prune                bool
	VerifyNodeName       bool
	Options              string
	EnableLeaderElection bool
	MetricsPort          int

	Overrides ConfigOverrideArgs
}

Args holds command line arguments

type ConfigOverrideArgs added in v0.13.0

type ConfigOverrideArgs struct {
	DenyLabelNs       *utils.StringSetVal
	ExtraLabelNs      *utils.StringSetVal
	LabelWhiteList    *utils.RegexpVal
	ResourceLabels    *utils.StringSetVal
	EnableTaints      *bool
	NoPublish         *bool
	ResyncPeriod      *utils.DurationVal
	NfdApiParallelism *int
}

ConfigOverrideArgs are args that override config file options

type ExtendedResources added in v0.6.0

type ExtendedResources map[string]string

ExtendedResources are k8s extended resources which are created from discovered features.

type Labels

type Labels map[string]string

Labels are a Kubernetes representation of discovered features.

type LeaderElectionConfig added in v0.14.0

type LeaderElectionConfig struct {
	LeaseDuration utils.DurationVal
	RenewDeadline utils.DurationVal
	RetryPeriod   utils.DurationVal
}

LeaderElectionConfig contains the configuration for leader election

type NFDConfig added in v0.13.0

type NFDConfig struct {
	AutoDefaultNs     bool
	DenyLabelNs       utils.StringSetVal
	ExtraLabelNs      utils.StringSetVal
	LabelWhiteList    *regexp.Regexp
	NoPublish         bool
	ResourceLabels    utils.StringSetVal
	EnableTaints      bool
	ResyncPeriod      utils.DurationVal
	LeaderElection    LeaderElectionConfig
	NfdApiParallelism int
	Klog              klogutils.KlogConfigOpts
}

NFDConfig contains the configuration settings of NfdMaster.

type NfdMaster

type NfdMaster interface {
	Run() error
	Stop()
	WaitForReady(time.Duration) bool
}

func NewNfdMaster

func NewNfdMaster(opts ...NfdMasterOption) (NfdMaster, error)

NewNfdMaster creates a new NfdMaster server instance.

type NfdMasterOption added in v0.16.6

type NfdMasterOption interface {
	// contains filtered or unexported methods
}

NfdMasterOption sets properties of the NfdMaster instance.

func WithArgs added in v0.16.6

func WithArgs(args *Args) NfdMasterOption

WithArgs is used for passing settings from command line arguments.

func WithKubernetesClient added in v0.16.6

func WithKubernetesClient(cli k8sclient.Interface) NfdMasterOption

WithKuberneteClient forces to use the given kubernetes client, without initializing one from kubeconfig.

Jump to

Keyboard shortcuts

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