nfdmaster

package
v0.0.0-...-d3d2dcc Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Overview

Copyright 2024 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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 {
	ConfigFile           string
	Instance             string
	Klog                 map[string]*utils.KlogFlagVal
	Kubeconfig           string
	Port                 int
	Prune                bool
	Options              string
	EnableLeaderElection bool
	MetricsPort          int

	Overrides ConfigOverrideArgs
}

Args holds command line arguments

type ConfigOverrideArgs

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

ConfigOverrideArgs are args that override config file options

type ExtendedResources

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

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

LeaderElectionConfig contains the configuration for leader election

type NFDConfig

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

NFDConfig contains the configuration settings of NfdMaster.

type NamespaceLister

type NamespaceLister struct {
	// contains filtered or unexported fields
}

NamespaceLister lists kubernetes namespaces.

type NfdMaster

type NfdMaster interface {
	Run() error
	Stop()
}

func NewNfdMaster

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

NewNfdMaster creates a new NfdMaster server instance.

type NfdMasterOption

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

NfdMasterOption sets properties of the NfdMaster instance.

func WithArgs

func WithArgs(args *Args) NfdMasterOption

WithArgs is used for passing settings from command line arguments.

func WithKubernetesClient

func WithKubernetesClient(cli k8sclient.Interface) NfdMasterOption

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

type Restrictions

type Restrictions struct {
	NodeFeatureNamespaceSelector *metav1.LabelSelector
	DisableLabels                bool
	DisableExtendedResources     bool
	DisableAnnotations           bool
	DenyNodeFeatureLabels        bool
	AllowOverwrite               bool
}

Restrictions contains the restrictions on the NF and NFR Crs

Jump to

Keyboard shortcuts

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