@controlplane/schema 1.0.4 → 1.0.6

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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -1
  3. package/build/src/interfaces/base.d.ts +6 -2
  4. package/build/src/interfaces/command.d.ts +48 -32
  5. package/build/src/interfaces/containerstatus.d.ts +6 -0
  6. package/build/src/interfaces/crmevent.d.ts +39 -0
  7. package/build/src/interfaces/crmevent.js +3 -0
  8. package/build/src/interfaces/cronjob.d.ts +3 -2
  9. package/build/src/interfaces/deployment.d.ts +1 -0
  10. package/build/src/interfaces/discovery.d.ts +3 -0
  11. package/build/src/interfaces/domain.d.ts +19 -3
  12. package/build/src/interfaces/envoyCommon.d.ts +5 -4
  13. package/build/src/interfaces/envoyHttp.d.ts +1 -1
  14. package/build/src/interfaces/event.d.ts +4 -2
  15. package/build/src/interfaces/gvc.d.ts +53 -0
  16. package/build/src/interfaces/identity.d.ts +9 -1
  17. package/build/src/interfaces/internal.d.ts +0 -0
  18. package/build/src/interfaces/internal.js +2 -0
  19. package/build/src/interfaces/ipSet.d.ts +37 -0
  20. package/build/src/interfaces/ipSet.js +3 -0
  21. package/build/src/interfaces/locationDns.d.ts +11 -0
  22. package/build/src/interfaces/locationDns.js +3 -0
  23. package/build/src/interfaces/mk8s.d.ts +22 -3
  24. package/build/src/interfaces/mk8sAddons.d.ts +116 -0
  25. package/build/src/interfaces/mk8sAws.d.ts +11 -2
  26. package/build/src/interfaces/mk8sAzure.d.ts +53 -0
  27. package/build/src/interfaces/mk8sAzure.js +3 -0
  28. package/build/src/interfaces/mk8sCommon.d.ts +30 -4
  29. package/build/src/interfaces/mk8sDigitalOcean.d.ts +32 -0
  30. package/build/src/interfaces/mk8sDigitalOcean.js +3 -0
  31. package/build/src/interfaces/mk8sGcp.d.ts +56 -0
  32. package/build/src/interfaces/mk8sGcp.js +3 -0
  33. package/build/src/interfaces/mk8sGeneric.d.ts +1 -0
  34. package/build/src/interfaces/mk8sHetzner.d.ts +9 -4
  35. package/build/src/interfaces/mk8sLambdalabs.d.ts +7 -4
  36. package/build/src/interfaces/mk8sLinode.d.ts +13 -5
  37. package/build/src/interfaces/mk8sOblivus.d.ts +14 -2
  38. package/build/src/interfaces/mk8sPaperspace.d.ts +6 -1
  39. package/build/src/interfaces/mk8sTriton.d.ts +74 -0
  40. package/build/src/interfaces/mk8sTriton.js +3 -0
  41. package/build/src/interfaces/org.d.ts +5 -2
  42. package/build/src/interfaces/outboxmessage.d.ts +6 -0
  43. package/build/src/interfaces/outboxmessage.js +3 -0
  44. package/build/src/interfaces/permissions.d.ts +1 -1
  45. package/build/src/interfaces/query.d.ts +4 -0
  46. package/build/src/interfaces/volumeSet.d.ts +42 -14
  47. package/build/src/interfaces/workload.d.ts +193 -15
  48. package/build/src/interfaces/workloadOptions.d.ts +86 -5
  49. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ import { Labels, Taints, PreInstallScript, SshPublicKey, AutoscalerConfig } from './mk8sCommon';
