-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathfleet.d.ts
More file actions
111 lines (101 loc) · 2.57 KB
/
fleet.d.ts
File metadata and controls
111 lines (101 loc) · 2.57 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
declare type TSpotPolicy = 'spot' | 'on-demand' | 'auto';
declare type TFleetListRequestParams = TBaseRequestListParams & {
project_name?: string;
only_active?: boolean;
include_imported?: boolean;
};
declare interface ISSHHostParamsRequest {
hostname: string;
port?: number;
user?: string;
identity_file?: string;
ssh_key?: {
public: string;
private?: string;
};
}
declare interface ISSHConfig {
user?: string;
port?: number;
identity_file?: string;
ssh_key?: {
public: string;
private?: string;
};
hosts: (ISSHHostParamsRequest | string)[];
network?: string;
}
declare interface IFleetConfigurationResource {
cpu: string;
memory: string;
shm_size: number;
gpu: string;
disk: string;
}
declare interface IFleetConfigurationRequest {
type?: 'fleet';
name?: string;
ssh_config?: ISSHConfig;
nodes?: {
min?: number;
max?: number;
};
placement?: 'any' | 'cluster';
reservation?: string;
resources?: IFleetConfigurationResource[];
blocks?: string | number;
backends?: TBackendType[];
regions?: string[];
availability_zones?: string[];
instance_types?: string[];
spot_policy?: TSpotPolicy;
retry?:
| {
on_events: ('no-capacity' | 'interruption' | 'error')[];
duration?: number | string;
}
| boolean;
max_price?: number;
idle_duration?: number | string;
}
declare interface IProfileRequest {
backends?: TBackendType[];
regions?: string[];
instance_types?: string[];
spot_policy?: TSpotPolicy;
// retry?: components["schemas"]["ProfileRetryRequest"] | boolean;
retry_policy?: {
retry?: boolean;
duration?: number | string;
};
max_duration?: 'off' | string | number;
max_price?: number;
pool_name?: string;
instance_name?: string;
creation_policy?: 'reuse' | 'reuse-or-create';
idle_duration?: number | string;
name?: string;
default?: boolean;
}
declare interface IFleetSpec {
autocreated?: boolean;
configuration: IFleetConfigurationRequest;
configuration_path?: string;
profile: IProfileRequest;
}
declare interface IFleet {
id: string;
created_at: string;
instances: IInstance[];
name: string;
project_name: string;
spec: IFleetSpec;
status: 'submitted' | 'active' | 'terminating' | 'terminated' | 'failed';
status_message: string;
}
declare interface IApplyFleetPlanRequestRequest {
plan: {
spec: IFleetSpec;
};
force: boolean;
}