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 ¶
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
// 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
Options string
EnableLeaderElection bool
MetricsPort int
Overrides ConfigOverrideArgs
}
Args holds command line arguments
type ConfigOverrideArgs ¶ added in v0.19.4
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.19.4
ExtendedResources are k8s extended resources which are created from discovered features.
type LeaderElectionConfig ¶ added in v0.19.4
type LeaderElectionConfig struct {
LeaseDuration utils.DurationVal
RenewDeadline utils.DurationVal
RetryPeriod utils.DurationVal
}
LeaderElectionConfig contains the configuration for leader election
type NFDConfig ¶ added in v0.19.4
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
Restrictions Restrictions
}
NFDConfig contains the configuration settings of NfdMaster.
type NamespaceLister ¶ added in v0.19.4
type NamespaceLister struct {
// contains filtered or unexported fields
}
NamespaceLister lists kubernetes namespaces.
type NfdMaster ¶
func NewNfdMaster ¶
func NewNfdMaster(opts ...NfdMasterOption) (NfdMaster, error)
NewNfdMaster creates a new NfdMaster server instance.
type NfdMasterOption ¶ added in v0.19.4
type NfdMasterOption interface {
// contains filtered or unexported methods
}
NfdMasterOption sets properties of the NfdMaster instance.
func WithArgs ¶ added in v0.19.4
func WithArgs(args *Args) NfdMasterOption
WithArgs is used for passing settings from command line arguments.
func WithKubernetesClient ¶ added in v0.19.4
func WithKubernetesClient(cli k8sclient.Interface) NfdMasterOption
WithKuberneteClient forces to use the given kubernetes client, without initializing one from kubeconfig.
type Restrictions ¶ added in v0.19.4
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