mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
Merge pull request #1714 from marquiz/devel/api-document-fields
api/nfd: document all undocumented fields in the types
This commit is contained in:
commit
80d74cd24d
3 changed files with 44 additions and 7 deletions
|
@ -28,6 +28,7 @@ type NodeFeatureList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
|
|
||||||
|
// List of NodeFeatures.
|
||||||
Items []NodeFeature `json:"items"`
|
Items []NodeFeature `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +41,7 @@ type NodeFeature struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
|
// Specification of the NodeFeature, containing features discovered for a node.
|
||||||
Spec NodeFeatureSpec `json:"spec"`
|
Spec NodeFeatureSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +74,7 @@ type Features struct {
|
||||||
//
|
//
|
||||||
// +protobuf=true
|
// +protobuf=true
|
||||||
type FlagFeatureSet struct {
|
type FlagFeatureSet struct {
|
||||||
|
// Individual features of the feature set.
|
||||||
Elements map[string]Nil `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
Elements map[string]Nil `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +82,7 @@ type FlagFeatureSet struct {
|
||||||
//
|
//
|
||||||
// +protobuf=true
|
// +protobuf=true
|
||||||
type AttributeFeatureSet struct {
|
type AttributeFeatureSet struct {
|
||||||
|
// Individual features of the feature set.
|
||||||
Elements map[string]string `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
Elements map[string]string `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +90,7 @@ type AttributeFeatureSet struct {
|
||||||
//
|
//
|
||||||
// +protobuf=true
|
// +protobuf=true
|
||||||
type InstanceFeatureSet struct {
|
type InstanceFeatureSet struct {
|
||||||
|
// Individual features of the feature set.
|
||||||
Elements []InstanceFeature `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
Elements []InstanceFeature `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +98,7 @@ type InstanceFeatureSet struct {
|
||||||
//
|
//
|
||||||
// +protobuf=true
|
// +protobuf=true
|
||||||
type InstanceFeature struct {
|
type InstanceFeature struct {
|
||||||
|
// Attributes of the instance feature.
|
||||||
Attributes map[string]string `json:"attributes" protobuf:"bytes,1,rep,name=attributes"`
|
Attributes map[string]string `json:"attributes" protobuf:"bytes,1,rep,name=attributes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +114,7 @@ type NodeFeatureRuleList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
|
|
||||||
|
// List of NodeFeatureRules.
|
||||||
Items []NodeFeatureRule `json:"items"`
|
Items []NodeFeatureRule `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +129,7 @@ type NodeFeatureRule struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
|
// Spec defines the rules to be evaluated.
|
||||||
Spec NodeFeatureRuleSpec `json:"spec"`
|
Spec NodeFeatureRuleSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,12 +149,17 @@ type NodeFeatureGroup struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
Spec NodeFeatureGroupSpec `json:"spec"`
|
// Spec defines the rules to be evaluated.
|
||||||
|
Spec NodeFeatureGroupSpec `json:"spec"`
|
||||||
|
|
||||||
|
// Status of the NodeFeatureGroup after the most recent evaluation of the
|
||||||
|
// specification.
|
||||||
Status NodeFeatureGroupStatus `json:"status,omitempty"`
|
Status NodeFeatureGroupStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NodeFeatureGroupSpec describes a NodeFeatureGroup object.
|
// NodeFeatureGroupSpec describes a NodeFeatureGroup object.
|
||||||
type NodeFeatureGroupSpec struct {
|
type NodeFeatureGroupSpec struct {
|
||||||
|
// List of rules to evaluate to determine nodes that belong in this group.
|
||||||
Rules []GroupRule `json:"featureGroupRules"`
|
Rules []GroupRule `json:"featureGroupRules"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +174,7 @@ type NodeFeatureGroupStatus struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type FeatureGroupNode struct {
|
type FeatureGroupNode struct {
|
||||||
|
// Name of the node.
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +185,7 @@ type NodeFeatureGroupList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
|
|
||||||
|
// List of NodeFeatureGroups.
|
||||||
Items []NodeFeatureGroup `json:"items"`
|
Items []NodeFeatureGroup `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: NodeFeatureSpec describes a NodeFeature object.
|
description: Specification of the NodeFeature, containing features discovered
|
||||||
|
for a node.
|
||||||
properties:
|
properties:
|
||||||
features:
|
features:
|
||||||
description: Features is the full "raw" features data that has been
|
description: Features is the full "raw" features data that has been
|
||||||
|
@ -53,6 +54,7 @@ spec:
|
||||||
elements:
|
elements:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
|
description: Individual features of the feature set.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- elements
|
- elements
|
||||||
|
@ -70,6 +72,7 @@ spec:
|
||||||
description: Nil is a dummy empty struct for protobuf
|
description: Nil is a dummy empty struct for protobuf
|
||||||
compatibility
|
compatibility
|
||||||
type: object
|
type: object
|
||||||
|
description: Individual features of the feature set.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- elements
|
- elements
|
||||||
|
@ -83,6 +86,7 @@ spec:
|
||||||
which is an instance having multiple attributes.
|
which is an instance having multiple attributes.
|
||||||
properties:
|
properties:
|
||||||
elements:
|
elements:
|
||||||
|
description: Individual features of the feature set.
|
||||||
items:
|
items:
|
||||||
description: InstanceFeature represents one instance of
|
description: InstanceFeature represents one instance of
|
||||||
a complex features, e.g. a device.
|
a complex features, e.g. a device.
|
||||||
|
@ -90,6 +94,7 @@ spec:
|
||||||
attributes:
|
attributes:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
|
description: Attributes of the instance feature.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- attributes
|
- attributes
|
||||||
|
@ -155,9 +160,11 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: NodeFeatureGroupSpec describes a NodeFeatureGroup object.
|
description: Spec defines the rules to be evaluated.
|
||||||
properties:
|
properties:
|
||||||
featureGroupRules:
|
featureGroupRules:
|
||||||
|
description: List of rules to evaluate to determine nodes that belong
|
||||||
|
in this group.
|
||||||
items:
|
items:
|
||||||
description: GroupRule defines a rule for nodegroup filtering.
|
description: GroupRule defines a rule for nodegroup filtering.
|
||||||
properties:
|
properties:
|
||||||
|
@ -356,6 +363,9 @@ spec:
|
||||||
- featureGroupRules
|
- featureGroupRules
|
||||||
type: object
|
type: object
|
||||||
status:
|
status:
|
||||||
|
description: |-
|
||||||
|
Status of the NodeFeatureGroup after the most recent evaluation of the
|
||||||
|
specification.
|
||||||
properties:
|
properties:
|
||||||
nodes:
|
nodes:
|
||||||
description: Nodes is a list of FeatureGroupNode in the cluster that
|
description: Nodes is a list of FeatureGroupNode in the cluster that
|
||||||
|
@ -363,6 +373,7 @@ spec:
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
|
description: Name of the node.
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
|
@ -422,7 +433,7 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: NodeFeatureRuleSpec describes a NodeFeatureRule.
|
description: Spec defines the rules to be evaluated.
|
||||||
properties:
|
properties:
|
||||||
rules:
|
rules:
|
||||||
description: Rules is a list of node customization rules.
|
description: Rules is a list of node customization rules.
|
||||||
|
|
|
@ -39,7 +39,8 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: NodeFeatureSpec describes a NodeFeature object.
|
description: Specification of the NodeFeature, containing features discovered
|
||||||
|
for a node.
|
||||||
properties:
|
properties:
|
||||||
features:
|
features:
|
||||||
description: Features is the full "raw" features data that has been
|
description: Features is the full "raw" features data that has been
|
||||||
|
@ -53,6 +54,7 @@ spec:
|
||||||
elements:
|
elements:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
|
description: Individual features of the feature set.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- elements
|
- elements
|
||||||
|
@ -70,6 +72,7 @@ spec:
|
||||||
description: Nil is a dummy empty struct for protobuf
|
description: Nil is a dummy empty struct for protobuf
|
||||||
compatibility
|
compatibility
|
||||||
type: object
|
type: object
|
||||||
|
description: Individual features of the feature set.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- elements
|
- elements
|
||||||
|
@ -83,6 +86,7 @@ spec:
|
||||||
which is an instance having multiple attributes.
|
which is an instance having multiple attributes.
|
||||||
properties:
|
properties:
|
||||||
elements:
|
elements:
|
||||||
|
description: Individual features of the feature set.
|
||||||
items:
|
items:
|
||||||
description: InstanceFeature represents one instance of
|
description: InstanceFeature represents one instance of
|
||||||
a complex features, e.g. a device.
|
a complex features, e.g. a device.
|
||||||
|
@ -90,6 +94,7 @@ spec:
|
||||||
attributes:
|
attributes:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
|
description: Attributes of the instance feature.
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- attributes
|
- attributes
|
||||||
|
@ -155,9 +160,11 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: NodeFeatureGroupSpec describes a NodeFeatureGroup object.
|
description: Spec defines the rules to be evaluated.
|
||||||
properties:
|
properties:
|
||||||
featureGroupRules:
|
featureGroupRules:
|
||||||
|
description: List of rules to evaluate to determine nodes that belong
|
||||||
|
in this group.
|
||||||
items:
|
items:
|
||||||
description: GroupRule defines a rule for nodegroup filtering.
|
description: GroupRule defines a rule for nodegroup filtering.
|
||||||
properties:
|
properties:
|
||||||
|
@ -356,6 +363,9 @@ spec:
|
||||||
- featureGroupRules
|
- featureGroupRules
|
||||||
type: object
|
type: object
|
||||||
status:
|
status:
|
||||||
|
description: |-
|
||||||
|
Status of the NodeFeatureGroup after the most recent evaluation of the
|
||||||
|
specification.
|
||||||
properties:
|
properties:
|
||||||
nodes:
|
nodes:
|
||||||
description: Nodes is a list of FeatureGroupNode in the cluster that
|
description: Nodes is a list of FeatureGroupNode in the cluster that
|
||||||
|
@ -363,6 +373,7 @@ spec:
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
|
description: Name of the node.
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
|
@ -422,7 +433,7 @@ spec:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: NodeFeatureRuleSpec describes a NodeFeatureRule.
|
description: Spec defines the rules to be evaluated.
|
||||||
properties:
|
properties:
|
||||||
rules:
|
rules:
|
||||||
description: Rules is a list of node customization rules.
|
description: Rules is a list of node customization rules.
|
||||||
|
|
Loading…
Reference in a new issue