@controlplane/schema 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/interfaces/base.d.ts +6 -2
- package/build/src/interfaces/command.d.ts +25 -19
- package/build/src/interfaces/containerstatus.d.ts +6 -0
- package/build/src/interfaces/crmevent.d.ts +39 -0
- package/build/src/interfaces/crmevent.js +3 -0
- package/build/src/interfaces/cronjob.d.ts +3 -2
- package/build/src/interfaces/deployment.d.ts +1 -0
- package/build/src/interfaces/discovery.d.ts +1 -0
- package/build/src/interfaces/domain.d.ts +19 -3
- package/build/src/interfaces/envoyCommon.d.ts +5 -4
- package/build/src/interfaces/envoyHttp.d.ts +1 -1
- package/build/src/interfaces/event.d.ts +2 -2
- package/build/src/interfaces/gvc.d.ts +15 -0
- package/build/src/interfaces/identity.d.ts +9 -1
- package/build/src/interfaces/internal.d.ts +0 -0
- package/build/src/interfaces/internal.js +2 -0
- package/build/src/interfaces/ipSet.d.ts +37 -0
- package/build/src/interfaces/ipSet.js +3 -0
- package/build/src/interfaces/locationDns.d.ts +11 -0
- package/build/src/interfaces/locationDns.js +3 -0
- package/build/src/interfaces/mk8s.d.ts +14 -3
- package/build/src/interfaces/mk8sAddons.d.ts +10 -0
- package/build/src/interfaces/mk8sAws.d.ts +11 -2
- package/build/src/interfaces/mk8sAzure.d.ts +53 -0
- package/build/src/interfaces/mk8sAzure.js +3 -0
- package/build/src/interfaces/mk8sCommon.d.ts +27 -1
- package/build/src/interfaces/mk8sDigitalOcean.d.ts +32 -0
- package/build/src/interfaces/mk8sDigitalOcean.js +3 -0
- package/build/src/interfaces/mk8sGcp.d.ts +45 -0
- package/build/src/interfaces/mk8sGcp.js +3 -0
- package/build/src/interfaces/mk8sGeneric.d.ts +1 -0
- package/build/src/interfaces/mk8sHetzner.d.ts +9 -4
- package/build/src/interfaces/mk8sLambdalabs.d.ts +7 -4
- package/build/src/interfaces/mk8sLinode.d.ts +13 -5
- package/build/src/interfaces/mk8sOblivus.d.ts +14 -2
- package/build/src/interfaces/mk8sPaperspace.d.ts +6 -1
- package/build/src/interfaces/mk8sTriton.d.ts +73 -0
- package/build/src/interfaces/mk8sTriton.js +3 -0
- package/build/src/interfaces/org.d.ts +5 -2
- package/build/src/interfaces/outboxmessage.d.ts +6 -0
- package/build/src/interfaces/outboxmessage.js +3 -0
- package/build/src/interfaces/permissions.d.ts +1 -1
- package/build/src/interfaces/query.d.ts +4 -0
- package/build/src/interfaces/volumeSet.d.ts +34 -14
- package/build/src/interfaces/workload.d.ts +186 -13
- package/build/src/interfaces/workloadOptions.d.ts +65 -5
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Port } from './port';
|
|
2
2
|
import { EnvVar } from './env';
|
|
3
3
|
import { VolumeSpec } from './volumeSpec';
|
|
4
|
+
import { Regex, Kind, Tags, Links } from './base';
|
|
4
5
|
import { DefaultOptions, LocalOptions } from './workloadOptions';
|
|
5
6
|
import { EnvoyFilters } from './envoy';
|
|
6
|
-
import { Kind, Tags, Links } from './base';
|
|
7
7
|
export type Memory = string;
|
|
8
8
|
export type Cpu = string;
|
|
9
9
|
export interface HealthCheckSpec {
|
|
@@ -36,15 +36,28 @@ export interface RolloutOptions {
|
|
|
36
36
|
maxUnavailableReplicas?: string;
|
|
37
37
|
maxSurgeReplicas?: string;
|
|
38
38
|
scalingPolicy?: 'OrderedReady' | 'Parallel';
|
|
39
|
+
terminationGracePeriodSeconds?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface RolloutOptionsStateful {
|
|
42
|
+
minReadySeconds?: number;
|
|
43
|
+
maxSurgeReplicas?: string;
|
|
44
|
+
scalingPolicy?: 'OrderedReady' | 'Parallel';
|
|
45
|
+
terminationGracePeriodSeconds?: number;
|
|
46
|
+
maxUnavailableReplicas?: string;
|
|
39
47
|
}
|
|
40
48
|
export interface SecurityOptions {
|
|
41
49
|
filesystemGroupId?: number;
|
|
42
50
|
}
|
|
43
51
|
export interface GpuResource {
|
|
44
|
-
nvidia
|
|
52
|
+
nvidia?: {
|
|
45
53
|
model?: any;
|
|
46
54
|
quantity?: number;
|
|
47
55
|
};
|
|
56
|
+
custom?: {
|
|
57
|
+
resource: string;
|
|
58
|
+
runtimeClass?: string;
|
|
59
|
+
quantity?: number;
|
|
60
|
+
};
|
|
48
61
|
}
|
|
49
62
|
export interface ContainerSpec {
|
|
50
63
|
name?: string;
|
|
@@ -115,10 +128,15 @@ export interface ContainerSpec {
|
|
|
115
128
|
minMemory?: string;
|
|
116
129
|
env?: EnvVar[];
|
|
117
130
|
gpu?: {
|
|
118
|
-
nvidia
|
|
131
|
+
nvidia?: {
|
|
119
132
|
model?: any;
|
|
120
133
|
quantity?: number;
|
|
121
134
|
};
|
|
135
|
+
custom?: {
|
|
136
|
+
resource: string;
|
|
137
|
+
runtimeClass?: string;
|
|
138
|
+
quantity?: number;
|
|
139
|
+
};
|
|
122
140
|
};
|
|
123
141
|
inheritEnv?: boolean;
|
|
124
142
|
command?: string;
|
|
@@ -146,6 +164,10 @@ export interface HealthCheckStatus {
|
|
|
146
164
|
successes?: number;
|
|
147
165
|
lastChecked?: Date;
|
|
148
166
|
}
|
|
167
|
+
export interface LoadBalancerStatus {
|
|
168
|
+
origin?: string;
|
|
169
|
+
url?: string;
|
|
170
|
+
}
|
|
149
171
|
export interface ResolvedImage {
|
|
150
172
|
digest?: string;
|
|
151
173
|
manifests?: {
|
|
@@ -161,6 +183,7 @@ export interface ResolvedImages {
|
|
|
161
183
|
resolvedForVersion?: number;
|
|
162
184
|
resolvedAt?: Date;
|
|
163
185
|
errorMessages?: string[];
|
|
186
|
+
nextRetryAt?: Date;
|
|
164
187
|
images?: ResolvedImage[];
|
|
165
188
|
}
|
|
166
189
|
export interface WorkloadStatus {
|
|
@@ -171,17 +194,28 @@ export interface WorkloadStatus {
|
|
|
171
194
|
healthCheck?: HealthCheckStatus;
|
|
172
195
|
currentReplicaCount?: number;
|
|
173
196
|
resolvedImages?: ResolvedImages;
|
|
197
|
+
loadBalancer?: LoadBalancerStatus[];
|
|
174
198
|
[x: string]: any;
|
|
175
199
|
}
|
|
200
|
+
export interface HeaderFilter {
|
|
201
|
+
key: string;
|
|
202
|
+
allowedValues?: Regex[];
|
|
203
|
+
blockedValues?: Regex[];
|
|
204
|
+
}
|
|
176
205
|
export interface FirewallSpec {
|
|
177
206
|
external?: {
|
|
178
207
|
inboundAllowCIDR?: string[];
|
|
208
|
+
inboundBlockedCIDR?: string[];
|
|
179
209
|
outboundAllowHostname?: string[];
|
|
180
210
|
outboundAllowPort?: ({
|
|
181
211
|
protocol: 'http' | 'https' | 'tcp';
|
|
182
212
|
number: number;
|
|
183
213
|
})[];
|
|
184
214
|
outboundAllowCIDR?: string[];
|
|
215
|
+
outboundBlockedCIDR?: string[];
|
|
216
|
+
http?: {
|
|
217
|
+
inboundHeaderFilter?: HeaderFilter[];
|
|
218
|
+
};
|
|
185
219
|
};
|
|
186
220
|
internal?: {
|
|
187
221
|
inboundAllowType?: 'none' | 'same-gvc' | 'same-org' | 'workload-list';
|
|
@@ -196,19 +230,57 @@ export interface JobSpec {
|
|
|
196
230
|
restartPolicy?: 'OnFailure' | 'Never';
|
|
197
231
|
activeDeadlineSeconds?: number;
|
|
198
232
|
}
|
|
233
|
+
export interface LoadBalancerPort {
|
|
234
|
+
externalPort: number;
|
|
235
|
+
protocol: 'TCP' | 'UDP';
|
|
236
|
+
scheme?: 'http' | 'tcp' | 'https' | 'ws' | 'wss';
|
|
237
|
+
containerPort?: number;
|
|
238
|
+
}
|
|
239
|
+
export interface LoadBalancerSpec {
|
|
240
|
+
direct?: {
|
|
241
|
+
enabled: boolean;
|
|
242
|
+
ports?: LoadBalancerPort[];
|
|
243
|
+
ipSet?: string;
|
|
244
|
+
};
|
|
245
|
+
geoLocation?: {
|
|
246
|
+
enabled?: boolean;
|
|
247
|
+
headers?: {
|
|
248
|
+
asn?: string;
|
|
249
|
+
city?: string;
|
|
250
|
+
country?: string;
|
|
251
|
+
region?: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
replicaDirect?: boolean;
|
|
255
|
+
}
|
|
256
|
+
export interface Extras {
|
|
257
|
+
affinity?: any;
|
|
258
|
+
tolerations?: any[];
|
|
259
|
+
topologySpreadConstraints?: any[];
|
|
260
|
+
}
|
|
261
|
+
export interface RequestRetryPolicy {
|
|
262
|
+
attempts?: number;
|
|
263
|
+
retryOn?: string[];
|
|
264
|
+
}
|
|
265
|
+
export type WorkloadType = 'serverless' | 'standard' | 'cron' | 'stateful';
|
|
199
266
|
export interface WorkloadSpec {
|
|
200
|
-
type?:
|
|
267
|
+
type?: WorkloadType;
|
|
201
268
|
identityLink?: string;
|
|
202
|
-
containers
|
|
269
|
+
containers: ContainerSpec[];
|
|
203
270
|
firewallConfig?: {
|
|
204
271
|
external?: {
|
|
205
272
|
inboundAllowCIDR?: string[];
|
|
273
|
+
inboundBlockedCIDR?: string[];
|
|
206
274
|
outboundAllowHostname?: string[];
|
|
207
275
|
outboundAllowPort?: ({
|
|
208
276
|
protocol: 'http' | 'https' | 'tcp';
|
|
209
277
|
number: number;
|
|
210
278
|
})[];
|
|
211
279
|
outboundAllowCIDR?: string[];
|
|
280
|
+
outboundBlockedCIDR?: string[];
|
|
281
|
+
http?: {
|
|
282
|
+
inboundHeaderFilter?: HeaderFilter[];
|
|
283
|
+
};
|
|
212
284
|
};
|
|
213
285
|
internal?: {
|
|
214
286
|
inboundAllowType?: 'none' | 'same-gvc' | 'same-org' | 'workload-list';
|
|
@@ -228,15 +300,36 @@ export interface WorkloadSpec {
|
|
|
228
300
|
envoy?: EnvoyFilters;
|
|
229
301
|
};
|
|
230
302
|
supportDynamicTags?: boolean;
|
|
231
|
-
rolloutOptions?:
|
|
232
|
-
minReadySeconds?: number;
|
|
233
|
-
maxUnavailableReplicas?: string;
|
|
234
|
-
maxSurgeReplicas?: string;
|
|
235
|
-
scalingPolicy?: 'OrderedReady' | 'Parallel';
|
|
236
|
-
};
|
|
303
|
+
rolloutOptions?: any;
|
|
237
304
|
securityOptions?: {
|
|
238
305
|
filesystemGroupId?: number;
|
|
239
306
|
};
|
|
307
|
+
loadBalancer?: {
|
|
308
|
+
direct?: {
|
|
309
|
+
enabled: boolean;
|
|
310
|
+
ports?: LoadBalancerPort[];
|
|
311
|
+
ipSet?: string;
|
|
312
|
+
};
|
|
313
|
+
geoLocation?: {
|
|
314
|
+
enabled?: boolean;
|
|
315
|
+
headers?: {
|
|
316
|
+
asn?: string;
|
|
317
|
+
city?: string;
|
|
318
|
+
country?: string;
|
|
319
|
+
region?: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
replicaDirect?: boolean;
|
|
323
|
+
};
|
|
324
|
+
extras?: {
|
|
325
|
+
affinity?: any;
|
|
326
|
+
tolerations?: any[];
|
|
327
|
+
topologySpreadConstraints?: any[];
|
|
328
|
+
};
|
|
329
|
+
requestRetryPolicy?: {
|
|
330
|
+
attempts?: number;
|
|
331
|
+
retryOn?: string[];
|
|
332
|
+
};
|
|
240
333
|
}
|
|
241
334
|
export interface Workload {
|
|
242
335
|
id?: string;
|
|
@@ -248,13 +341,93 @@ export interface Workload {
|
|
|
248
341
|
lastModified?: Date;
|
|
249
342
|
links?: Links;
|
|
250
343
|
name?: string;
|
|
251
|
-
gvc?:
|
|
252
|
-
spec
|
|
344
|
+
gvc?: string;
|
|
345
|
+
spec: {
|
|
346
|
+
type?: WorkloadType;
|
|
347
|
+
identityLink?: string;
|
|
348
|
+
containers: ContainerSpec[];
|
|
349
|
+
firewallConfig?: {
|
|
350
|
+
external?: {
|
|
351
|
+
inboundAllowCIDR?: string[];
|
|
352
|
+
inboundBlockedCIDR?: string[];
|
|
353
|
+
outboundAllowHostname?: string[];
|
|
354
|
+
outboundAllowPort?: ({
|
|
355
|
+
protocol: 'http' | 'https' | 'tcp';
|
|
356
|
+
number: number;
|
|
357
|
+
})[];
|
|
358
|
+
outboundAllowCIDR?: string[];
|
|
359
|
+
outboundBlockedCIDR?: string[];
|
|
360
|
+
http?: {
|
|
361
|
+
inboundHeaderFilter?: HeaderFilter[];
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
internal?: {
|
|
365
|
+
inboundAllowType?: 'none' | 'same-gvc' | 'same-org' | 'workload-list';
|
|
366
|
+
inboundAllowWorkload?: string[];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
defaultOptions?: DefaultOptions;
|
|
370
|
+
localOptions?: LocalOptions;
|
|
371
|
+
job?: {
|
|
372
|
+
schedule: ScheduleType;
|
|
373
|
+
concurrencyPolicy?: 'Forbid' | 'Replace';
|
|
374
|
+
historyLimit?: number;
|
|
375
|
+
restartPolicy?: 'OnFailure' | 'Never';
|
|
376
|
+
activeDeadlineSeconds?: number;
|
|
377
|
+
};
|
|
378
|
+
sidecar?: {
|
|
379
|
+
envoy?: EnvoyFilters;
|
|
380
|
+
};
|
|
381
|
+
supportDynamicTags?: boolean;
|
|
382
|
+
rolloutOptions?: any;
|
|
383
|
+
securityOptions?: {
|
|
384
|
+
filesystemGroupId?: number;
|
|
385
|
+
};
|
|
386
|
+
loadBalancer?: {
|
|
387
|
+
direct?: {
|
|
388
|
+
enabled: boolean;
|
|
389
|
+
ports?: LoadBalancerPort[];
|
|
390
|
+
ipSet?: string;
|
|
391
|
+
};
|
|
392
|
+
geoLocation?: {
|
|
393
|
+
enabled?: boolean;
|
|
394
|
+
headers?: {
|
|
395
|
+
asn?: string;
|
|
396
|
+
city?: string;
|
|
397
|
+
country?: string;
|
|
398
|
+
region?: string;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
replicaDirect?: boolean;
|
|
402
|
+
};
|
|
403
|
+
extras?: {
|
|
404
|
+
affinity?: any;
|
|
405
|
+
tolerations?: any[];
|
|
406
|
+
topologySpreadConstraints?: any[];
|
|
407
|
+
};
|
|
408
|
+
requestRetryPolicy?: {
|
|
409
|
+
attempts?: number;
|
|
410
|
+
retryOn?: string[];
|
|
411
|
+
};
|
|
412
|
+
};
|
|
253
413
|
status?: WorkloadStatus;
|
|
254
414
|
}
|
|
415
|
+
export interface PodZoneMap {
|
|
416
|
+
[x: string]: string;
|
|
417
|
+
}
|
|
255
418
|
export interface WorkloadConfig {
|
|
256
419
|
scheduling?: {
|
|
257
420
|
fingerprint?: string;
|
|
258
421
|
version?: number;
|
|
259
422
|
};
|
|
423
|
+
thinProvision?: number;
|
|
424
|
+
podZoneMap?: {
|
|
425
|
+
[x: string]: string;
|
|
426
|
+
};
|
|
427
|
+
locationPodZoneMap?: {
|
|
428
|
+
[x: string]: PodZoneMap;
|
|
429
|
+
};
|
|
430
|
+
subsets?: {
|
|
431
|
+
enabled?: boolean;
|
|
432
|
+
};
|
|
260
433
|
}
|
|
@@ -1,18 +1,78 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface KedaTrigger {
|
|
2
|
+
type: string;
|
|
3
|
+
metadata?: {
|
|
4
|
+
[x: string]: string;
|
|
5
|
+
};
|
|
6
|
+
name?: string;
|
|
7
|
+
useCachedMetrics?: boolean;
|
|
8
|
+
metricType?: 'AverageValue' | 'Value' | 'Utilization';
|
|
9
|
+
}
|
|
10
|
+
export interface DefaultOptions {
|
|
2
11
|
autoscaling?: {
|
|
3
|
-
metric?: 'concurrency' | 'cpu' | 'rps' | 'latency' | 'disabled';
|
|
4
|
-
|
|
12
|
+
metric?: 'concurrency' | 'cpu' | 'memory' | 'rps' | 'latency' | 'keda' | 'disabled';
|
|
13
|
+
multi?: {
|
|
14
|
+
metric?: any;
|
|
15
|
+
target?: number;
|
|
16
|
+
}[];
|
|
17
|
+
metricPercentile?: 'p50' | 'p75' | 'p99';
|
|
5
18
|
target?: number;
|
|
6
19
|
maxScale?: number;
|
|
7
20
|
minScale?: number;
|
|
8
21
|
scaleToZeroDelay?: number;
|
|
9
22
|
maxConcurrency?: number;
|
|
23
|
+
keda?: {
|
|
24
|
+
triggers?: KedaTrigger[];
|
|
25
|
+
advanced?: {
|
|
26
|
+
scalingModifiers?: {
|
|
27
|
+
target?: string;
|
|
28
|
+
activationTarget?: string;
|
|
29
|
+
metricType?: 'AverageValue' | 'Value' | 'Utilization';
|
|
30
|
+
formula?: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
10
34
|
};
|
|
11
35
|
timeoutSeconds?: number;
|
|
12
36
|
capacityAI?: boolean;
|
|
13
37
|
spot?: boolean;
|
|
14
38
|
debug?: boolean;
|
|
15
39
|
suspend?: boolean;
|
|
40
|
+
multiZone?: {
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
};
|
|
16
43
|
}
|
|
17
|
-
export type
|
|
18
|
-
|
|
44
|
+
export type LocalOptions = ({
|
|
45
|
+
autoscaling?: {
|
|
46
|
+
metric?: 'concurrency' | 'cpu' | 'memory' | 'rps' | 'latency' | 'keda' | 'disabled';
|
|
47
|
+
multi?: {
|
|
48
|
+
metric?: any;
|
|
49
|
+
target?: number;
|
|
50
|
+
}[];
|
|
51
|
+
metricPercentile?: 'p50' | 'p75' | 'p99';
|
|
52
|
+
target?: number;
|
|
53
|
+
maxScale?: number;
|
|
54
|
+
minScale?: number;
|
|
55
|
+
scaleToZeroDelay?: number;
|
|
56
|
+
maxConcurrency?: number;
|
|
57
|
+
keda?: {
|
|
58
|
+
triggers?: KedaTrigger[];
|
|
59
|
+
advanced?: {
|
|
60
|
+
scalingModifiers?: {
|
|
61
|
+
target?: string;
|
|
62
|
+
activationTarget?: string;
|
|
63
|
+
metricType?: 'AverageValue' | 'Value' | 'Utilization';
|
|
64
|
+
formula?: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
timeoutSeconds?: number;
|
|
70
|
+
capacityAI?: boolean;
|
|
71
|
+
spot?: boolean;
|
|
72
|
+
debug?: boolean;
|
|
73
|
+
suspend?: boolean;
|
|
74
|
+
multiZone?: {
|
|
75
|
+
enabled?: boolean;
|
|
76
|
+
};
|
|
77
|
+
location: string;
|
|
78
|
+
})[];
|