mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-09 18:27:01 +00:00
Add a new NodeFeature CRD to the nfd Kubernetes API to communicate node features over K8s api objects instead of gRPC. The new resource is namespaced which will help the management of multiple NodeFeature objects per node. This aims at enabling 3rd party detectors for custom features. In addition to communicating raw features the NodeFeature object also has a field for directly requesting labels that should be applied on the node object. Rename the crd deployment file to nfd-api-crds.yaml so that it matches the new content of the file. Also, rename the Helm subdir for CRDs to match the expected chart directory structure.
55 lines
2.3 KiB
Go
55 lines
2.3 KiB
Go
/*
|
|
Copyright 2022 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.
|
|
*/
|
|
|
|
package v1alpha1
|
|
|
|
const (
|
|
// FeatureLabelNs is the (default) namespace for feature labels.
|
|
FeatureLabelNs = "feature.node.kubernetes.io"
|
|
|
|
// FeatureLabelSubNsSuffix is the suffix for allowed feature label sub-namespaces.
|
|
FeatureLabelSubNsSuffix = "." + FeatureLabelNs
|
|
|
|
// ProfileLabelNs is the namespace for profile labels.
|
|
ProfileLabelNs = "profile.node.kubernetes.io"
|
|
|
|
// ProfileLabelSubNsSuffix is the suffix for allowed profile label sub-namespaces.
|
|
ProfileLabelSubNsSuffix = "." + ProfileLabelNs
|
|
|
|
// AnnotationNs namespace for all NFD-related annotations.
|
|
AnnotationNs = "nfd.node.kubernetes.io"
|
|
|
|
// ExtendedResourceAnnotation is the annotation that holds all extended resources managed by NFD.
|
|
ExtendedResourceAnnotation = AnnotationNs + "/extended-resources"
|
|
|
|
// FeatureLabelsAnnotation is the annotation that holds all feature labels managed by NFD.
|
|
FeatureLabelsAnnotation = AnnotationNs + "/feature-labels"
|
|
|
|
// MasterVersionAnnotation is the annotation that holds the version of nfd-master running on the node
|
|
MasterVersionAnnotation = AnnotationNs + "/master.version"
|
|
|
|
// WorkerVersionAnnotation is the annotation that holds the version of nfd-worker running on the node
|
|
WorkerVersionAnnotation = AnnotationNs + "/worker.version"
|
|
|
|
// NodeTaintsAnnotation is the annotation that holds the taints that nfd-master set on the node
|
|
NodeTaintsAnnotation = AnnotationNs + "/taints"
|
|
|
|
// NodeFeatureObjNodeNameLabel is the label that specifies which node the
|
|
// NodeFeature object is targeting. Creators of NodeFeature objects must
|
|
// set this label and consumers of the objects are supposed to use the
|
|
// label for filtering features designated for a certain node.
|
|
NodeFeatureObjNodeNameLabel = "nfd.node.kubernetes.io/node-name"
|
|
)
|