Skip to content

Commit

Permalink
apis/nfd: Add Status to NodeFeature CRD
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Zhurakivskyy <[email protected]>
  • Loading branch information
ozhuraki committed Jan 2, 2025
1 parent 00ecb01 commit b281656
Show file tree
Hide file tree
Showing 35 changed files with 143 additions and 42 deletions.
2 changes: 1 addition & 1 deletion api/generated/clientset/versioned/clientset.go

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

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

2 changes: 1 addition & 1 deletion api/generated/clientset/versioned/fake/doc.go

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

2 changes: 1 addition & 1 deletion api/generated/clientset/versioned/fake/register.go

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

2 changes: 1 addition & 1 deletion api/generated/clientset/versioned/scheme/doc.go

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

2 changes: 1 addition & 1 deletion api/generated/clientset/versioned/scheme/register.go

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

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

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

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

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

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

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

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

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

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

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

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

2 changes: 1 addition & 1 deletion api/generated/informers/externalversions/factory.go

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

2 changes: 1 addition & 1 deletion api/generated/informers/externalversions/generic.go

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

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

2 changes: 1 addition & 1 deletion api/generated/informers/externalversions/nfd/interface.go

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

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

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

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

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

2 changes: 1 addition & 1 deletion api/generated/listers/nfd/v1alpha1/expansion_generated.go

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

2 changes: 1 addition & 1 deletion api/generated/listers/nfd/v1alpha1/nodefeature.go

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

2 changes: 1 addition & 1 deletion api/generated/listers/nfd/v1alpha1/nodefeaturegroup.go

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

2 changes: 1 addition & 1 deletion api/generated/listers/nfd/v1alpha1/nodefeaturerule.go

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

17 changes: 17 additions & 0 deletions api/nfd/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type NodeFeature struct {

// Specification of the NodeFeature, containing features discovered for a node.
Spec NodeFeatureSpec `json:"spec"`
Status NodeFeatureStatus `json:"status"`
}

// NodeFeatureSpec describes a NodeFeature object.
Expand All @@ -55,6 +56,22 @@ type NodeFeatureSpec struct {
Labels map[string]string `json:"labels"`
}

// Status of a NodeFeature object.
type NodeFeatureStatus struct {
// UTC time when the NodeFeature object was last updated.
// +optional
LastAppliedAt metav1.Time `json:"lastAppliedAt,omitempty"`
// +optional
// Number of features discovered.
NumberOfFeatures int `json:"numberOfFeatures,omitempty"`
// +optional
// Number of errors during last feature discovery.
NumberOfFeatureErrors int `json:"numberOfFeatureErrors,omitempty"`
// +optional
// Number of labels created.
NumberOfLabels int `json:"numberOfLabels,omitempty"`
}

// Features is the collection of all discovered features.
type Features struct {
// Flags contains all the flag-type features of the node.
Expand Down
20 changes: 19 additions & 1 deletion api/nfd/v1alpha1/zz_generated.deepcopy.go

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

18 changes: 18 additions & 0 deletions deployment/base/nfd-crds/nfd-api-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,26 @@ spec:
be created.
type: object
type: object
status:
description: Status of a NodeFeature object.
properties:
lastAppliedAt:
description: UTC time when the NodeFeature object was last updated.
format: date-time
type: string
numberOfFeatureErrors:
description: Number of errors during last feature discovery.
type: integer
numberOfFeatures:
description: Number of features discovered.
type: integer
numberOfLabels:
description: Number of labels created.
type: integer
type: object
required:
- spec
- status
type: object
served: true
storage: true
Expand Down
18 changes: 18 additions & 0 deletions deployment/helm/node-feature-discovery/crds/nfd-api-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,26 @@ spec:
be created.
type: object
type: object
status:
description: Status of a NodeFeature object.
properties:
lastAppliedAt:
description: UTC time when the NodeFeature object was last updated.
format: date-time
type: string
numberOfFeatureErrors:
description: Number of errors during last feature discovery.
type: integer
numberOfFeatures:
description: Number of features discovered.
type: integer
numberOfLabels:
description: Number of labels created.
type: integer
type: object
required:
- spec
- status
type: object
served: true
storage: true
Expand Down
Loading

0 comments on commit b281656

Please sign in to comment.