-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edge Node Clusters: nodes, volumes, replicas, upgrades
Node Info: role, age, ip Pod Info: status, restarts, ip Volume and Replica Info: rebuild progress, health Upgrade Status: cluster wide and node components Signed-off-by: Andrew Durbin <[email protected]>
- Loading branch information
1 parent
106b1d6
commit c33f9d5
Showing
1 changed file
with
236 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
// Copyright(c) 2024 Zededa, Inc. | ||
// All rights reserved. | ||
|
||
syntax = "proto3"; | ||
|
||
package org.lfedge.eve.info; | ||
option go_package = "github.com/lf-edge/eve-api/go/info"; | ||
option java_package = "org.lfedge.eve.info"; | ||
|
||
import "info/info.proto"; | ||
|
||
enum KubeNodeStatus { | ||
STATUS_UNKNOWN = 0; | ||
STATUS_READY = 1; | ||
STATUS_NOT_READY = 2; | ||
STATUS_SCHEDULING_DISABLED = 3; | ||
STATUS_OUT_OF_DISK = 4; | ||
STATUS_MEMORY_PRESSURE = 5; | ||
} | ||
|
||
message KubeNodeInfo { | ||
// Name of the node | ||
string name = 1; | ||
|
||
// Status of the node | ||
KubeNodeStatus status = 2; | ||
|
||
// Role of the node is server or not | ||
bool roleServer = 3; | ||
|
||
// Age of the node, in seconds ago | ||
uint64 age = 4; | ||
|
||
// Version of the API Server running on the node | ||
string apiServerVersion = 5; | ||
|
||
// Internal IP address of the node | ||
string internalIP = 6; | ||
} | ||
|
||
enum StorageHealthStatus { | ||
HEALTH_UNKNOWN = 0; | ||
HEALTH_HEALTHY = 1; | ||
HEALTH_DEGRAEDED_2_REPLICA_AVAILABLE_REPLICATING = 2; | ||
HEALTH_DEGRADED_2_REPLICA_AVAILABLE_NOT_REPLICATING = 3; | ||
HEALTH_DEGRADED_1_REPLICA_AVAILABLE_REPLICATING = 4; | ||
HEALTH_DEGRADED_1_REPLICA_AVAILABLE_NOT_REPLICATING = 5; | ||
HEALTH_FAILED = 6; | ||
} | ||
|
||
enum StorageVolumeState { | ||
VOLUME_STATUS_UNKNOWN = 0; | ||
VOLUME_STATUS_CREATING = 1; | ||
VOLUME_STATUS_ATTACHED = 2; | ||
VOLUME_STATUS_DETACHED = 3; | ||
VOLUME_STATUS_ATTACHING = 4; | ||
VOLUME_STATUS_DETACHING = 5; | ||
VOLUME_STATUS_DELETING = 6; | ||
} | ||
|
||
enum StorageVolumeRobustness { | ||
VOLUME_ROBUSTNESS_UNKNOWN = 0; | ||
VOLUME_ROBUSTNESS_HEALTHY = 1; | ||
VOLUME_ROBUSTNESS_DEGRADED = 2; | ||
VOLUME_ROBUSTNESS_FAULTED = 3; | ||
} | ||
|
||
enum StorageVolumePVCStatus { | ||
VOLUME_PVC_STATUS_UNKNOWN = 0; | ||
VOLUME_PVC_STATUS_BOUND = 1; | ||
VOLUME_PVC_STATUS_PENDING = 2; | ||
VOLUME_PVC_STATUS_AVAILABLE = 3; | ||
VOLUME_PVC_STATUS_RELEASED = 4; | ||
VOLUME_PVC_STATUS_FAILED = 5; | ||
} | ||
|
||
enum StorageVolumeReplicaStatus { | ||
VOLUME_REPLICA_STATUS_UNKNOWN = 0; | ||
VOLUME_REPLICA_STATUS_REBUILDING = 1; | ||
VOLUME_REPLICA_STATUS_ONLINE = 2; | ||
VOLUME_REPLICA_STATUS_FAILED = 3; | ||
} | ||
|
||
message KubePodNameSpaceInfo { | ||
// Name of the namespace | ||
string name = 1; | ||
|
||
// Number of pods in the namespace | ||
uint32 podCount = 2; | ||
|
||
// Number of pods in the namespace that are running | ||
uint32 podRunningCount = 3; | ||
|
||
// Number of pods in the namespace that are pending | ||
uint32 podPendingCount = 4; | ||
|
||
// Number of pods in the namespace that are failed | ||
uint32 podFailedCount = 5; | ||
|
||
// Number of pods in the namespace that are succeeded | ||
uint32 podSucceededCount = 6; | ||
} | ||
|
||
enum KubePodStatus { | ||
POD_STATUS_UNKNOWN = 0; | ||
POD_STATUS_PENDING = 1; | ||
POD_STATUS_RUNNING = 2; | ||
POD_STATUS_SUCCEEDED = 3; | ||
POD_STATUS_CONTAINER_CREATING = 4; | ||
POD_STATUS_CRASHLOOP_BACKOFF = 5; | ||
POD_STATUS_ERROR = 6; | ||
POD_STATUS_EVICTED = 7; | ||
POD_STATUS_FAILED = 8; | ||
} | ||
|
||
message KubeEVEAppPodInfo { | ||
// Name of the EVE application | ||
string name = 1; | ||
|
||
// Application Status | ||
KubePodStatus status = 2; | ||
|
||
// Restart count of the application | ||
uint32 restartCount = 3; | ||
|
||
// Restart time of the application, seconds ago | ||
uint64 restartTime = 4; | ||
|
||
// Age of the application, seconds ago | ||
uint64 age = 5; | ||
|
||
// IP address of the application, on cni0 interface | ||
string ipAddress = 6; | ||
|
||
// Node name on which the application is running | ||
string nodeName = 7; | ||
} | ||
|
||
message KubeVolumeReplicaInfo { | ||
// Name of the volume replica | ||
string name = 1; | ||
|
||
// Rebuild progress of the volume replica | ||
uint32 rebuildProgressPercentage = 2; | ||
|
||
// Replica status | ||
StorageVolumeReplicaStatus status = 3; | ||
} | ||
|
||
message KubeVolumeInfo { | ||
// Name of the volume | ||
string name = 1; | ||
|
||
// Status of the volume | ||
StorageVolumeState state = 2; | ||
|
||
// Robustness of the volume | ||
StorageVolumeRobustness robustness = 3; | ||
|
||
// Age of the volume, seconds ago | ||
uint64 age = 4; | ||
|
||
// Provisioned size of the volume in bytes | ||
uint64 provisionedBytes = 5; | ||
|
||
// Allocated size of the volume in bytes | ||
uint64 allocatedBytes = 6; | ||
|
||
// PV/PVC status of the volume | ||
StorageVolumePVCStatus pvcStatus = 7; | ||
|
||
// Replicas of the volume | ||
repeated KubeVolumeReplicaInfo replica = 8; | ||
} | ||
|
||
message KubeStorageInfo { | ||
// Overall status of Longhorn | ||
StorageHealthStatus health = 1; | ||
|
||
// time of the health status transition, seconds ago | ||
uint64 transitionTime = 2; | ||
|
||
// Status of all the volumes in Longhorn | ||
repeated KubeVolumeInfo volumes = 3; | ||
} | ||
|
||
enum KubeCompUpgradeStatus { | ||
KUBE_COMP_UPGRADE_STATUS_UNKNOWN = 0; | ||
KUBE_COMP_UPGRADE_STATUS_DOWNLOAD = 1; | ||
KUBE_COMP_UPGRADE_STATUS_DOWNLOAD_FAILED = 2; | ||
KUBE_COMP_UPGRADE_STATUS_IN_PROGRESS = 3; | ||
KUBE_COMP_UPGRADE_STATUS_FAILED = 4; | ||
KUBE_COMP_UPGRADE_STATUS_COMPLETED = 5; | ||
} | ||
|
||
enum KubeComp { | ||
COMP_UNKNOWN = 0; | ||
COMP_CONTAINERD = 1; //every node will publish | ||
COMP_K3S = 2; // every node will publish | ||
COMP_MULTUS = 3; // only the seed node will publish the remaining here and below | ||
COMP_KUBEVIRT = 4; | ||
COMP_CDI = 5; | ||
COMP_LONGHORN = 6; | ||
} | ||
|
||
message KubeClusterUpgradeStatus { | ||
// currentNode will have an empty value when no node is in an upgrade | ||
string currentNode = 1; | ||
|
||
// component currently under upgrade, COMP_UNKNOWN when no upgrades in progress | ||
KubeComp component = 2; | ||
|
||
// status of the current component under upgrade, KUBE_COMP_UPGRADE_STATUS_UNKNOWN when | ||
// no upgrades in progress | ||
KubeCompUpgradeStatus status = 3; | ||
|
||
// error info in case of failure | ||
ErrorInfo error = 4; | ||
} | ||
|
||
message KubeClusterInfo { | ||
// Info message on a list of cluster nodes | ||
repeated KubeNodeInfo nodes = 1; | ||
|
||
// Info message on a list of namespaces's pods summary | ||
repeated KubePodNameSpaceInfo podNameSpaces = 2; | ||
|
||
// Info message on a list of EVE applications | ||
repeated KubeEVEAppPodInfo eveApps = 3; | ||
|
||
// Info message on cluster storage | ||
KubeStorageInfo storage = 4; | ||
|
||
// The current status of the cluster upgrade | ||
KubeClusterUpgradeStatus upgrade = 5; | ||
} |