-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
30 lines (26 loc) · 972 Bytes
/
types.ts
File metadata and controls
30 lines (26 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { KubernetesObject } from '@kubernetes/client-node';
export interface NodeGroupSpec {
flavor?: 'XS' | 'xs' | 'S' | 's' | 'M' | 'm' | 'L' | 'l' | 'XL' | 'xl';
id?: string;
nodeCount: number;
}
export interface NodeGroupStatus {
nodeCount?: number;
}
export interface NodeGroup extends KubernetesObject {
apiVersion: 'api.clever-cloud.com/v1';
kind: 'NodeGroup';
spec: NodeGroupSpec;
status?: NodeGroupStatus;
}
export interface AutoscalerConfig {
cpuThresholdHigh: number; // Scale up when CPU > this (%)
cpuThresholdLow: number; // Scale down when CPU < this (%)
memoryThresholdHigh: number; // Scale up when memory > this (%)
memoryThresholdLow: number; // Scale down when memory < this (%)
minNodes: number;
maxNodes: number;
reconcileIntervalSeconds: number;
cooldownSeconds: number; // Wait this long after scaling before scaling again
targetNodeGroup?: string; // Optional: only autoscale this specific NodeGroup
}