Skip to content

Commit

Permalink
remove legacy structures from KataConfig.status definition
Browse files Browse the repository at this point in the history
They are not used by anything anymore.

Signed-off-by: Pavel Mores <pmores@redhat.com>
  • Loading branch information
pmores committed Jul 11, 2023
1 parent b1ebd52 commit 8e75a72
Showing 1 changed file with 0 additions and 100 deletions.
100 changes: 0 additions & 100 deletions api/v1/kataconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,6 @@ type KataConfigStatus struct {
// RuntimeClass is the name of the runtime class used in CRIO configuration
RuntimeClass string `json:"runtimeClass"`

// TotalNodesCounts is the total number of worker nodes targeted by this CR
TotalNodesCount int `json:"totalNodesCount"`

// InstallationStatus reflects the status of the ongoing kata installation
// +optional
InstallationStatus KataInstallationStatus `json:"installationStatus,omitempty"`

// UnInstallationStatus reflects the status of the ongoing kata uninstallation
// +optional
UnInstallationStatus KataUnInstallationStatus `json:"unInstallationStatus,omitempty"`

// Upgradestatus reflects the status of the ongoing kata upgrade
// +optional
Upgradestatus KataUpgradeStatus `json:"upgradeStatus,omitempty"`

// +optional
KataNodes KataNodesStatus `json:"kataNodes,omitempty"`

Expand Down Expand Up @@ -112,91 +97,6 @@ func init() {
SchemeBuilder.Register(&KataConfig{}, &KataConfigList{})
}

// KataInstallationStatus reflects the status of the ongoing kata installation
type KataInstallationStatus struct {
// InProgress reflects the status of nodes that are in the process of kata installation
InProgress KataInstallationInProgressStatus `json:"inprogress,omitempty"`

// IsInProgress reflects the current state of installing or not installing
IsInProgress corev1.ConditionStatus `json:"IsInProgress,omit"`

// Completed reflects the status of nodes that have completed kata installation
Completed KataConfigCompletedStatus `json:"completed,omitempty"`

// Failed reflects the status of nodes that have failed kata installation
Failed KataFailedNodeStatus `json:"failed,omitempty"`
}

// KataInstallationInProgressStatus reflects the status of nodes that are in the process of kata installation
type KataInstallationInProgressStatus struct {
// InProgressNodesCount reflects the number of nodes that are in the process of kata installation
InProgressNodesCount int `json:"inProgressNodesCount,omitempty"`
// IsInProgress reflects if installation is still in progress
IsInProgress bool `json:"isInProgress,omitempty"`
// +optional
BinariesInstalledNodesList []string `json:"binariesInstallNodesList,omitempty"`
}

// KataConfigCompletedStatus reflects the status of nodes that have completed kata operation
type KataConfigCompletedStatus struct {
// CompletedNodesCount reflects the number of nodes that have completed kata operation
CompletedNodesCount int `json:"completedNodesCount,omitempty"`

// CompletedNodesList reflects the list of nodes that have completed kata operation
// +optional
CompletedNodesList []string `json:"completedNodesList,omitempty"`
}

// KataFailedNodeStatus reflects the status of nodes that have failed kata operation
type KataFailedNodeStatus struct {
// FailedNodesCount reflects the number of nodes that have failed kata operation
FailedNodesCount int `json:"failedNodesCount,omitempty"`
FailedReason string `json:"failedNodesReason,omitempty"`

// FailedNodesList reflects the list of nodes that have failed kata operation
// +optional
FailedNodesList []FailedNodeStatus `json:"failedNodesList,omitempty"`
}

// KataUnInstallationStatus reflects the status of the ongoing kata uninstallation
type KataUnInstallationStatus struct {
// InProgress reflects the status of nodes that are in the process of kata uninstallation
InProgress KataUnInstallationInProgressStatus `json:"inProgress,omitempty"`

// Completed reflects the status of nodes that have completed kata uninstallation
Completed KataConfigCompletedStatus `json:"completed,omitempty"`

// Failed reflects the status of nodes that have failed kata uninstallation
Failed KataFailedNodeStatus `json:"failed,omitempty"`

// Stores an error message if any. Note that this is currently meant for a single
// failure source when kata uninstallation is blocked by existing kata-based pods, so
// handling of this field in the controller code is correspondingly simple. A review
// might be necessary if this field were ever to store messages coming from another
// source.
ErrorMessage string `json:"errorMessage,omitempty"`
}

// KataUnInstallationInProgressStatus reflects the status of nodes that are in the process of kata installation
type KataUnInstallationInProgressStatus struct {
InProgressNodesCount int `json:"inProgressNodesCount,omitempty"`
IsInProgress corev1.ConditionStatus `json:"status"`
// +optional
BinariesUnInstalledNodesList []string `json:"binariesUninstallNodesList,omitempty"`
}

// KataUpgradeStatus reflects the status of the ongoing kata upgrade
type KataUpgradeStatus struct {
}

// FailedNodeStatus holds the name and the error message of the failed node
type FailedNodeStatus struct {
// Name of the failed node
Name string `json:"name"`
// Error message of the failed node reported by the installation daemon
Error string `json:"error"`
}

type KataNodesStatus struct {
// Number of cluster nodes that have kata installed on them including
// those queued for installation and currently installing, though
Expand Down

0 comments on commit 8e75a72

Please sign in to comment.