Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apis/nfd: make all fields in NodeFeatureSpec optional #1017

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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