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

PWX-29973 Add check result to StorageNode CRD #992

Merged
merged 1 commit into from
Mar 23, 2023
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
15 changes: 15 additions & 0 deletions deploy/crds/core_v1_storagenode_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ spec:
type: string
format: date-time
description: Time at which the condition changed.
checks:
type: array
description: Contains list of pre or post flight checks that are performed by the Operator
items:
type: object
properties:
type:
type: string
description: Type of the check.
reason:
type: string
description: Reason for success or failure of the check
success:
type: boolean
description: If true, the check was successful
geography:
type: object
description: Contains topology information for the storage node.
Expand Down
12 changes: 12 additions & 0 deletions pkg/apis/core/v1/storagenode.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ type NodeStatus struct {
Geo Geography `json:"geography,omitempty"`
// Conditions is an array of current node conditions
Conditions []NodeCondition `json:"conditions,omitempty"`
// Checks are a list of pre or post flight checks that are performed by the Operator
Checks []CheckResult `json:"checks,omitempty"`
}

// CheckResult captures result of a pre or post flight check
type CheckResult struct {
// Type is the type of check that was performed
Type string `json:"type,omitempty"`
// Reason is the reason for success or failure
Reason string `json:"reason,omitempty"`
// Success indicates if the check was successful or failed
Success bool `json:"success,omitempty"`
}

// NetworkStatus network status of the storage node
Expand Down
21 changes: 21 additions & 0 deletions pkg/apis/core/v1/zz_generated.deepcopy.go

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