Skip to content

Commit

Permalink
Merge pull request #1017 from marquiz/devel/nfd-api-optional-fields
Browse files Browse the repository at this point in the history
apis/nfd: make all fields in NodeFeatureSpec optional
  • Loading branch information
k8s-ci-robot authored Dec 27, 2022
2 parents 070dd3d + dfda9bc commit e97b2c1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
12 changes: 6 additions & 6 deletions deployment/base/nfd-crds/nfd-api-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ spec:
required:
- elements
type: object
description: Attributes contains all the attribute-type features
of the node.
type: object
flags:
additionalProperties:
Expand All @@ -67,6 +69,8 @@ spec:
required:
- elements
type: object
description: Flags contains all the flag-type features of the
node.
type: object
instances:
additionalProperties:
Expand All @@ -89,20 +93,16 @@ spec:
required:
- elements
type: object
description: Instances contains all the instance-type features
of the node.
type: object
required:
- attributes
- flags
- instances
type: object
labels:
additionalProperties:
type: string
description: Labels is the set of node labels that are requested to
be created.
type: object
required:
- features
type: object
required:
- spec
Expand Down
12 changes: 6 additions & 6 deletions deployment/helm/node-feature-discovery/crds/nfd-api-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ spec:
required:
- elements
type: object
description: Attributes contains all the attribute-type features
of the node.
type: object
flags:
additionalProperties:
Expand All @@ -67,6 +69,8 @@ spec:
required:
- elements
type: object
description: Flags contains all the flag-type features of the
node.
type: object
instances:
additionalProperties:
Expand All @@ -89,20 +93,16 @@ spec:
required:
- elements
type: object
description: Instances contains all the instance-type features
of the node.
type: object
required:
- attributes
- flags
- instances
type: object
labels:
additionalProperties:
type: string
description: Labels is the set of node labels that are requested to
be created.
type: object
required:
- features
type: object
required:
- spec
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/nfd/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions pkg/apis/nfd/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type NodeFeature struct {
// NodeFeatureSpec describes a NodeFeature object.
type NodeFeatureSpec struct {
// Features is the full "raw" features data that has been discovered.
// +optional
Features Features `json:"features"`
// Labels is the set of node labels that are requested to be created.
// +optional
Expand All @@ -56,9 +57,15 @@ type NodeFeatureSpec struct {
//
// +protobuf=true
type Features struct {
Flags map[string]FlagFeatureSet `json:"flags" protobuf:"bytes,1,rep,name=flags"`
// Flags contains all the flag-type features of the node.
// +optional
Flags map[string]FlagFeatureSet `json:"flags" protobuf:"bytes,1,rep,name=flags"`
// Attributes contains all the attribute-type features of the node.
// +optional
Attributes map[string]AttributeFeatureSet `json:"attributes" protobuf:"bytes,2,rep,name=vattributes"`
Instances map[string]InstanceFeatureSet `json:"instances" protobuf:"bytes,3,rep,name=instances"`
// Instances contains all the instance-type features of the node.
// +optional
Instances map[string]InstanceFeatureSet `json:"instances" protobuf:"bytes,3,rep,name=instances"`
}

// FlagFeatureSet is a set of simple features only containing names without values.
Expand Down

0 comments on commit e97b2c1

Please sign in to comment.