2
+ export interface TritonPool {
3
+ name: string;
4
+ labels?: Labels;
5
+ taints?: Taints;
6
+ packageId: string;
7
+ overrideImageId?: string;
8
+ publicNetworkId?: string;
9
+ privateNetworkIds?: string[];
10
+ tritonTags?: {
11
+ [x: string]: string;
12
+ };
13
+ minSize: number;
14
+ maxSize: number;
15
+ }
16
+ export interface Manual {
17
+ packageId: string;
18
+ imageId: string;
19
+ publicNetworkId: string;
20
+ privateNetworkIds?: string[];
21
+ metadata?: {
22
+ [x: string]: string;
23
+ };
24
+ tags?: {
25
+ [x: string]: string;
26
+ };
27
+ logging?: {
28
+ nodePort?: number;
29
+ externalSyslog?: string;
30
+ };
31
+ count: number;
32
+ cnsInternalDomain: string;
33
+ cnsPublicDomain: string;
34
+ }
35
+ export interface LoadBalancerConfig {
36
+ manual?: Manual;
37
+ none?: {};
38
+ gateway?: {};
39
+ }
40
+ export interface SdcConnection {
41
+ url: string;
42
+ account: string;
43
+ user?: string;
44
+ privateKeySecretLink: string;
45
+ }
46
+ export interface TritonProvider {
47
+ connection: {
48
+ url: string;
49
+ account: string;
50
+ user?: string;
51
+ privateKeySecretLink: string;
52
+ };
53
+ networking?: {
54
+ serviceNetwork?: '10.43.0.0/16' | '192.168.0.0/16';
55
+ podNetwork?: '10.42.0.0/16' | '172.16.0.0/15' | '172.18.0.0/15' | '172.20.0.0/15' | '172.22.0.0/15' | '172.24.0.0/15' | '172.26.0.0/15' | '172.28.0.0/15' | '172.30.0.0/15';
56
+ dnsForwarder?: string;
57
+ };
58
+ preInstallScript?: PreInstallScript;
59
+ location: 'aws-eu-central-1' | 'aws-us-east-2' | 'aws-us-west-2' | 'gcp-me-west1' | 'gcp-us-east1';
60
+ loadBalancer?: LoadBalancerConfig;
61
+ privateNetworkId: string;
62
+ firewallEnabled?: boolean;
63
+ nodePools?: TritonPool[];
64
+ imageId: string;
65
+ sshKeys?: SshPublicKey[];
66
+ autoscaler?: AutoscalerConfig;
67
+ }
68
+ export interface TritonProviderStatus {
69
+ [x: string]: any;
70
+ }
71
+ export interface TritonJoinParams {
72
+ nodePoolName: string;
73
+ [x: string]: any;
74
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ /* auto-generated */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,10 @@
1
1
  import { S3Logging, CoralogixLogging, DatadogLogging, LogzioLogging, ElasticLogging, CloudWatchLogging, FluentdLogging, StackdriverLogging, SyslogLogging } from './orgLogging';
2
2
  import { Tracing } from './tracing';
3
- import { Name, Kind, Tags, Links } from './base';
3
+ import { Kind, Tags, Links } from './base';
4
4
  export interface OrgStatus {
5
5
  accountLink?: string;
6
6
  active?: boolean;
7
+ endpointPrefix?: string;
7
8
  }
8
9
  export interface AuthConfig {
9
10
  domainAutoMembers?: string[];
@@ -13,6 +14,7 @@ export interface ObservabilityConfig {
13
14
  logsRetentionDays?: number;
14
15
  metricsRetentionDays?: number;
15
16
  tracesRetentionDays?: number;
17
+ defaultAlertEmails?: string[];
16
18
  }
17
19
  export interface ThreatDetection {
18
20
  enabled: boolean;
@@ -53,6 +55,7 @@ export interface OrgSpec {
53
55
  logsRetentionDays?: number;
54
56
  metricsRetentionDays?: number;
55
57
  tracesRetentionDays?: number;
58
+ defaultAlertEmails?: string[];
56
59
  };
57
60
  security?: {
58
61
  threatDetection?: ThreatDetection;
@@ -60,7 +63,6 @@ export interface OrgSpec {
60
63
  }
61
64
  export interface Org {
62
65
  id?: string;
63
- name?: Name;
64
66
  kind?: Kind;
65
67
  version?: number;
66
68
  description?: string;
@@ -68,6 +70,7 @@ export interface Org {
68
70
  created?: Date;
69
71
  lastModified?: Date;
70
72
  links?: Links;
73
+ name?: string;
71
74
  spec?: OrgSpec;
72
75
  status?: OrgStatus;
73
76
  }
@@ -0,0 +1,6 @@
1
+ export interface OutboxMessage {
2
+ id?: string;
3
+ created?: Date;
4
+ delivered?: Date;
5
+ payload?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ /* auto-generated */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,7 +6,7 @@ export interface Permission {
6
6
  export interface Permissions {
7
7
  links?: Links;
8
8
  kind: 'permissions';
9
- targetKind: 'org' | 'cloudaccount' | 'policy' | 'user' | 'group' | 'resource' | 'task' | 'permissions' | 'serviceaccount' | 'secret' | 'location' | 'gvc' | 'workload' | 'quota' | 'identity' | 'deployment' | 'event' | 'domain' | 'image' | 'resourcepolicy' | 'agent' | 'accessreport' | 'policymembership' | 'dbcluster' | 'auditctx' | 'memcachecluster' | 'spicedbcluster' | 'tenant' | 'mk8s' | 'command' | 'imagesummary' | 'volumeset';
9
+ targetKind: 'org' | 'cloudaccount' | 'policy' | 'user' | 'group' | 'resource' | 'task' | 'permissions' | 'serviceaccount' | 'secret' | 'location' | 'gvc' | 'workload' | 'quota' | 'identity' | 'deployment' | 'event' | 'domain' | 'image' | 'ipset' | 'resourcepolicy' | 'agent' | 'accessreport' | 'policymembership' | 'dbcluster' | 'auditctx' | 'memcachecluster' | 'spicedbcluster' | 'tenant' | 'mk8s' | 'command' | 'imagesummary' | 'volumeset';
10
10
  items: Permission[];
11
11
  implied?: {
12
12
  [x: string]: any;
@@ -9,6 +9,10 @@ export interface Term {
9
9
  export interface Spec {
10
10
  match?: 'all' | 'any' | 'none';
11
11
  terms?: Term[];
12
+ sort?: {
13
+ by: string;
14
+ order?: 'asc' | 'desc';
15
+ };
12
16
  }
13
17
  export interface Query {
14
18
  kind?: Kind;
@@ -1,4 +1,15 @@
1
1
  import { Name, Kind, Tags, Links } from './base';
2
+ export interface FileSystem {
3
+ name: string;
4
+ accessMode: string;
5
+ commandsSupported?: string[];
6
+ }
7
+ export interface PerformanceClass {
8
+ name: string;
9
+ minCapacity: number;
10
+ maxCapacity: number;
11
+ featuresSupported?: ('automatic-expansion' | 'snapshots')[];
12
+ }
2
13
  export interface VolumeSnapshot {
3
14
  name: string;
4
15
  id?: string;
@@ -12,6 +23,8 @@ export interface VolumeSnapshot {
12
23
  export interface PersistentVolumeStatus {
13
24
  lifecycle?: 'creating' | 'unused' | 'unbound' | 'bound' | 'deleted' | 'repairing';
14
25
  storageDeviceId?: string;
26
+ oldStorageDeviceIds?: string[];
27
+ resourceName?: string;
15
28
  index: number;
16
29
  currentSize: number;
17
30
  currentBytesUsed?: number;
@@ -22,6 +35,7 @@ export interface PersistentVolumeStatus {
22
35
  attributes?: {
23
36
  [x: string]: string;
24
37
  };
38
+ zone?: string;
25
39
  }
26
40
  export interface VolumeSetStatusLocation {
27
41
  name: string;
@@ -32,6 +46,7 @@ export interface VolumeSetStatusLocation {
32
46
  export interface VolumeSetStatus {
33
47
  parentId?: string;
34
48
  usedByWorkload?: string;
49
+ workloadLinks?: string[];
35
50
  bindingId?: string;
36
51
  locations?: VolumeSetStatusLocation[];
37
52
  }
@@ -40,17 +55,41 @@ export interface SnapshotSpec {
40
55
  retentionDuration?: string;
41
56
  schedule?: string;
42
57
  }
58
+ export type PerformanceClassName = 'general-purpose-ssd' | 'high-throughput-ssd' | 'shared';
59
+ export type FileSystemType = 'ext4' | 'xfs' | 'shared';
60
+ export interface MountResources {
61
+ maxCpu?: string;
62
+ minCpu?: string;
63
+ minMemory?: string;
64
+ maxMemory?: string;
65
+ }
66
+ export interface CustomEncryptionRegion {
67
+ keyId?: string;
68
+ }
43
69
  export interface VolumeSetSpec {
44
70
  initialCapacity: number;
45
- performanceClass: 'general-purpose-ssd' | 'high-throughput-ssd';
71
+ performanceClass?: PerformanceClassName;
46
72
  storageClassSuffix?: string;
47
- fileSystemType?: 'xfs' | 'ext4';
73
+ fileSystemType?: FileSystemType;
74
+ customEncryption?: {
75
+ regions?: {
76
+ [x: string]: CustomEncryptionRegion;
77
+ };
78
+ };
48
79
  snapshots?: SnapshotSpec;
49
80
  autoscaling?: {
50
81
  maxCapacity?: number;
51
82
  minFreePercentage?: number;
52
83
  scalingFactor?: number;
53
84
  };
85
+ mountOptions?: {
86
+ resources?: {
87
+ maxCpu?: string;
88
+ minCpu?: string;
89
+ minMemory?: string;
90
+ maxMemory?: string;
91
+ };
92
+ };
54
93
  }
55
94
  export interface VolumeSet {
56
95
  id?: string;
@@ -62,18 +101,7 @@ export interface VolumeSet {
62
101
  created?: Date;
63
102
  lastModified?: Date;
64
103
  links?: Links;
65
- spec: {
66
- initialCapacity: number;
67
- performanceClass: 'general-purpose-ssd' | 'high-throughput-ssd';
68
- storageClassSuffix?: string;
69
- fileSystemType?: 'xfs' | 'ext4';
70
- snapshots?: SnapshotSpec;
71
- autoscaling?: {
72
- maxCapacity?: number;
73
- minFreePercentage?: number;
74
- scalingFactor?: number;
75
- };
76
- };
104
+ spec: VolumeSetSpec;
77
105
  status?: VolumeSetStatus;
78
106
  gvc?: any;
79
107
  }
@@ -1,9 +1,9 @@
1
1
  import { Port } from './port';
2
+ import { Regex, Kind, Tags, Links } from './base';
2
3
  import { EnvVar } from './env';
3
4
  import { VolumeSpec } from './volumeSpec';
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;
@@ -53,6 +66,7 @@ export interface ContainerSpec {
53
66
  metrics?: {
54
67
  port: number;
55
68
  path: string;
69
+ dropMetrics?: Regex[];
56
70
  };
57
71
  port?: number;
58
72
  ports?: ({
@@ -115,10 +129,15 @@ export interface ContainerSpec {
115
129
  minMemory?: string;
116
130
  env?: EnvVar[];
117
131
  gpu?: {
118
- nvidia: {
132
+ nvidia?: {
119
133
  model?: any;
120
134
  quantity?: number;
121
135
  };
136
+ custom?: {
137
+ resource: string;
138
+ runtimeClass?: string;
139
+ quantity?: number;
140
+ };
122
141
  };
123
142
  inheritEnv?: boolean;
124
143
  command?: string;
@@ -146,6 +165,10 @@ export interface HealthCheckStatus {
146
165
  successes?: number;
147
166
  lastChecked?: Date;
148
167
  }
168
+ export interface LoadBalancerStatus {
169
+ origin?: string;
170
+ url?: string;
171
+ }
149
172
  export interface ResolvedImage {
150
173
  digest?: string;
151
174
  manifests?: {
@@ -161,6 +184,7 @@ export interface ResolvedImages {
161
184
  resolvedForVersion?: number;
162
185
  resolvedAt?: Date;
163
186
  errorMessages?: string[];
187
+ nextRetryAt?: Date;
164
188
  images?: ResolvedImage[];
165
189
  }
166
190
  export interface WorkloadStatus {
@@ -168,20 +192,32 @@ export interface WorkloadStatus {
168
192
  canonicalEndpoint?: string;
169
193
  endpoint?: string;
170
194
  internalName?: string;
195
+ replicaInternalNames?: string[];
171
196
  healthCheck?: HealthCheckStatus;
172
197
  currentReplicaCount?: number;
173
198
  resolvedImages?: ResolvedImages;
199
+ loadBalancer?: LoadBalancerStatus[];
174
200
  [x: string]: any;
175
201
  }
202
+ export interface HeaderFilter {
203
+ key: string;
204
+ allowedValues?: Regex[];
205
+ blockedValues?: Regex[];
206
+ }
176
207
  export interface FirewallSpec {
177
208
  external?: {
178
209
  inboundAllowCIDR?: string[];
210
+ inboundBlockedCIDR?: string[];
179
211
  outboundAllowHostname?: string[];
180
212
  outboundAllowPort?: ({
181
213
  protocol: 'http' | 'https' | 'tcp';
182
214
  number: number;
183
215
  })[];
184
216
  outboundAllowCIDR?: string[];
217
+ outboundBlockedCIDR?: string[];
218
+ http?: {
219
+ inboundHeaderFilter?: HeaderFilter[];
220
+ };
185
221
  };
186
222
  internal?: {
187
223
  inboundAllowType?: 'none' | 'same-gvc' | 'same-org' | 'workload-list';
@@ -191,24 +227,62 @@ export interface FirewallSpec {
191
227
  export type ScheduleType = string;
192
228
  export interface JobSpec {
193
229
  schedule: ScheduleType;
194
- concurrencyPolicy?: 'Forbid' | 'Replace';
230
+ concurrencyPolicy?: 'Forbid' | 'Replace' | 'Allow';
195
231
  historyLimit?: number;
196
232
  restartPolicy?: 'OnFailure' | 'Never';
197
233
  activeDeadlineSeconds?: number;
198
234
  }
235
+ export interface LoadBalancerPort {
236
+ externalPort: number;
237
+ protocol: 'TCP' | 'UDP';
238
+ scheme?: 'http' | 'tcp' | 'https' | 'ws' | 'wss';
239
+ containerPort?: number;
240
+ }
241
+ export interface LoadBalancerSpec {
242
+ direct?: {
243
+ enabled: boolean;
244
+ ports?: LoadBalancerPort[];
245
+ ipSet?: string;
246
+ };
247
+ geoLocation?: {
248
+ enabled?: boolean;
249
+ headers?: {
250
+ asn?: string;
251
+ city?: string;
252
+ country?: string;
253
+ region?: string;
254
+ };
255
+ };
256
+ replicaDirect?: boolean;
257
+ }
258
+ export interface Extras {
259
+ affinity?: any;
260
+ tolerations?: any[];
261
+ topologySpreadConstraints?: any[];
262
+ }
263
+ export interface RequestRetryPolicy {
264
+ attempts?: number;
265
+ retryOn?: string[];
266
+ }
267
+ export type WorkloadType = 'serverless' | 'standard' | 'cron' | 'stateful';
199
268
  export interface WorkloadSpec {
200
- type?: 'serverless' | 'standard' | 'cron' | 'stateful';
269
+ type?: WorkloadType;
201
270
  identityLink?: string;
202
- containers?: ContainerSpec[];
271
+ containers: ContainerSpec[];
203
272
  firewallConfig?: {
204
273
  external?: {
205
274
  inboundAllowCIDR?: string[];
275
+ inboundBlockedCIDR?: string[];
206
276
  outboundAllowHostname?: string[];
207
277
  outboundAllowPort?: ({
208
278
  protocol: 'http' | 'https' | 'tcp';
209
279
  number: number;
210
280
  })[];
211
281
  outboundAllowCIDR?: string[];
282
+ outboundBlockedCIDR?: string[];
283
+ http?: {
284
+ inboundHeaderFilter?: HeaderFilter[];
285
+ };
212
286
  };
213
287
  internal?: {
214
288
  inboundAllowType?: 'none' | 'same-gvc' | 'same-org' | 'workload-list';
@@ -219,7 +293,7 @@ export interface WorkloadSpec {
219
293
  localOptions?: LocalOptions;
220
294
  job?: {
221
295
  schedule: ScheduleType;
222
- concurrencyPolicy?: 'Forbid' | 'Replace';
296
+ concurrencyPolicy?: 'Forbid' | 'Replace' | 'Allow';
223
297
  historyLimit?: number;
224
298
  restartPolicy?: 'OnFailure' | 'Never';
225
299
  activeDeadlineSeconds?: number;
@@ -228,15 +302,36 @@ export interface WorkloadSpec {
228
302
  envoy?: EnvoyFilters;
229
303
  };
230
304
  supportDynamicTags?: boolean;
231
- rolloutOptions?: {
232
- minReadySeconds?: number;
233
- maxUnavailableReplicas?: string;
234
- maxSurgeReplicas?: string;
235
- scalingPolicy?: 'OrderedReady' | 'Parallel';
236
- };
305
+ rolloutOptions?: any;
237
306
  securityOptions?: {
238
307
  filesystemGroupId?: number;
239
308
  };
309
+ loadBalancer?: {
310
+ direct?: {
311
+ enabled: boolean;
312
+ ports?: LoadBalancerPort[];
313
+ ipSet?: string;
314
+ };
315
+ geoLocation?: {
316
+ enabled?: boolean;
317
+ headers?: {
318
+ asn?: string;
319
+ city?: string;
320
+ country?: string;
321
+ region?: string;
322
+ };
323
+ };
324
+ replicaDirect?: boolean;
325
+ };
326
+ extras?: {
327
+ affinity?: any;
328
+ tolerations?: any[];
329
+ topologySpreadConstraints?: any[];
330
+ };
331
+ requestRetryPolicy?: {
332
+ attempts?: number;
333
+ retryOn?: string[];
334
+ };
240
335
  }
241
336
  export interface Workload {
242
337
  id?: string;
@@ -248,13 +343,96 @@ export interface Workload {
248
343
  lastModified?: Date;
249
344
  links?: Links;
250
345
  name?: string;
251
- gvc?: any;
252
- spec?: WorkloadSpec;
346
+ gvc?: string;
347
+ spec: {
348
+ type?: WorkloadType;
349
+ identityLink?: string;
350
+ containers: ContainerSpec[];
351
+ firewallConfig?: {
352
+ external?: {
353
+ inboundAllowCIDR?: string[];
354
+ inboundBlockedCIDR?: string[];
355
+ outboundAllowHostname?: string[];
356
+ outboundAllowPort?: ({
357
+ protocol: 'http' | 'https' | 'tcp';
358
+ number: number;
359
+ })[];
360
+ outboundAllowCIDR?: string[];
361
+ outboundBlockedCIDR?: string[];
362
+ http?: {
363
+ inboundHeaderFilter?: HeaderFilter[];
364
+ };
365
+ };
366
+ internal?: {
367
+ inboundAllowType?: 'none' | 'same-gvc' | 'same-org' | 'workload-list';
368
+ inboundAllowWorkload?: string[];
369
+ };
370
+ };
371
+ defaultOptions?: DefaultOptions;
372
+ localOptions?: LocalOptions;
373
+ job?: {
374
+ schedule: ScheduleType;
375
+ concurrencyPolicy?: 'Forbid' | 'Replace' | 'Allow';
376
+ historyLimit?: number;
377
+ restartPolicy?: 'OnFailure' | 'Never';
378
+ activeDeadlineSeconds?: number;
379
+ };
380
+ sidecar?: {
381
+ envoy?: EnvoyFilters;
382
+ };
383
+ supportDynamicTags?: boolean;
384
+ rolloutOptions?: any;
385
+ securityOptions?: {
386
+ filesystemGroupId?: number;
387
+ };
388
+ loadBalancer?: {
389
+ direct?: {
390
+ enabled: boolean;
391
+ ports?: LoadBalancerPort[];
392
+ ipSet?: string;
393
+ };
394
+ geoLocation?: {
395
+ enabled?: boolean;
396
+ headers?: {
397
+ asn?: string;
398
+ city?: string;
399
+ country?: string;
400
+ region?: string;
401
+ };
402
+ };
403
+ replicaDirect?: boolean;
404
+ };
405
+ extras?: {
406
+ affinity?: any;
407
+ tolerations?: any[];
408
+ topologySpreadConstraints?: any[];
409
+ };
410
+ requestRetryPolicy?: {
411
+ attempts?: number;
412
+ retryOn?: string[];
413
+ };
414
+ };
253
415
  status?: WorkloadStatus;
254
416
  }
417
+ export interface PodZoneMap {
418
+ [x: string]: string;
419
+ }
255
420
  export interface WorkloadConfig {
256
421
  scheduling?: {
257
422
  fingerprint?: string;
258
423
  version?: number;
259
424
  };
425
+ thinProvision?: number;
426
+ podZoneMap?: {
427
+ [x: string]: string;
428
+ };
429
+ locationPodZoneMap?: {
430
+ [x: string]: PodZoneMap;
431
+ };
432
+ proxy?: {
433
+ minCpu?: number;
434
+ };
435
+ subsets?: {
436
+ enabled?: boolean;
437
+ };
260
438
  }
@@ -1,18 +1,99 @@
1
- export interface Options {
1
+ export interface KedaTrigger {
2
+ type: string;
3
+ metadata?: {
4
+ [x: string]: string | any;
5
+ };
6
+ name?: string;
7
+ useCachedMetrics?: boolean;
8
+ metricType?: 'AverageValue' | 'Value' | 'Utilization';
9
+ authenticationRef?: {
10
+ name: string;
11
+ };
12
+ }
13
+ export interface DefaultOptions {
2
14
  autoscaling?: {
3
- metric?: 'concurrency' | 'cpu' | 'rps' | 'latency' | 'disabled';
4
- metricPercentile?: any;
15
+ metric?: 'concurrency' | 'cpu' | 'memory' | 'rps' | 'latency' | 'keda' | 'disabled';
16
+ multi?: {
17
+ metric?: any;
18
+ target?: number;
19
+ }[];
20
+ metricPercentile?: 'p50' | 'p75' | 'p99';
5
21
  target?: number;
6
22
  maxScale?: number;
7
23
  minScale?: number;
8
24
  scaleToZeroDelay?: number;
9
25
  maxConcurrency?: number;
26
+ keda?: {
27
+ triggers?: KedaTrigger[];
28
+ advanced?: {
29
+ scalingModifiers?: {
30
+ target?: string;
31
+ activationTarget?: string;
32
+ metricType?: 'AverageValue' | 'Value' | 'Utilization';
33
+ formula?: string;
34
+ };
35
+ };
36
+ fallback?: {
37
+ failureThreshold: number;
38
+ replicas: number;
39
+ behavior?: 'static' | 'currentReplicas' | 'currentReplicasIfHigher' | 'currentReplicasIfLower';
40
+ };
41
+ pollingInterval?: number;
42
+ cooldownPeriod?: number;
43
+ initialCooldownPeriod?: number;
44
+ };
10
45
  };
11
46
  timeoutSeconds?: number;
12
47
  capacityAI?: boolean;
48
+ capacityAIUpdateMinutes?: number;
13
49
  spot?: boolean;
14
50
  debug?: boolean;
15
51
  suspend?: boolean;
52
+ multiZone?: {
53
+ enabled?: boolean;
54
+ };
16
55
  }
17
- export type DefaultOptions = any;
18
- export type LocalOptions = any[];
56
+ export type LocalOptions = ({
57
+ autoscaling?: {
58
+ metric?: 'concurrency' | 'cpu' | 'memory' | 'rps' | 'latency' | 'keda' | 'disabled';
59
+ multi?: {
60
+ metric?: any;
61
+ target?: number;
62
+ }[];
63
+ metricPercentile?: 'p50' | 'p75' | 'p99';
64
+ target?: number;
65
+ maxScale?: number;
66
+ minScale?: number;
67
+ scaleToZeroDelay?: number;
68
+ maxConcurrency?: number;
69
+ keda?: {
70
+ triggers?: KedaTrigger[];
71
+ advanced?: {
72
+ scalingModifiers?: {
73
+ target?: string;
74
+ activationTarget?: string;
75
+ metricType?: 'AverageValue' | 'Value' | 'Utilization';
76
+ formula?: string;
77
+ };
78
+ };
79
+ fallback?: {
80
+ failureThreshold: number;
81
+ replicas: number;
82
+ behavior?: 'static' | 'currentReplicas' | 'currentReplicasIfHigher' | 'currentReplicasIfLower';
83
+ };
84
+ pollingInterval?: number;
85
+ cooldownPeriod?: number;
86
+ initialCooldownPeriod?: number;
87
+ };
88
+ };
89
+ timeoutSeconds?: number;
90
+ capacityAI?: boolean;
91
+ capacityAIUpdateMinutes?: number;
92
+ spot?: boolean;
93
+ debug?: boolean;
94
+ suspend?: boolean;
95
+ multiZone?: {
96
+ enabled?: boolean;
97
+ };
98
+ location: string;
99
+ })[];