feat(settings): Add runtime settings management, node & baremetal managers, and settings UI
This commit is contained in:
71
ts_interfaces/data/clusternode.ts
Normal file
71
ts_interfaces/data/clusternode.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IClusterNodeMetrics {
|
||||
cpuUsagePercent: number;
|
||||
memoryUsedMB: number;
|
||||
memoryAvailableMB: number;
|
||||
diskUsedGB: number;
|
||||
diskAvailableGB: number;
|
||||
containerCount: number;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export interface IClusterNode {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* Reference to the cluster this node belongs to
|
||||
*/
|
||||
clusterId: string;
|
||||
|
||||
/**
|
||||
* Reference to the physical server (if applicable)
|
||||
*/
|
||||
baremetalId?: string;
|
||||
|
||||
/**
|
||||
* Type of node
|
||||
*/
|
||||
nodeType: 'baremetal' | 'vm' | 'container';
|
||||
|
||||
/**
|
||||
* Current status of the node
|
||||
*/
|
||||
status: 'initializing' | 'online' | 'offline' | 'maintenance';
|
||||
|
||||
/**
|
||||
* Role of the node in the cluster
|
||||
*/
|
||||
role: 'master' | 'worker';
|
||||
|
||||
/**
|
||||
* Timestamp when node joined the cluster
|
||||
*/
|
||||
joinedAt: number;
|
||||
|
||||
/**
|
||||
* Last health check timestamp
|
||||
*/
|
||||
lastHealthCheck: number;
|
||||
|
||||
/**
|
||||
* Current metrics for the node
|
||||
*/
|
||||
metrics?: IClusterNodeMetrics;
|
||||
|
||||
/**
|
||||
* Docker swarm node ID if part of swarm
|
||||
*/
|
||||
swarmNodeId?: string;
|
||||
|
||||
/**
|
||||
* SSH keys deployed to this node
|
||||
*/
|
||||
sshKeys: plugins.tsclass.network.ISshKey[];
|
||||
|
||||
/**
|
||||
* Debian packages installed on this node
|
||||
*/
|
||||
requiredDebianPackages: string[];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user