timonel 2.3.0 → 2.4.0

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 (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +5 -1
  3. package/SECURITY.md +3 -3
  4. package/dist/index.d.ts +6 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/{HelmChartWriter.d.ts → helmChartWriter.d.ts} +1 -1
  9. package/dist/lib/{HelmChartWriter.d.ts.map → helmChartWriter.d.ts.map} +1 -1
  10. package/dist/lib/{HelmChartWriter.js → helmChartWriter.js} +1 -1
  11. package/dist/lib/{HelmChartWriter.js.map → helmChartWriter.js.map} +1 -1
  12. package/dist/lib/resources/autoscaling/autoscalingResources.d.ts +26 -0
  13. package/dist/lib/resources/autoscaling/autoscalingResources.d.ts.map +1 -0
  14. package/dist/lib/resources/autoscaling/autoscalingResources.js +35 -0
  15. package/dist/lib/resources/autoscaling/autoscalingResources.js.map +1 -0
  16. package/dist/lib/resources/baseResourceProvider.d.ts +47 -0
  17. package/dist/lib/resources/baseResourceProvider.d.ts.map +1 -0
  18. package/dist/lib/resources/baseResourceProvider.js +83 -0
  19. package/dist/lib/resources/baseResourceProvider.js.map +1 -0
  20. package/dist/lib/resources/cloud/aws/awsResources.d.ts +165 -0
  21. package/dist/lib/resources/cloud/aws/awsResources.d.ts.map +1 -0
  22. package/dist/lib/resources/cloud/aws/awsResources.js +187 -0
  23. package/dist/lib/resources/cloud/aws/awsResources.js.map +1 -0
  24. package/dist/lib/resources/cloud/azure/azureResources.d.ts +169 -0
  25. package/dist/lib/resources/cloud/azure/azureResources.d.ts.map +1 -0
  26. package/dist/lib/resources/cloud/azure/azureResources.js +218 -0
  27. package/dist/lib/resources/cloud/azure/azureResources.js.map +1 -0
  28. package/dist/lib/resources/cloud/gcp/gcpResources.d.ts +133 -0
  29. package/dist/lib/resources/cloud/gcp/gcpResources.d.ts.map +1 -0
  30. package/dist/lib/resources/cloud/gcp/gcpResources.js +162 -0
  31. package/dist/lib/resources/cloud/gcp/gcpResources.js.map +1 -0
  32. package/dist/lib/resources/core/coreResources.d.ts +584 -0
  33. package/dist/lib/resources/core/coreResources.d.ts.map +1 -0
  34. package/dist/lib/resources/core/coreResources.js +796 -0
  35. package/dist/lib/resources/core/coreResources.js.map +1 -0
  36. package/dist/lib/resources/core/storageResources.d.ts +133 -0
  37. package/dist/lib/resources/core/storageResources.d.ts.map +1 -0
  38. package/dist/lib/resources/core/storageResources.js +120 -0
  39. package/dist/lib/resources/core/storageResources.js.map +1 -0
  40. package/dist/lib/resources/validation/validationResources.d.ts +26 -0
  41. package/dist/lib/resources/validation/validationResources.d.ts.map +1 -0
  42. package/dist/lib/resources/validation/validationResources.js +33 -0
  43. package/dist/lib/resources/validation/validationResources.js.map +1 -0
  44. package/dist/lib/rutter.d.ts +554 -0
  45. package/dist/lib/rutter.d.ts.map +1 -0
  46. package/dist/lib/rutter.js +665 -0
  47. package/dist/lib/rutter.js.map +1 -0
  48. package/dist/lib/security.d.ts +21 -0
  49. package/dist/lib/security.d.ts.map +1 -1
  50. package/dist/lib/security.js +21 -0
  51. package/dist/lib/security.js.map +1 -1
  52. package/dist/lib/umbrella.d.ts +22 -2
  53. package/dist/lib/umbrella.d.ts.map +1 -1
  54. package/dist/lib/umbrella.js +21 -1
  55. package/dist/lib/umbrella.js.map +1 -1
  56. package/dist/lib/umbrellaRutter.d.ts +97 -0
  57. package/dist/lib/umbrellaRutter.d.ts.map +1 -0
  58. package/dist/lib/{UmbrellaRutter.js → umbrellaRutter.js} +44 -1
  59. package/dist/lib/umbrellaRutter.js.map +1 -0
  60. package/package.json +2 -1
  61. package/dist/lib/Rutter.d.ts +0 -2688
  62. package/dist/lib/Rutter.d.ts.map +0 -1
  63. package/dist/lib/Rutter.js +0 -2863
  64. package/dist/lib/Rutter.js.map +0 -1
  65. package/dist/lib/UmbrellaRutter.d.ts +0 -34
  66. package/dist/lib/UmbrellaRutter.d.ts.map +0 -1
  67. package/dist/lib/UmbrellaRutter.js.map +0 -1
@@ -1,2688 +0,0 @@
1
- /**
2
- * @fileoverview Rutter - Main class for building Kubernetes manifests and Helm charts
3
- * @since 1.0.0
4
- */
5
- import { ApiObject } from 'cdk8s';
6
- import type { HelmChartMeta, HelperDefinition } from './HelmChartWriter.js';
7
- /**
8
- * HTTP header for health probes
9
- *
10
- * @interface HttpHeader
11
- * @since 0.1.0
12
- */
13
- export interface HttpHeader {
14
- /** Header name */
15
- name: string;
16
- /** Header value */
17
- value: string;
18
- }
19
- /**
20
- * HTTP GET action for health probes
21
- *
22
- * @interface HttpGetAction
23
- * @since 0.1.0
24
- */
25
- export interface HttpGetAction {
26
- /** HTTP path to probe */
27
- path?: string;
28
- /** Port number or name */
29
- port: number | string;
30
- /** HTTP or HTTPS scheme */
31
- scheme?: 'HTTP' | 'HTTPS';
32
- /** Additional HTTP headers */
33
- httpHeaders?: HttpHeader[];
34
- }
35
- /**
36
- * Exec action for health probes
37
- *
38
- * @interface ExecAction
39
- * @since 0.1.0
40
- */
41
- export interface ExecAction {
42
- /** Command to execute */
43
- command: string[];
44
- }
45
- /**
46
- * TCP socket action for health probes
47
- *
48
- * @interface TcpSocketAction
49
- * @since 0.1.0
50
- */
51
- export interface TcpSocketAction {
52
- /** Port number or name */
53
- port: number | string;
54
- }
55
- /**
56
- * Kubernetes probe configuration
57
- *
58
- * @interface Probe
59
- * @since 0.1.0
60
- */
61
- export interface Probe {
62
- /** HTTP GET probe */
63
- httpGet?: HttpGetAction;
64
- /** Exec probe */
65
- exec?: ExecAction;
66
- /** TCP socket probe */
67
- tcpSocket?: TcpSocketAction;
68
- /** Initial delay before probing */
69
- initialDelaySeconds?: number;
70
- /** Probe frequency */
71
- periodSeconds?: number;
72
- /** Probe timeout */
73
- timeoutSeconds?: number;
74
- /** Success threshold */
75
- successThreshold?: number;
76
- /** Failure threshold */
77
- failureThreshold?: number;
78
- }
79
- /**
80
- * Environment variable source from ConfigMap or Secret
81
- *
82
- * @interface EnvFromSource
83
- * @since 0.1.0
84
- */
85
- export interface EnvFromSource {
86
- /** ConfigMap reference */
87
- configMapRef?: string;
88
- /** Secret reference */
89
- secretRef?: string;
90
- }
91
- /**
92
- * Volume source specification
93
- *
94
- * @interface VolumeSourceSpec
95
- * @since 0.1.0
96
- */
97
- export interface VolumeSourceSpec {
98
- /** Volume name */
99
- name: string;
100
- /** ConfigMap volume source */
101
- configMap?: string;
102
- /** Secret volume source */
103
- secret?: string;
104
- /** PersistentVolumeClaim source */
105
- persistentVolumeClaim?: string;
106
- }
107
- /**
108
- * Volume mount specification
109
- *
110
- * @interface VolumeMountSpec
111
- * @since 0.1.0
112
- */
113
- export interface VolumeMountSpec {
114
- /** Volume name to mount */
115
- name: string;
116
- /** Mount path in container */
117
- mountPath: string;
118
- /** Mount as read-only */
119
- readOnly?: boolean;
120
- /** Sub-path within volume */
121
- subPath?: string;
122
- }
123
- /**
124
- * Kubernetes resource requirements
125
- *
126
- * @interface ResourceRequirements
127
- * @since 0.1.0
128
- */
129
- export interface ResourceRequirements {
130
- /** Resource limits */
131
- limits?: {
132
- cpu?: string;
133
- memory?: string;
134
- };
135
- /** Resource requests */
136
- requests?: {
137
- cpu?: string;
138
- memory?: string;
139
- };
140
- }
141
- /**
142
- * Kubernetes PersistentVolume access modes
143
- *
144
- * @typedef {string} AccessMode
145
- * @since 1.0.0
146
- */
147
- export type AccessMode = 'ReadWriteOnce' | 'ReadOnlyMany' | 'ReadWriteMany' | 'ReadWriteOncePod';
148
- /**
149
- * Kubernetes volume modes
150
- *
151
- * @typedef {string} VolumeMode
152
- * @since 1.0.0
153
- */
154
- export type VolumeMode = 'Filesystem' | 'Block';
155
- /**
156
- * Kubernetes PersistentVolume reclaim policies
157
- *
158
- * @typedef {string} ReclaimPolicy
159
- * @since 1.0.0
160
- */
161
- export type ReclaimPolicy = 'Retain' | 'Recycle' | 'Delete';
162
- /**
163
- * CSI volume source specification
164
- *
165
- * @interface CsiVolumeSource
166
- * @since 1.0.0
167
- */
168
- export interface CsiVolumeSource {
169
- /** CSI driver name */
170
- driver: string;
171
- /** Volume handle */
172
- volumeHandle: string;
173
- /** Filesystem type */
174
- fsType?: string;
175
- /** Read-only volume */
176
- readOnly?: boolean;
177
- /** Volume attributes */
178
- volumeAttributes?: Record<string, string>;
179
- /** Controller publish secret reference */
180
- controllerPublishSecretRef?: {
181
- name: string;
182
- namespace?: string;
183
- };
184
- /** Node stage secret reference */
185
- nodeStageSecretRef?: {
186
- name: string;
187
- namespace?: string;
188
- };
189
- /** Node publish secret reference */
190
- nodePublishSecretRef?: {
191
- name: string;
192
- namespace?: string;
193
- };
194
- /** Controller expand secret reference */
195
- controllerExpandSecretRef?: {
196
- name: string;
197
- namespace?: string;
198
- };
199
- }
200
- /**
201
- * NFS volume source specification
202
- *
203
- * @interface NfsVolumeSource
204
- * @since 1.0.0
205
- */
206
- export interface NfsVolumeSource {
207
- /** NFS server */
208
- server: string;
209
- /** NFS path */
210
- path: string;
211
- /** Read-only mount */
212
- readOnly?: boolean;
213
- }
214
- /**
215
- * AWS Elastic Block Store volume source
216
- *
217
- * @interface AwsElasticBlockStoreSource
218
- * @since 1.0.0
219
- */
220
- export interface AwsElasticBlockStoreSource {
221
- /** EBS volume ID */
222
- volumeID: string;
223
- /** Filesystem type */
224
- fsType?: string;
225
- /** Partition number */
226
- partition?: number;
227
- /** Read-only volume */
228
- readOnly?: boolean;
229
- }
230
- /**
231
- * Host path volume source
232
- *
233
- * @interface HostPathSource
234
- * @since 1.0.0
235
- */
236
- export interface HostPathSource {
237
- /** Host path */
238
- path: string;
239
- /** Path type */
240
- type?: string;
241
- }
242
- /**
243
- * PersistentVolume source specification
244
- *
245
- * @interface PersistentVolumeSourceSpec
246
- * @since 1.0.0
247
- */
248
- export interface PersistentVolumeSourceSpec {
249
- /** CSI volume source */
250
- csi?: CsiVolumeSource;
251
- /** NFS volume source */
252
- nfs?: NfsVolumeSource;
253
- /** AWS EBS volume source */
254
- awsElasticBlockStore?: AwsElasticBlockStoreSource;
255
- /** Host path volume source */
256
- hostPath?: HostPathSource;
257
- /** Azure Disk volume source */
258
- azureDisk?: {
259
- /** Disk name */
260
- diskName: string;
261
- /** Disk URI */
262
- diskURI: string;
263
- /** Caching mode */
264
- cachingMode?: 'None' | 'ReadOnly' | 'ReadWrite';
265
- /** Filesystem type */
266
- fsType?: string;
267
- /** Read-only disk */
268
- readOnly?: boolean;
269
- /** Disk kind */
270
- kind?: 'Shared' | 'Dedicated' | 'Managed';
271
- };
272
- /** Azure File volume source */
273
- azureFile?: {
274
- /** Secret name */
275
- secretName: string;
276
- /** Share name */
277
- shareName: string;
278
- /** Read-only file */
279
- readOnly?: boolean;
280
- /** Secret namespace */
281
- secretNamespace?: string;
282
- };
283
- /** GCE Persistent Disk volume source */
284
- gcePersistentDisk?: {
285
- /** Persistent disk name */
286
- pdName: string;
287
- /** Filesystem type */
288
- fsType?: string;
289
- /** Partition number */
290
- partition?: number;
291
- /** Read-only disk */
292
- readOnly?: boolean;
293
- };
294
- /** Custom volume sources */
295
- [key: string]: unknown;
296
- }
297
- /**
298
- * Kubernetes PersistentVolume specification
299
- *
300
- * @interface PersistentVolumeSpec
301
- * @since 1.0.0
302
- */
303
- export interface PersistentVolumeSpec {
304
- /** PersistentVolume name */
305
- name: string;
306
- /** Storage capacity (e.g., '10Gi') */
307
- capacity: string;
308
- /** Access modes */
309
- accessModes: AccessMode[];
310
- /** Storage class name */
311
- storageClassName?: string;
312
- /** Volume mode */
313
- volumeMode?: VolumeMode;
314
- /** Reclaim policy */
315
- reclaimPolicy?: ReclaimPolicy;
316
- /** Mount options */
317
- mountOptions?: string[];
318
- /** Node affinity */
319
- nodeAffinity?: Record<string, unknown>;
320
- /** PersistentVolume labels */
321
- labels?: Record<string, string>;
322
- /** PersistentVolume annotations */
323
- annotations?: Record<string, string>;
324
- /** Volume source */
325
- source: PersistentVolumeSourceSpec;
326
- /** Reference to related PVC for binding */
327
- claimRef?: {
328
- name: string;
329
- namespace?: string;
330
- };
331
- /** Cloud provider for optimized defaults */
332
- cloudProvider?: 'aws' | 'azure' | 'gcp';
333
- }
334
- /**
335
- * Kubernetes Deployment specification
336
- *
337
- * @interface DeploymentSpec
338
- * @since 0.1.0
339
- *
340
- * @example
341
- * ```typescript
342
- * const deployment: DeploymentSpec = {
343
- * name: 'web-app',
344
- * image: 'nginx:1.21',
345
- * replicas: 3,
346
- * containerPort: 80,
347
- * env: { NODE_ENV: 'production' }
348
- * };
349
- * ```
350
- */
351
- export interface DeploymentSpec {
352
- /** Deployment name */
353
- name: string;
354
- /** Container image */
355
- image: string;
356
- /** Number of replicas */
357
- replicas?: number;
358
- /** Container port */
359
- containerPort?: number;
360
- /** Environment variables */
361
- env?: Record<string, string>;
362
- /** Environment from ConfigMap/Secret */
363
- envFrom?: EnvFromSource[];
364
- /** Volume sources */
365
- volumes?: VolumeSourceSpec[];
366
- /** Volume mounts */
367
- volumeMounts?: VolumeMountSpec[];
368
- /** Resource requirements */
369
- resources?: ResourceRequirements;
370
- /** Liveness probe */
371
- livenessProbe?: Probe;
372
- /** Readiness probe */
373
- readinessProbe?: Probe;
374
- /** Image pull policy */
375
- imagePullPolicy?: 'Always' | 'IfNotPresent' | 'Never';
376
- /** Service account name */
377
- serviceAccountName?: string;
378
- /** Pod selector labels */
379
- matchLabels?: Record<string, string>;
380
- /** Deployment metadata labels */
381
- labels?: Record<string, string>;
382
- /** Deployment metadata annotations */
383
- annotations?: Record<string, string>;
384
- /** Pod template labels */
385
- podLabels?: Record<string, string>;
386
- /** Pod template annotations */
387
- podAnnotations?: Record<string, string>;
388
- }
389
- /**
390
- * Kubernetes ReplicaSet specification
391
- *
392
- * @interface ReplicaSetSpec
393
- * @since 1.0.0
394
- */
395
- export interface ReplicaSetSpec {
396
- /** ReplicaSet name */
397
- name: string;
398
- /** Container image */
399
- image: string;
400
- /** Number of replicas */
401
- replicas?: number;
402
- /** Container port */
403
- containerPort?: number;
404
- /** Environment variables */
405
- env?: Record<string, string>;
406
- /** Environment from ConfigMap/Secret */
407
- envFrom?: EnvFromSource[];
408
- /** Volume sources */
409
- volumes?: VolumeSourceSpec[];
410
- /** Volume mounts */
411
- volumeMounts?: VolumeMountSpec[];
412
- /** Resource requirements */
413
- resources?: ResourceRequirements;
414
- /** Liveness probe */
415
- livenessProbe?: Probe;
416
- /** Readiness probe */
417
- readinessProbe?: Probe;
418
- /** Image pull policy */
419
- imagePullPolicy?: 'Always' | 'IfNotPresent' | 'Never';
420
- /** Service account name */
421
- serviceAccountName?: string;
422
- /** Pod selector labels */
423
- matchLabels?: Record<string, string>;
424
- /** ReplicaSet metadata labels */
425
- labels?: Record<string, string>;
426
- /** ReplicaSet metadata annotations */
427
- annotations?: Record<string, string>;
428
- /** Pod template labels */
429
- podLabels?: Record<string, string>;
430
- /** Pod template annotations */
431
- podAnnotations?: Record<string, string>;
432
- }
433
- /**
434
- * Kubernetes Job specification
435
- *
436
- * @interface JobSpec
437
- * @since 2.1.0
438
- */
439
- export interface JobSpec {
440
- /** Job name */
441
- name: string;
442
- /** Container image */
443
- image: string;
444
- /** Command to run */
445
- command?: string[];
446
- /** Arguments to command */
447
- args?: string[];
448
- /** Environment variables */
449
- env?: Record<string, string>;
450
- /** Environment from ConfigMap/Secret */
451
- envFrom?: EnvFromSource[];
452
- /** Volume sources */
453
- volumes?: VolumeSourceSpec[];
454
- /** Volume mounts */
455
- volumeMounts?: VolumeMountSpec[];
456
- /** Resource requirements */
457
- resources?: ResourceRequirements;
458
- /** Restart policy */
459
- restartPolicy?: 'Never' | 'OnFailure';
460
- /** Backoff limit for retries */
461
- backoffLimit?: number;
462
- /** Active deadline in seconds */
463
- activeDeadlineSeconds?: number;
464
- /** TTL after finished in seconds */
465
- ttlSecondsAfterFinished?: number;
466
- /** Number of completions */
467
- completions?: number;
468
- /** Parallelism level */
469
- parallelism?: number;
470
- /** Completion mode */
471
- completionMode?: 'NonIndexed' | 'Indexed';
472
- /** Suspend job execution */
473
- suspend?: boolean;
474
- /** Image pull policy */
475
- imagePullPolicy?: 'Always' | 'IfNotPresent' | 'Never';
476
- /** Service account name */
477
- serviceAccountName?: string;
478
- /** Job metadata labels */
479
- labels?: Record<string, string>;
480
- /** Job metadata annotations */
481
- annotations?: Record<string, string>;
482
- /** Pod template labels */
483
- podLabels?: Record<string, string>;
484
- /** Pod template annotations */
485
- podAnnotations?: Record<string, string>;
486
- }
487
- /**
488
- * Kubernetes CronJob specification
489
- *
490
- * @interface CronJobSpec
491
- * @since 2.1.0
492
- */
493
- export interface CronJobSpec {
494
- /** CronJob name */
495
- name: string;
496
- /** Cron schedule expression */
497
- schedule: string;
498
- /** Container image */
499
- image: string;
500
- /** Command to run */
501
- command?: string[];
502
- /** Arguments to command */
503
- args?: string[];
504
- /** Environment variables */
505
- env?: Record<string, string>;
506
- /** Environment from ConfigMap/Secret */
507
- envFrom?: EnvFromSource[];
508
- /** Volume sources */
509
- volumes?: VolumeSourceSpec[];
510
- /** Volume mounts */
511
- volumeMounts?: VolumeMountSpec[];
512
- /** Resource requirements */
513
- resources?: ResourceRequirements;
514
- /** Restart policy */
515
- restartPolicy?: 'Never' | 'OnFailure';
516
- /** Backoff limit for retries */
517
- backoffLimit?: number;
518
- /** Active deadline in seconds */
519
- activeDeadlineSeconds?: number;
520
- /** TTL after finished in seconds */
521
- ttlSecondsAfterFinished?: number;
522
- /** Number of completions */
523
- completions?: number;
524
- /** Parallelism level */
525
- parallelism?: number;
526
- /** Completion mode */
527
- completionMode?: 'NonIndexed' | 'Indexed';
528
- /** Suspend job execution */
529
- suspend?: boolean;
530
- /** Starting deadline in seconds */
531
- startingDeadlineSeconds?: number;
532
- /** Concurrency policy */
533
- concurrencyPolicy?: 'Allow' | 'Forbid' | 'Replace';
534
- /** Successful jobs history limit */
535
- successfulJobsHistoryLimit?: number;
536
- /** Failed jobs history limit */
537
- failedJobsHistoryLimit?: number;
538
- /** Time zone */
539
- timeZone?: string;
540
- /** Image pull policy */
541
- imagePullPolicy?: 'Always' | 'IfNotPresent' | 'Never';
542
- /** Service account name */
543
- serviceAccountName?: string;
544
- /** CronJob metadata labels */
545
- labels?: Record<string, string>;
546
- /** CronJob metadata annotations */
547
- annotations?: Record<string, string>;
548
- /** Pod template labels */
549
- podLabels?: Record<string, string>;
550
- /** Pod template annotations */
551
- podAnnotations?: Record<string, string>;
552
- }
553
- /**
554
- * Kubernetes Service specification
555
- *
556
- * @interface ServiceSpec
557
- * @since 1.0.0
558
- *
559
- * @example
560
- * ```typescript
561
- * const service: ServiceSpec = {
562
- * name: 'web-service',
563
- * ports: [{ port: 80, targetPort: 8080 }],
564
- * type: 'LoadBalancer'
565
- * };
566
- * ```
567
- */
568
- export interface ServiceSpec {
569
- /** Service name */
570
- name: string;
571
- /** Service ports */
572
- ports: Array<{
573
- /** Service port */
574
- port: number;
575
- /** Target port on pods */
576
- targetPort?: number;
577
- /** Protocol */
578
- protocol?: 'TCP' | 'UDP' | 'SCTP';
579
- /** Port name */
580
- name?: string;
581
- /** NodePort (for NodePort/LoadBalancer) */
582
- nodePort?: number;
583
- }>;
584
- /** Service type */
585
- type?: 'ClusterIP' | 'NodePort' | 'LoadBalancer' | 'ExternalName';
586
- /** Pod selector */
587
- selector?: Record<string, string>;
588
- /** Cluster IP */
589
- clusterIP?: string;
590
- /** External name (for ExternalName type) */
591
- externalName?: string;
592
- /** Session affinity */
593
- sessionAffinity?: 'None' | 'ClientIP';
594
- /** Load balancer IP */
595
- loadBalancerIP?: string;
596
- /** Load balancer source ranges */
597
- loadBalancerSourceRanges?: string[];
598
- /** Load balancer class */
599
- loadBalancerClass?: string;
600
- /** External traffic policy */
601
- externalTrafficPolicy?: 'Cluster' | 'Local';
602
- /** Internal traffic policy */
603
- internalTrafficPolicy?: 'Cluster' | 'Local';
604
- /** IP family policy */
605
- ipFamilyPolicy?: 'SingleStack' | 'PreferDualStack' | 'RequireDualStack';
606
- /** IP families */
607
- ipFamilies?: Array<'IPv4' | 'IPv6'>;
608
- /** Service labels */
609
- labels?: Record<string, string>;
610
- /** Service annotations */
611
- annotations?: Record<string, string>;
612
- }
613
- /**
614
- * Kubernetes Ingress rule specification
615
- *
616
- * @interface IngressRule
617
- * @since 1.0.0
618
- */
619
- export interface IngressRule {
620
- /** Host name */
621
- host?: string;
622
- /** Path rules */
623
- paths: Array<{
624
- /** URL path */
625
- path: string;
626
- /** Path matching type */
627
- pathType: 'Exact' | 'Prefix' | 'ImplementationSpecific';
628
- /** Backend service */
629
- backend: {
630
- service: {
631
- name: string;
632
- port: {
633
- number?: number;
634
- name?: string;
635
- };
636
- };
637
- };
638
- }>;
639
- }
640
- /**
641
- * Kubernetes Ingress TLS specification
642
- *
643
- * @interface IngressTLS
644
- * @since 1.0.0
645
- */
646
- export interface IngressTLS {
647
- /** TLS hosts */
648
- hosts?: string[];
649
- /** Secret name containing TLS certificate */
650
- secretName?: string;
651
- }
652
- /**
653
- * Kubernetes Ingress specification
654
- *
655
- * @interface IngressSpec
656
- * @since 1.0.0
657
- */
658
- export interface IngressSpec {
659
- /** Ingress name */
660
- name: string;
661
- /** Ingress rules */
662
- rules: IngressRule[];
663
- /** TLS configuration */
664
- tls?: IngressTLS[];
665
- /** Ingress class name */
666
- ingressClassName?: string;
667
- /** Default backend */
668
- defaultBackend?: {
669
- service: {
670
- name: string;
671
- port: {
672
- number?: number;
673
- name?: string;
674
- };
675
- };
676
- };
677
- /** Ingress labels */
678
- labels?: Record<string, string>;
679
- /** Ingress annotations */
680
- annotations?: Record<string, string>;
681
- }
682
- /**
683
- * Kubernetes ConfigMap specification
684
- *
685
- * @interface ConfigMapSpec
686
- * @since 1.0.0
687
- */
688
- export interface ConfigMapSpec {
689
- /** ConfigMap name */
690
- name: string;
691
- /** String data */
692
- data?: Record<string, string>;
693
- /** Binary data */
694
- binaryData?: Record<string, string>;
695
- /** Immutable ConfigMap */
696
- immutable?: boolean;
697
- /** ConfigMap labels */
698
- labels?: Record<string, string>;
699
- /** ConfigMap annotations */
700
- annotations?: Record<string, string>;
701
- }
702
- /**
703
- * Kubernetes Secret specification
704
- *
705
- * @interface SecretSpec
706
- * @since 1.0.0
707
- */
708
- export interface SecretSpec {
709
- /** Secret name */
710
- name: string;
711
- /** Secret type */
712
- type?: string;
713
- /** String data (unencoded) */
714
- stringData?: Record<string, string>;
715
- /** Base64-encoded data */
716
- data?: Record<string, string>;
717
- /** Immutable Secret */
718
- immutable?: boolean;
719
- /** Secret labels */
720
- labels?: Record<string, string>;
721
- /** Secret annotations */
722
- annotations?: Record<string, string>;
723
- }
724
- /**
725
- * Kubernetes PersistentVolumeClaim specification
726
- *
727
- * @interface PersistentVolumeClaimSpec
728
- * @since 1.0.0
729
- */
730
- export interface PersistentVolumeClaimSpec {
731
- /** PersistentVolumeClaim name */
732
- name: string;
733
- /** Access modes */
734
- accessModes: AccessMode[];
735
- /** Resource requirements */
736
- resources: {
737
- requests: {
738
- storage: string;
739
- };
740
- limits?: {
741
- storage: string;
742
- };
743
- };
744
- /** Storage class name */
745
- storageClassName?: string;
746
- /** Volume mode */
747
- volumeMode?: VolumeMode;
748
- /** Volume selector */
749
- selector?: {
750
- matchLabels?: Record<string, string>;
751
- matchExpressions?: unknown[];
752
- };
753
- /** PersistentVolumeClaim labels */
754
- labels?: Record<string, string>;
755
- /** PersistentVolumeClaim annotations */
756
- annotations?: Record<string, string>;
757
- /** Reference to specific PV for static binding */
758
- volumeName?: string;
759
- /** Cloud provider for optimized defaults */
760
- cloudProvider?: 'aws' | 'azure' | 'gcp';
761
- }
762
- /**
763
- * Kubernetes ServiceAccount specification with multi-cloud workload identity support
764
- *
765
- * @interface ServiceAccountSpec
766
- * @since 1.0.0
767
- */
768
- export interface ServiceAccountSpec {
769
- /** ServiceAccount name */
770
- name: string;
771
- /** ServiceAccount annotations */
772
- annotations?: Record<string, string>;
773
- /** ServiceAccount labels */
774
- labels?: Record<string, string>;
775
- /** Automount service account token */
776
- automountServiceAccountToken?: boolean;
777
- /** Image pull secrets */
778
- imagePullSecrets?: string[];
779
- /** Secrets to mount */
780
- secrets?: string[];
781
- /** EKS IRSA: IAM role ARN */
782
- awsRoleArn?: string;
783
- /** IRSA audience for token validation */
784
- awsAudience?: string;
785
- /** AWS STS endpoint type */
786
- awsStsEndpointType?: 'regional' | 'legacy';
787
- /** AWS region for regional STS endpoint */
788
- awsRegion?: string;
789
- /** Token expiration time in seconds */
790
- awsTokenExpiration?: number;
791
- /** AKS Workload Identity: Azure client ID */
792
- azureClientId?: string;
793
- /** AKS Workload Identity: Azure tenant ID */
794
- azureTenantId?: string;
795
- /** AKS Workload Identity: token expiration */
796
- azureServiceAccountTokenExpiration?: number;
797
- /** GKE Workload Identity: service account email */
798
- gcpServiceAccountEmail?: string;
799
- }
800
- /**
801
- * HorizontalPodAutoscaler metric specification
802
- *
803
- * @interface HorizontalPodAutoscalerMetric
804
- * @since 1.0.0
805
- */
806
- export interface HorizontalPodAutoscalerMetric {
807
- /** Metric type */
808
- type: 'Resource' | 'Pods' | 'Object' | 'External';
809
- /** Resource metric */
810
- resource?: {
811
- /** Resource name */
812
- name: 'cpu' | 'memory';
813
- /** Target specification */
814
- target: {
815
- /** Target type */
816
- type: 'Utilization' | 'AverageValue';
817
- /** Average utilization percentage */
818
- averageUtilization?: number;
819
- /** Average value */
820
- averageValue?: string;
821
- };
822
- };
823
- /** Pods metric */
824
- pods?: {
825
- /** Metric specification */
826
- metric: {
827
- name: string;
828
- selector?: Record<string, unknown>;
829
- };
830
- /** Target specification */
831
- target: {
832
- type: 'AverageValue';
833
- averageValue: string;
834
- };
835
- };
836
- /** Object metric */
837
- object?: {
838
- /** Metric specification */
839
- metric: {
840
- name: string;
841
- selector?: Record<string, unknown>;
842
- };
843
- /** Described object */
844
- describedObject: {
845
- apiVersion: string;
846
- kind: string;
847
- name: string;
848
- };
849
- /** Target specification */
850
- target: {
851
- type: 'Value' | 'AverageValue';
852
- value?: string;
853
- averageValue?: string;
854
- };
855
- };
856
- /** External metric */
857
- external?: {
858
- /** Metric specification */
859
- metric: {
860
- name: string;
861
- selector?: Record<string, unknown>;
862
- };
863
- /** Target specification */
864
- target: {
865
- type: 'Value' | 'AverageValue';
866
- value?: string;
867
- averageValue?: string;
868
- };
869
- };
870
- }
871
- /**
872
- * HorizontalPodAutoscaler behavior specification
873
- *
874
- * @interface HorizontalPodAutoscalerBehavior
875
- * @since 1.0.0
876
- */
877
- export interface HorizontalPodAutoscalerBehavior {
878
- /** Scale up behavior */
879
- scaleUp?: {
880
- /** Stabilization window in seconds */
881
- stabilizationWindowSeconds?: number;
882
- /** Policy selection */
883
- selectPolicy?: 'Max' | 'Min' | 'Disabled';
884
- /** Scaling policies */
885
- policies?: Array<{
886
- /** Policy type */
887
- type: 'Pods' | 'Percent';
888
- /** Policy value */
889
- value: number;
890
- /** Period in seconds */
891
- periodSeconds: number;
892
- }>;
893
- };
894
- /** Scale down behavior */
895
- scaleDown?: {
896
- /** Stabilization window in seconds */
897
- stabilizationWindowSeconds?: number;
898
- /** Policy selection */
899
- selectPolicy?: 'Max' | 'Min' | 'Disabled';
900
- /** Scaling policies */
901
- policies?: Array<{
902
- /** Policy type */
903
- type: 'Pods' | 'Percent';
904
- /** Policy value */
905
- value: number;
906
- /** Period in seconds */
907
- periodSeconds: number;
908
- }>;
909
- };
910
- }
911
- /**
912
- * Kubernetes HorizontalPodAutoscaler specification
913
- *
914
- * @interface HorizontalPodAutoscalerSpec
915
- * @since 1.0.0
916
- */
917
- export interface HorizontalPodAutoscalerSpec {
918
- /** HPA name */
919
- name: string;
920
- /** Scale target reference */
921
- scaleTargetRef: {
922
- /** API version */
923
- apiVersion: string;
924
- /** Resource kind */
925
- kind: 'Deployment' | 'StatefulSet' | 'ReplicaSet';
926
- /** Resource name */
927
- name: string;
928
- };
929
- /** Minimum replicas */
930
- minReplicas?: number;
931
- /** Maximum replicas */
932
- maxReplicas: number;
933
- /** Scaling metrics */
934
- metrics?: HorizontalPodAutoscalerMetric[];
935
- /** Scaling behavior */
936
- behavior?: HorizontalPodAutoscalerBehavior;
937
- /** HPA labels */
938
- labels?: Record<string, string>;
939
- /** HPA annotations */
940
- annotations?: Record<string, string>;
941
- }
942
- export interface VerticalPodAutoscalerResourcePolicy {
943
- containerName?: string;
944
- mode?: 'Auto' | 'Off';
945
- minAllowed?: {
946
- cpu?: string;
947
- memory?: string;
948
- };
949
- maxAllowed?: {
950
- cpu?: string;
951
- memory?: string;
952
- };
953
- controlledResources?: Array<'cpu' | 'memory'>;
954
- controlledValues?: 'RequestsAndLimits' | 'RequestsOnly';
955
- }
956
- export interface VerticalPodAutoscalerUpdatePolicy {
957
- updateMode?: 'Off' | 'Initial' | 'Recreation' | 'Auto';
958
- minReplicas?: number;
959
- }
960
- export interface PodDisruptionBudgetSpec {
961
- name: string;
962
- minAvailable?: number | string;
963
- maxUnavailable?: number | string;
964
- selector?: {
965
- matchLabels?: Record<string, string>;
966
- matchExpressions?: Array<{
967
- key: string;
968
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
969
- values?: string[];
970
- }>;
971
- };
972
- labels?: Record<string, string>;
973
- annotations?: Record<string, string>;
974
- }
975
- /**
976
- * AWS EBS StorageClass specification
977
- *
978
- * @interface AWSEBSStorageClassSpec
979
- * @extends CloudResourceTags
980
- * @since 1.0.0
981
- */
982
- export interface AWSEBSStorageClassSpec extends CloudResourceTags {
983
- /** StorageClass name */
984
- name: string;
985
- /** EBS volume type */
986
- volumeType?: 'gp2' | 'gp3' | 'io1' | 'io2' | 'sc1' | 'st1';
987
- /** Filesystem type */
988
- fsType?: 'ext4' | 'xfs';
989
- /** Enable encryption */
990
- encrypted?: boolean;
991
- /** KMS key ID for encryption */
992
- kmsKeyId?: string;
993
- /** IOPS for io1/io2 volumes */
994
- iops?: number;
995
- /** Throughput for gp3 volumes */
996
- throughput?: number;
997
- /** Volume reclaim policy */
998
- reclaimPolicy?: 'Delete' | 'Retain';
999
- /** Allow volume expansion */
1000
- allowVolumeExpansion?: boolean;
1001
- /** Volume binding mode */
1002
- volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
1003
- /** StorageClass labels */
1004
- labels?: Record<string, string>;
1005
- /** StorageClass annotations */
1006
- annotations?: Record<string, string>;
1007
- }
1008
- export interface AWSEBSPersistentVolumeClaimSpec {
1009
- name: string;
1010
- storageClassName: string;
1011
- size: string;
1012
- accessModes?: AccessMode[];
1013
- labels?: Record<string, string>;
1014
- annotations?: Record<string, string>;
1015
- }
1016
- export interface AWSEFSStorageClassSpec {
1017
- name: string;
1018
- reclaimPolicy?: 'Delete' | 'Retain';
1019
- volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
1020
- labels?: Record<string, string>;
1021
- annotations?: Record<string, string>;
1022
- }
1023
- export interface AWSEFSPersistentVolumeSpec {
1024
- name: string;
1025
- fileSystemId: string;
1026
- accessPoint?: string;
1027
- directoryPerms?: string;
1028
- gidRangeStart?: number;
1029
- gidRangeEnd?: number;
1030
- basePath?: string;
1031
- subPath?: string;
1032
- capacity?: string;
1033
- accessModes?: AccessMode[];
1034
- storageClassName?: string;
1035
- labels?: Record<string, string>;
1036
- annotations?: Record<string, string>;
1037
- }
1038
- export interface AWSEFSPersistentVolumeClaimSpec {
1039
- name: string;
1040
- storageClassName: string;
1041
- size?: string;
1042
- accessModes?: AccessMode[];
1043
- labels?: Record<string, string>;
1044
- annotations?: Record<string, string>;
1045
- }
1046
- export interface AWSIRSAServiceAccountSpec {
1047
- name: string;
1048
- roleArn: string;
1049
- audience?: string;
1050
- stsEndpointType?: 'regional' | 'legacy';
1051
- region?: string;
1052
- tokenExpiration?: number;
1053
- labels?: Record<string, string>;
1054
- annotations?: Record<string, string>;
1055
- automountServiceAccountToken?: boolean;
1056
- imagePullSecrets?: string[];
1057
- secrets?: string[];
1058
- }
1059
- export interface AWSSecretsManagerObject {
1060
- objectName: string;
1061
- objectType: 'secretsmanager';
1062
- objectAlias?: string;
1063
- jmesPath?: string;
1064
- }
1065
- export interface AWSParameterStoreObject {
1066
- objectName: string;
1067
- objectType: 'ssmparameter';
1068
- objectAlias?: string;
1069
- }
1070
- export interface AWSSecretProviderClassSpec {
1071
- name: string;
1072
- region?: string;
1073
- objects: (AWSSecretsManagerObject | AWSParameterStoreObject)[];
1074
- labels?: Record<string, string>;
1075
- annotations?: Record<string, string>;
1076
- }
1077
- /**
1078
- * Configuration interface for Azure Workload Identity ServiceAccount.
1079
- * Enables secure authentication to Azure services without storing credentials.
1080
- *
1081
- * @see https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview
1082
- */
1083
- export interface AzureWorkloadIdentityServiceAccountSpec {
1084
- /** Name of the ServiceAccount */
1085
- name: string;
1086
- /** Azure application client ID for workload identity */
1087
- clientId: string;
1088
- /** Azure tenant ID where the application is registered */
1089
- tenantId: string;
1090
- /** Service account token expiration in seconds (3600-86400) */
1091
- tokenExpiration?: number;
1092
- /** Labels to apply to the ServiceAccount */
1093
- labels?: Record<string, string>;
1094
- /** Additional annotations to apply to the ServiceAccount */
1095
- annotations?: Record<string, string>;
1096
- /** Whether to automount service account token */
1097
- automountServiceAccountToken?: boolean;
1098
- /** Names of image pull secrets */
1099
- imagePullSecrets?: string[];
1100
- /** Names of secrets to mount */
1101
- secrets?: string[];
1102
- }
1103
- /**
1104
- * Azure Key Vault object configuration for SecretProviderClass.
1105
- */
1106
- export interface AzureKeyVaultObject {
1107
- /** Name of the object in Azure Key Vault */
1108
- objectName: string;
1109
- /** Type of object to retrieve */
1110
- objectType: 'secret' | 'key' | 'cert';
1111
- /** Optional alias for the object when mounted */
1112
- objectAlias?: string;
1113
- /** Optional version of the object */
1114
- objectVersion?: string;
1115
- }
1116
- /**
1117
- * Configuration interface for Azure Key Vault SecretProviderClass.
1118
- * Enables mounting secrets from Azure Key Vault using CSI driver.
1119
- *
1120
- * @see https://learn.microsoft.com/en-us/azure/aks/csi-secrets-store-driver
1121
- */
1122
- export interface AzureKeyVaultSecretProviderClassSpec {
1123
- /** Name of the SecretProviderClass */
1124
- name: string;
1125
- /** Name of the Azure Key Vault */
1126
- keyVaultName: string;
1127
- /** Azure tenant ID */
1128
- tenantId: string;
1129
- /** Objects to retrieve from Key Vault */
1130
- objects: AzureKeyVaultObject[];
1131
- /** User-assigned managed identity client ID for authentication */
1132
- userAssignedIdentityID?: string;
1133
- /** Azure cloud environment */
1134
- cloudName?: 'AzurePublicCloud' | 'AzureUSGovernmentCloud' | 'AzureChinaCloud';
1135
- /** Labels to apply to the SecretProviderClass */
1136
- labels?: Record<string, string>;
1137
- /** Additional annotations to apply to the SecretProviderClass */
1138
- annotations?: Record<string, string>;
1139
- }
1140
- /**
1141
- * Configuration interface for Azure Files StorageClass.
1142
- * Defines parameters for creating Azure Files StorageClass in AKS.
1143
- *
1144
- * @see https://learn.microsoft.com/en-us/azure/aks/azure-csi-files-storage-provision
1145
- */
1146
- export interface AzureFilesStorageClassSpec {
1147
- /** Name of the StorageClass */
1148
- name: string;
1149
- /** Azure Files SKU */
1150
- skuName?: 'Standard_LRS' | 'Standard_GRS' | 'Standard_RAGRS' | 'Standard_ZRS' | 'Premium_LRS' | 'Premium_ZRS';
1151
- /** File share protocol */
1152
- protocol?: 'smb' | 'nfs';
1153
- /** Allow shared access across multiple pods */
1154
- allowSharedAccess?: boolean;
1155
- /** Resource group for storage account */
1156
- resourceGroup?: string;
1157
- /** Storage account name */
1158
- storageAccount?: string;
1159
- /** Location for storage account */
1160
- location?: string;
1161
- /** Network endpoints for storage account */
1162
- networkEndpointType?: 'publicEndpoint' | 'privateEndpoint';
1163
- /** Mount permissions for NFS (e.g., '0777') */
1164
- mountPermissions?: string;
1165
- /** Root squash type for NFS */
1166
- rootSquashType?: 'NoRootSquash' | 'RootSquash' | 'AllSquash';
1167
- /** Volume reclaim policy */
1168
- reclaimPolicy?: 'Delete' | 'Retain';
1169
- /** Allow volume expansion */
1170
- allowVolumeExpansion?: boolean;
1171
- /** Volume binding mode */
1172
- volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
1173
- /** Mount options for the storage class */
1174
- mountOptions?: string[];
1175
- /** Labels to apply to the StorageClass */
1176
- labels?: Record<string, string>;
1177
- /** Annotations to apply to the StorageClass */
1178
- annotations?: Record<string, string>;
1179
- }
1180
- /**
1181
- * Configuration interface for Azure Files PersistentVolume.
1182
- * Defines parameters for static Azure Files volume provisioning.
1183
- */
1184
- export interface AzureFilesPersistentVolumeSpec {
1185
- /** Name of the PersistentVolume */
1186
- name: string;
1187
- /** Storage capacity */
1188
- capacity: string;
1189
- /** Access modes */
1190
- accessModes?: AccessMode[];
1191
- /** Storage account name */
1192
- storageAccount: string;
1193
- /** File share name */
1194
- shareName: string;
1195
- /** Resource group name */
1196
- resourceGroup?: string;
1197
- /** File share protocol */
1198
- protocol?: 'smb' | 'nfs';
1199
- /** Secret name containing storage account key (SMB only) */
1200
- secretName?: string;
1201
- /** Secret namespace (SMB only) */
1202
- secretNamespace?: string;
1203
- /** Server address override */
1204
- server?: string;
1205
- /** Folder name within share */
1206
- folderName?: string;
1207
- /** Mount permissions for NFS */
1208
- mountPermissions?: string;
1209
- /** Volume reclaim policy */
1210
- reclaimPolicy?: ReclaimPolicy;
1211
- /** Storage class name */
1212
- storageClassName?: string;
1213
- /** Mount options */
1214
- mountOptions?: string[];
1215
- /** Labels to apply to the PersistentVolume */
1216
- labels?: Record<string, string>;
1217
- /** Annotations to apply to the PersistentVolume */
1218
- annotations?: Record<string, string>;
1219
- }
1220
- /**
1221
- * Configuration interface for Azure Files PersistentVolumeClaim.
1222
- * Simplifies creation of PVCs for Azure Files.
1223
- */
1224
- export interface AzureFilesPersistentVolumeClaimSpec {
1225
- /** Name of the PersistentVolumeClaim */
1226
- name: string;
1227
- /** Storage class name */
1228
- storageClassName: string;
1229
- /** Storage size request */
1230
- size: string;
1231
- /** Access modes */
1232
- accessModes?: AccessMode[];
1233
- /** Labels to apply to the PersistentVolumeClaim */
1234
- labels?: Record<string, string>;
1235
- /** Annotations to apply to the PersistentVolumeClaim */
1236
- annotations?: Record<string, string>;
1237
- }
1238
- /**
1239
- * Configuration interface for Azure Container Registry ServiceAccount.
1240
- * Simplifies ACR integration with AKS using managed identity.
1241
- */
1242
- export interface AzureACRServiceAccountSpec {
1243
- /** Name of the ServiceAccount */
1244
- name: string;
1245
- /** Azure Container Registry name */
1246
- acrName: string;
1247
- /** Resource group containing the ACR */
1248
- resourceGroup: string;
1249
- /** Client ID for Workload Identity (optional) */
1250
- clientId?: string;
1251
- /** Tenant ID for Workload Identity (optional) */
1252
- tenantId?: string;
1253
- /** Labels to apply to the ServiceAccount */
1254
- labels?: Record<string, string>;
1255
- /** Additional annotations to apply to the ServiceAccount */
1256
- annotations?: Record<string, string>;
1257
- /** Whether to automount service account token */
1258
- automountServiceAccountToken?: boolean;
1259
- /** Names of additional image pull secrets */
1260
- imagePullSecrets?: string[];
1261
- /** Names of secrets to mount */
1262
- secrets?: string[];
1263
- }
1264
- /**
1265
- * Cloud resource tags with basic validation
1266
- *
1267
- * @interface CloudResourceTags
1268
- * @since 1.0.0
1269
- */
1270
- export interface CloudResourceTags {
1271
- /** Resource tags as key-value pairs */
1272
- tags?: Record<string, string>;
1273
- }
1274
- /**
1275
- * Azure Disk StorageClass specification
1276
- *
1277
- * @interface AzureDiskStorageClassSpec
1278
- * @extends CloudResourceTags
1279
- * @since 1.0.0
1280
- */
1281
- export interface AzureDiskStorageClassSpec extends CloudResourceTags {
1282
- /** Name of the StorageClass */
1283
- name: string;
1284
- /** Azure disk SKU to use */
1285
- skuName?: 'Standard_LRS' | 'Premium_LRS' | 'StandardSSD_LRS' | 'PremiumV2_LRS' | 'UltraSSD_LRS' | 'Premium_ZRS' | 'StandardSSD_ZRS';
1286
- /** File system type to use */
1287
- fsType?: 'ext4' | 'ext3' | 'ext2' | 'xfs' | 'btrfs' | 'ntfs';
1288
- /** Host caching mode */
1289
- cachingMode?: 'None' | 'ReadOnly' | 'ReadWrite';
1290
- /** Resource group where disks will be created */
1291
- resourceGroup?: string;
1292
- /** IOPS for the disk (UltraSSD_LRS only) */
1293
- diskIOPSReadWrite?: number;
1294
- /** Throughput in MB/s (UltraSSD_LRS only) */
1295
- diskMBpsReadWrite?: number;
1296
- /** Logical sector size in bytes */
1297
- logicalSectorSize?: 512 | 4096;
1298
- /** ID of the disk encryption set */
1299
- diskEncryptionSetID?: string;
1300
- /** Type of disk encryption */
1301
- diskEncryptionType?: 'EncryptionAtRestWithCustomerKey' | 'EncryptionAtRestWithPlatformAndCustomerKeys';
1302
- /** Enable write accelerator */
1303
- writeAcceleratorEnabled?: boolean;
1304
- /** Network access policy for the disk */
1305
- networkAccessPolicy?: 'AllowAll' | 'DenyAll' | 'AllowPrivate';
1306
- /** ID of the disk access resource */
1307
- diskAccessID?: string;
1308
- /** Enable bursting (Premium SSD only) */
1309
- enableBursting?: boolean;
1310
- /** Maximum number of hosts that can attach to the disk simultaneously */
1311
- maxShares?: number;
1312
- /** Volume reclaim policy */
1313
- reclaimPolicy?: 'Delete' | 'Retain';
1314
- /** Allow volume expansion */
1315
- allowVolumeExpansion?: boolean;
1316
- /** Volume binding mode */
1317
- volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
1318
- /** Labels to apply to the StorageClass */
1319
- labels?: Record<string, string>;
1320
- /** Annotations to apply to the StorageClass */
1321
- annotations?: Record<string, string>;
1322
- }
1323
- /**
1324
- * AWS Application Load Balancer Ingress specification
1325
- *
1326
- * @interface AWSALBIngressSpec
1327
- * @extends CloudResourceTags
1328
- * @since 1.0.0
1329
- */
1330
- export interface AWSALBIngressSpec extends CloudResourceTags {
1331
- /** Ingress name */
1332
- name: string;
1333
- /** Ingress rules */
1334
- rules: IngressRule[];
1335
- /** TLS configuration */
1336
- tls?: IngressTLS[];
1337
- /** Load balancer scheme */
1338
- scheme?: 'internet-facing' | 'internal';
1339
- /** Target type */
1340
- targetType?: 'instance' | 'ip';
1341
- /** IP address type */
1342
- ipAddressType?: 'ipv4' | 'dualstack';
1343
- /** ALB group name */
1344
- groupName?: string;
1345
- /** ALB group order */
1346
- groupOrder?: number;
1347
- /** Subnet IDs */
1348
- subnets?: string[];
1349
- /** Security group IDs */
1350
- securityGroups?: string[];
1351
- /** SSL certificate ARN */
1352
- certificateArn?: string;
1353
- /** Enable SSL redirect */
1354
- sslRedirect?: boolean;
1355
- /** Health check path */
1356
- healthCheckPath?: string;
1357
- /** Health check interval */
1358
- healthCheckIntervalSeconds?: number;
1359
- /** Health check timeout */
1360
- healthCheckTimeoutSeconds?: number;
1361
- /** Healthy threshold count */
1362
- healthyThresholdCount?: number;
1363
- /** Unhealthy threshold count */
1364
- unhealthyThresholdCount?: number;
1365
- /** Ingress labels */
1366
- labels?: Record<string, string>;
1367
- /** Ingress annotations */
1368
- annotations?: Record<string, string>;
1369
- }
1370
- /**
1371
- * Azure Application Gateway Ingress Controller specification
1372
- *
1373
- * @interface AzureAGICIngressSpec
1374
- * @since 1.0.0
1375
- */
1376
- export interface AzureAGICIngressSpec {
1377
- /** Name of the Ingress resource */
1378
- name: string;
1379
- /** Ingress rules defining routing configuration */
1380
- rules: IngressRule[];
1381
- /** TLS configuration for HTTPS termination */
1382
- tls?: IngressTLS[];
1383
- /** Backend path prefix to rewrite request paths */
1384
- backendPathPrefix?: string;
1385
- /** Backend hostname for Application Gateway to use when communicating with pods */
1386
- backendHostname?: string;
1387
- /** Backend protocol (http or https) */
1388
- backendProtocol?: 'http' | 'https';
1389
- /** Enable SSL redirect from HTTP to HTTPS */
1390
- sslRedirect?: boolean;
1391
- /** Use private IP address of Application Gateway */
1392
- usePrivateIp?: boolean;
1393
- /** Override frontend port (default: 80 for HTTP, 443 for HTTPS) */
1394
- overrideFrontendPort?: number;
1395
- /** Enable cookie-based session affinity */
1396
- cookieBasedAffinity?: boolean;
1397
- /** Request timeout in seconds */
1398
- requestTimeout?: number;
1399
- /** Enable connection draining */
1400
- connectionDraining?: boolean;
1401
- /** Connection draining timeout in seconds */
1402
- connectionDrainingTimeout?: number;
1403
- /** Custom health probe hostname */
1404
- healthProbeHostname?: string;
1405
- /** Custom health probe port */
1406
- healthProbePort?: number;
1407
- /** Custom health probe path */
1408
- healthProbePath?: string;
1409
- /** Accepted HTTP status codes for health probe */
1410
- healthProbeStatusCodes?: string;
1411
- /** Health probe interval in seconds */
1412
- healthProbeInterval?: number;
1413
- /** Health probe timeout in seconds */
1414
- healthProbeTimeout?: number;
1415
- /** Health probe unhealthy threshold */
1416
- healthProbeUnhealthyThreshold?: number;
1417
- /**
1418
- * Additional hostnames for multisite listener
1419
- * @security Validate hostname format to prevent injection attacks
1420
- */
1421
- hostnameExtension?: string[];
1422
- /**
1423
- * WAF policy resource ID for path-based protection
1424
- * @security Validate resource ID format to prevent path traversal attacks
1425
- */
1426
- wafPolicyForPath?: string;
1427
- /**
1428
- * Application Gateway SSL certificate name
1429
- * @security Ensure certificate exists and is properly configured
1430
- */
1431
- appgwSslCertificate?: string;
1432
- /** Application Gateway SSL profile name */
1433
- appgwSslProfile?: string;
1434
- /** Trusted root certificate names for end-to-end SSL */
1435
- appgwTrustedRootCertificate?: string[];
1436
- /** Rewrite rule set name */
1437
- rewriteRuleSet?: string;
1438
- /** Rule priority for request routing */
1439
- rulePriority?: number;
1440
- /** Labels to apply to the Ingress */
1441
- labels?: Record<string, string>;
1442
- /** Additional annotations to apply to the Ingress */
1443
- annotations?: Record<string, string>;
1444
- }
1445
- export interface VerticalPodAutoscalerSpec {
1446
- name: string;
1447
- targetRef: {
1448
- apiVersion: string;
1449
- kind: 'Deployment' | 'StatefulSet' | 'ReplicaSet' | 'DaemonSet' | 'Job' | 'CronJob';
1450
- name: string;
1451
- };
1452
- updatePolicy?: VerticalPodAutoscalerUpdatePolicy;
1453
- resourcePolicy?: {
1454
- containerPolicies?: VerticalPodAutoscalerResourcePolicy[];
1455
- };
1456
- recommenders?: Array<{
1457
- name: string;
1458
- }>;
1459
- labels?: Record<string, string>;
1460
- annotations?: Record<string, string>;
1461
- }
1462
- /**
1463
- * NetworkPolicy peer specification
1464
- *
1465
- * @interface NetworkPolicyPeer
1466
- * @since 1.0.0
1467
- */
1468
- export interface NetworkPolicyPeer {
1469
- podSelector?: {
1470
- matchLabels?: Record<string, string>;
1471
- matchExpressions?: Array<{
1472
- key: string;
1473
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
1474
- values?: string[];
1475
- }>;
1476
- };
1477
- namespaceSelector?: {
1478
- matchLabels?: Record<string, string>;
1479
- matchExpressions?: Array<{
1480
- key: string;
1481
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
1482
- values?: string[];
1483
- }>;
1484
- };
1485
- ipBlock?: {
1486
- cidr: string;
1487
- except?: string[];
1488
- };
1489
- }
1490
- /**
1491
- * NetworkPolicy port specification
1492
- *
1493
- * @interface NetworkPolicyPort
1494
- * @since 1.0.0
1495
- */
1496
- export interface NetworkPolicyPort {
1497
- protocol?: 'TCP' | 'UDP' | 'SCTP';
1498
- port?: number | string;
1499
- endPort?: number;
1500
- }
1501
- /**
1502
- * NetworkPolicy ingress rule specification
1503
- *
1504
- * @interface NetworkPolicyIngressRule
1505
- * @since 1.0.0
1506
- */
1507
- export interface NetworkPolicyIngressRule {
1508
- from?: NetworkPolicyPeer[];
1509
- ports?: NetworkPolicyPort[];
1510
- }
1511
- /**
1512
- * NetworkPolicy egress rule specification
1513
- *
1514
- * @interface NetworkPolicyEgressRule
1515
- * @since 1.0.0
1516
- */
1517
- export interface NetworkPolicyEgressRule {
1518
- to?: NetworkPolicyPeer[];
1519
- ports?: NetworkPolicyPort[];
1520
- }
1521
- /**
1522
- * NetworkPolicy specification
1523
- *
1524
- * @interface NetworkPolicySpec
1525
- * @since 1.0.0
1526
- */
1527
- export interface NetworkPolicySpec {
1528
- name: string;
1529
- podSelector?: {
1530
- matchLabels?: Record<string, string>;
1531
- matchExpressions?: Array<{
1532
- key: string;
1533
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
1534
- values?: string[];
1535
- }>;
1536
- };
1537
- policyTypes?: Array<'Ingress' | 'Egress'>;
1538
- ingress?: NetworkPolicyIngressRule[];
1539
- egress?: NetworkPolicyEgressRule[];
1540
- labels?: Record<string, string>;
1541
- annotations?: Record<string, string>;
1542
- }
1543
- /**
1544
- * Karpenter NodePool requirement for node selection
1545
- *
1546
- * @interface KarpenterNodeRequirement
1547
- * @since 1.0.0
1548
- */
1549
- /**
1550
- * Karpenter node requirement specification
1551
- *
1552
- * @interface KarpenterNodeRequirement
1553
- * @since 2.3.0
1554
- */
1555
- export interface KarpenterNodeRequirement {
1556
- /** Label key to match against */
1557
- key: string;
1558
- /** Operator for matching */
1559
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist' | 'Gt' | 'Lt';
1560
- /** Values to match */
1561
- values?: string[];
1562
- }
1563
- /**
1564
- * Karpenter NodePool disruption configuration
1565
- *
1566
- * @interface KarpenterNodeDisruption
1567
- * @since 1.0.0
1568
- */
1569
- /**
1570
- * Karpenter node disruption configuration
1571
- *
1572
- * @interface KarpenterNodeDisruption
1573
- * @since 2.3.0
1574
- */
1575
- export interface KarpenterNodeDisruption {
1576
- /** Policy for node consolidation */
1577
- consolidationPolicy?: 'WhenEmpty' | 'WhenUnderutilized';
1578
- /** Time to wait before consolidating empty nodes */
1579
- consolidateAfter?: string;
1580
- /** Maximum node lifetime before replacement */
1581
- expireAfter?: string;
1582
- }
1583
- /**
1584
- * Karpenter NodePool specification
1585
- *
1586
- * @interface KarpenterNodePoolSpec
1587
- * @since 1.0.0
1588
- */
1589
- /**
1590
- * Karpenter NodePool specification
1591
- *
1592
- * @interface KarpenterNodePoolSpec
1593
- * @since 2.3.0
1594
- */
1595
- export interface KarpenterNodePoolSpec {
1596
- /** Name of the NodePool */
1597
- name: string;
1598
- /** Node requirements for instance selection */
1599
- requirements?: KarpenterNodeRequirement[];
1600
- /** Resource limits for the NodePool */
1601
- limits?: {
1602
- cpu?: string;
1603
- memory?: string;
1604
- };
1605
- /** Node disruption configuration */
1606
- disruption?: KarpenterNodeDisruption;
1607
- /** Reference to NodeClass for AWS-specific configuration */
1608
- nodeClassRef: {
1609
- /** API group (default: eks.amazonaws.com) */
1610
- group?: string;
1611
- /** Resource kind (default: NodeClass) */
1612
- kind?: string;
1613
- /** NodeClass name */
1614
- name: string;
1615
- };
1616
- /** Taints to apply to provisioned nodes */
1617
- taints?: Array<{
1618
- key: string;
1619
- value?: string;
1620
- effect: 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute';
1621
- }>;
1622
- /** Labels to apply to the NodePool */
1623
- labels?: Record<string, string>;
1624
- /** Annotations to apply to the NodePool */
1625
- annotations?: Record<string, string>;
1626
- }
1627
- /**
1628
- * Karpenter block device mapping for EC2 instances
1629
- *
1630
- * @interface KarpenterBlockDeviceMapping
1631
- * @since 1.0.0
1632
- */
1633
- /**
1634
- * Karpenter block device mapping specification
1635
- *
1636
- * @interface KarpenterBlockDeviceMapping
1637
- * @since 2.3.0
1638
- */
1639
- export interface KarpenterBlockDeviceMapping {
1640
- /** Device name (e.g., /dev/xvda) */
1641
- deviceName: string;
1642
- /** EBS configuration */
1643
- ebs?: {
1644
- /** Volume size in GB */
1645
- volumeSize?: string;
1646
- /** Volume type */
1647
- volumeType?: 'gp2' | 'gp3' | 'io1' | 'io2' | 'sc1' | 'st1';
1648
- /** Enable encryption */
1649
- encrypted?: boolean;
1650
- /** Delete on termination */
1651
- deleteOnTermination?: boolean;
1652
- /** IOPS for io1/io2 volumes */
1653
- iops?: number;
1654
- /** Throughput for gp3 volumes */
1655
- throughput?: number;
1656
- };
1657
- }
1658
- /**
1659
- * Karpenter subnet selector term
1660
- *
1661
- * @interface KarpenterSubnetSelectorTerm
1662
- * @since 1.0.0
1663
- */
1664
- /**
1665
- * Karpenter subnet selector term specification
1666
- *
1667
- * @interface KarpenterSubnetSelectorTerm
1668
- * @since 2.3.0
1669
- */
1670
- export interface KarpenterSubnetSelectorTerm {
1671
- /** Subnet tags for selection */
1672
- tags?: Record<string, string>;
1673
- /** Specific subnet ID */
1674
- id?: string;
1675
- }
1676
- /**
1677
- * Karpenter security group selector term
1678
- *
1679
- * @interface KarpenterSecurityGroupSelectorTerm
1680
- * @since 1.0.0
1681
- */
1682
- /**
1683
- * Karpenter security group selector term specification
1684
- *
1685
- * @interface KarpenterSecurityGroupSelectorTerm
1686
- * @since 2.3.0
1687
- */
1688
- export interface KarpenterSecurityGroupSelectorTerm {
1689
- /** Security group tags for selection */
1690
- tags?: Record<string, string>;
1691
- /** Specific security group ID */
1692
- id?: string;
1693
- }
1694
- /**
1695
- * Karpenter EC2 NodeClass specification
1696
- *
1697
- * @interface KarpenterEC2NodeClassSpec
1698
- * @since 1.0.0
1699
- */
1700
- /**
1701
- * Karpenter EC2 NodeClass specification
1702
- *
1703
- * @interface KarpenterEC2NodeClassSpec
1704
- * @since 2.3.0
1705
- */
1706
- export interface KarpenterEC2NodeClassSpec {
1707
- /** Name of the EC2 NodeClass */
1708
- name: string;
1709
- /** AMI family for node instances */
1710
- amiFamily?: 'AL2' | 'AL2023' | 'Bottlerocket' | 'Ubuntu' | 'Windows2019' | 'Windows2022' | 'Custom';
1711
- /** Instance store policy */
1712
- instanceStorePolicy?: 'NVME' | 'RAID0';
1713
- /** User data script for instance initialization */
1714
- userData?: string;
1715
- /** Subnet selection terms */
1716
- subnetSelectorTerms?: KarpenterSubnetSelectorTerm[];
1717
- /** Security group selection terms */
1718
- securityGroupSelectorTerms?: KarpenterSecurityGroupSelectorTerm[];
1719
- /** IAM role for instances */
1720
- role?: string;
1721
- /** Instance profile name */
1722
- instanceProfile?: string;
1723
- /** EC2 metadata options */
1724
- metadataOptions?: {
1725
- /** HTTP endpoint state */
1726
- httpEndpoint?: 'enabled' | 'disabled';
1727
- /** IPv6 endpoint state */
1728
- httpProtocolIPv6?: 'enabled' | 'disabled';
1729
- /** Hop limit for metadata requests */
1730
- httpPutResponseHopLimit?: number;
1731
- /** Token requirement */
1732
- httpTokens?: 'required' | 'optional';
1733
- };
1734
- /** Block device mappings */
1735
- blockDeviceMappings?: KarpenterBlockDeviceMapping[];
1736
- /** Resource tags */
1737
- tags?: Record<string, string>;
1738
- /** Labels to apply to the NodeClass */
1739
- labels?: Record<string, string>;
1740
- /** Annotations to apply to the NodeClass */
1741
- annotations?: Record<string, string>;
1742
- }
1743
- /**
1744
- * Karpenter disruption budget for controlling disruption rate.
1745
- */
1746
- /**
1747
- * Karpenter disruption budget specification
1748
- *
1749
- * @interface KarpenterDisruptionBudget
1750
- * @since 2.3.0
1751
- */
1752
- export interface KarpenterDisruptionBudget {
1753
- /** Schedule in cron format for when budget applies */
1754
- schedule?: string;
1755
- /** Duration the budget is active */
1756
- duration?: string;
1757
- /** Number or percentage of nodes that can be disrupted */
1758
- nodes?: string | number;
1759
- /** Reasons this budget applies to */
1760
- reasons?: Array<'Underutilized' | 'Empty' | 'Drifted' | 'Expired'>;
1761
- }
1762
- /**
1763
- * Advanced disruption configuration for Karpenter NodePools.
1764
- */
1765
- /**
1766
- * Karpenter advanced disruption configuration
1767
- *
1768
- * @interface KarpenterAdvancedDisruption
1769
- * @since 2.3.0
1770
- */
1771
- export interface KarpenterAdvancedDisruption {
1772
- /** Consolidation policy */
1773
- consolidationPolicy?: 'WhenEmpty' | 'WhenEmptyOrUnderutilized';
1774
- /** Time to wait before consolidating */
1775
- consolidateAfter?: string;
1776
- /** Node expiration time */
1777
- expireAfter?: string;
1778
- /** Disruption budgets for rate limiting */
1779
- budgets?: KarpenterDisruptionBudget[];
1780
- }
1781
- /**
1782
- * Configuration interface for Karpenter NodeClaim.
1783
- * Represents an individual node request that Karpenter will fulfill.
1784
- *
1785
- * @see https://karpenter.sh/docs/concepts/nodeclaims/
1786
- */
1787
- /**
1788
- * Karpenter NodeClaim specification
1789
- *
1790
- * @interface KarpenterNodeClaimSpec
1791
- * @since 2.3.0
1792
- */
1793
- export interface KarpenterNodeClaimSpec {
1794
- /** Name of the NodeClaim */
1795
- name: string;
1796
- /** Node requirements for instance selection */
1797
- requirements?: KarpenterNodeRequirement[];
1798
- /** Reference to NodeClass for AWS-specific configuration */
1799
- nodeClassRef: {
1800
- /** API group (default: eks.amazonaws.com) */
1801
- group?: string;
1802
- /** Resource kind (default: NodeClass) */
1803
- kind?: string;
1804
- /** NodeClass name */
1805
- name: string;
1806
- };
1807
- /** Taints to apply to the node */
1808
- taints?: Array<{
1809
- key: string;
1810
- value?: string;
1811
- effect: 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute';
1812
- }>;
1813
- /** Startup taints that will be removed after node initialization */
1814
- startupTaints?: Array<{
1815
- key: string;
1816
- value?: string;
1817
- effect: 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute';
1818
- }>;
1819
- /** Node expiration time */
1820
- expireAfter?: string;
1821
- /** Termination grace period */
1822
- terminationGracePeriod?: string;
1823
- /** Labels to apply to the NodeClaim */
1824
- labels?: Record<string, string>;
1825
- /** Annotations to apply to the NodeClaim */
1826
- annotations?: Record<string, string>;
1827
- }
1828
- /**
1829
- * Topology spread constraint for advanced scheduling.
1830
- */
1831
- /**
1832
- * Karpenter topology spread constraint specification
1833
- *
1834
- * @interface KarpenterTopologySpreadConstraint
1835
- * @since 2.3.0
1836
- */
1837
- export interface KarpenterTopologySpreadConstraint {
1838
- /** Maximum skew between zones/domains */
1839
- maxSkew: number;
1840
- /** Topology key (e.g., topology.kubernetes.io/zone) */
1841
- topologyKey: string;
1842
- /** What to do when constraint cannot be satisfied */
1843
- whenUnsatisfiable: 'DoNotSchedule' | 'ScheduleAnyway';
1844
- /** Label selector for pods to consider */
1845
- labelSelector?: {
1846
- matchLabels?: Record<string, string>;
1847
- matchExpressions?: Array<{
1848
- key: string;
1849
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
1850
- values?: string[];
1851
- }>;
1852
- };
1853
- /** Minimum domains required */
1854
- minDomains?: number;
1855
- }
1856
- /**
1857
- * Node affinity for advanced scheduling constraints.
1858
- */
1859
- /**
1860
- * Karpenter node affinity specification
1861
- *
1862
- * @interface KarpenterNodeAffinity
1863
- * @since 2.3.0
1864
- */
1865
- export interface KarpenterNodeAffinity {
1866
- /** Required node affinity */
1867
- requiredDuringSchedulingIgnoredDuringExecution?: {
1868
- nodeSelectorTerms: Array<{
1869
- matchExpressions?: Array<{
1870
- key: string;
1871
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist' | 'Gt' | 'Lt';
1872
- values?: string[];
1873
- }>;
1874
- matchFields?: Array<{
1875
- key: string;
1876
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist' | 'Gt' | 'Lt';
1877
- values?: string[];
1878
- }>;
1879
- }>;
1880
- };
1881
- /** Preferred node affinity */
1882
- preferredDuringSchedulingIgnoredDuringExecution?: Array<{
1883
- weight: number;
1884
- preference: {
1885
- matchExpressions?: Array<{
1886
- key: string;
1887
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist' | 'Gt' | 'Lt';
1888
- values?: string[];
1889
- }>;
1890
- matchFields?: Array<{
1891
- key: string;
1892
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist' | 'Gt' | 'Lt';
1893
- values?: string[];
1894
- }>;
1895
- };
1896
- }>;
1897
- }
1898
- /**
1899
- * Configuration interface for advanced Karpenter scheduling.
1900
- * Provides fine-grained control over pod placement and node selection.
1901
- */
1902
- /**
1903
- * Karpenter scheduling specification
1904
- *
1905
- * @interface KarpenterSchedulingSpec
1906
- * @since 2.3.0
1907
- */
1908
- export interface KarpenterSchedulingSpec {
1909
- /** Name of the scheduling configuration */
1910
- name: string;
1911
- /** Node selector for basic node selection */
1912
- nodeSelector?: Record<string, string>;
1913
- /** Node affinity for advanced node selection */
1914
- nodeAffinity?: KarpenterNodeAffinity;
1915
- /** Topology spread constraints */
1916
- topologySpreadConstraints?: KarpenterTopologySpreadConstraint[];
1917
- /** Tolerations for taints */
1918
- tolerations?: Array<{
1919
- key?: string;
1920
- operator?: 'Exists' | 'Equal';
1921
- value?: string;
1922
- effect?: 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute';
1923
- tolerationSeconds?: number;
1924
- }>;
1925
- /** Priority class for pod scheduling */
1926
- priorityClassName?: string;
1927
- /** Scheduler name */
1928
- schedulerName?: string;
1929
- /** Labels to apply to the scheduling configuration */
1930
- labels?: Record<string, string>;
1931
- /** Annotations to apply to the scheduling configuration */
1932
- annotations?: Record<string, string>;
1933
- }
1934
- /**
1935
- * Configuration properties for Rutter
1936
- *
1937
- * @interface RutterProps
1938
- * @since 1.0.0
1939
- */
1940
- export interface RutterProps {
1941
- /** Helm chart metadata */
1942
- meta: HelmChartMeta;
1943
- /** Default values for values.yaml */
1944
- defaultValues?: Record<string, unknown>;
1945
- /** Environment-specific values */
1946
- envValues?: Record<string, Record<string, unknown>>;
1947
- /** Helm helpers content for templates/_helpers.tpl */
1948
- helpersTpl?: string | HelperDefinition[];
1949
- /** NOTES.txt content */
1950
- notesTpl?: string;
1951
- /** JSON schema for values validation */
1952
- valuesSchema?: Record<string, unknown>;
1953
- /** Custom name for generated manifest file */
1954
- manifestName?: string;
1955
- /** Combine all resources into single manifest file */
1956
- singleManifestFile?: boolean;
1957
- }
1958
- /**
1959
- * Rutter - Main class for building Kubernetes manifests and Helm charts
1960
- *
1961
- * Rutter (maritime pilot) guides the generation of Kubernetes resources
1962
- * using cdk8s and outputs complete Helm charts with proper templating.
1963
- *
1964
- * @class Rutter
1965
- * @since 1.0.0
1966
- *
1967
- * @example
1968
- * ```typescript
1969
- * const rutter = new Rutter({
1970
- * meta: { name: 'my-app', version: '1.0.0' },
1971
- * defaultValues: { replicas: 3 }
1972
- * });
1973
- *
1974
- * rutter.addDeployment({
1975
- * name: 'web',
1976
- * image: 'nginx:1.21',
1977
- * replicas: 3
1978
- * });
1979
- *
1980
- * rutter.write('./charts/my-app');
1981
- * ```
1982
- */
1983
- export declare class Rutter {
1984
- private readonly props;
1985
- private readonly app;
1986
- private readonly chart;
1987
- private readonly assets;
1988
- private valueOverrides;
1989
- /**
1990
- * Creates a new Rutter instance
1991
- *
1992
- * @param {RutterProps} props - Configuration properties
1993
- * @since 1.0.0
1994
- */
1995
- constructor(props: RutterProps);
1996
- /**
1997
- * Sets dynamic value overrides for Helm values
1998
- *
1999
- * Used by CLI --set flags to override default values at runtime.
2000
- *
2001
- * @param {Record<string, string>} overrides - Key-value pairs to override
2002
- *
2003
- * @example
2004
- * ```typescript
2005
- * rutter.setValues({
2006
- * 'image.tag': 'v2.0.0',
2007
- * 'replicas': '5'
2008
- * });
2009
- * ```
2010
- *
2011
- * @since 1.0.0
2012
- */
2013
- setValues(overrides: Record<string, string>): void;
2014
- /**
2015
- * Apply value overrides to nested object using dot notation
2016
- */
2017
- private applyOverrides;
2018
- private setNestedValue;
2019
- private parseValue;
2020
- private static readonly LABEL_NAME;
2021
- private static readonly LABEL_INSTANCE;
2022
- private static readonly HELPER_NAME;
2023
- private static readonly NETWORKING_API_VERSION;
2024
- private static readonly STORAGE_API_VERSION;
2025
- private static readonly AZURE_DISK_CSI_DRIVER;
2026
- private static readonly AZURE_DISK_PROVISIONER_ANNOTATION;
2027
- private static readonly AZURE_FILES_CSI_DRIVER;
2028
- /**
2029
- * Adds a Kubernetes Deployment to the chart
2030
- *
2031
- * @param {DeploymentSpec} spec - Deployment specification
2032
- * @returns {ApiObject} The created Deployment object
2033
- *
2034
- * @example
2035
- * ```typescript
2036
- * rutter.addDeployment({
2037
- * name: 'web-app',
2038
- * image: 'nginx:1.21',
2039
- * replicas: 3,
2040
- * containerPort: 80,
2041
- * env: { NODE_ENV: 'production' }
2042
- * });
2043
- * ```
2044
- *
2045
- * @since 1.0.0
2046
- */
2047
- addDeployment(spec: DeploymentSpec): ApiObject;
2048
- /**
2049
- * Adds a Kubernetes Service to the chart
2050
- *
2051
- * @param {ServiceSpec} spec - Service specification
2052
- * @returns {ApiObject} The created Service object
2053
- *
2054
- * @example
2055
- * ```typescript
2056
- * rutter.addService({
2057
- * name: 'web-service',
2058
- * ports: [{ port: 80, targetPort: 8080 }],
2059
- * type: 'LoadBalancer'
2060
- * });
2061
- * ```
2062
- *
2063
- * @since 1.0.0
2064
- */
2065
- addService(spec: ServiceSpec): ApiObject;
2066
- addReplicaSet(spec: ReplicaSetSpec): ApiObject;
2067
- /**
2068
- * Adds a Kubernetes Job to the chart
2069
- *
2070
- * @param {JobSpec} spec - Job specification
2071
- * @returns {ApiObject} The created Job object
2072
- *
2073
- * @example
2074
- * ```typescript
2075
- * rutter.addJob({
2076
- * name: 'data-migration',
2077
- * image: 'migrate:latest',
2078
- * command: ['./migrate.sh'],
2079
- * backoffLimit: 3
2080
- * });
2081
- * ```
2082
- *
2083
- * @since 2.1.0
2084
- */
2085
- addJob(spec: JobSpec): ApiObject;
2086
- /**
2087
- * Adds a Kubernetes CronJob to the chart
2088
- *
2089
- * @param {CronJobSpec} spec - CronJob specification
2090
- * @returns {ApiObject} The created CronJob object
2091
- *
2092
- * @example
2093
- * ```typescript
2094
- * rutter.addCronJob({
2095
- * name: 'backup-job',
2096
- * schedule: '0 2 * * *',
2097
- * image: 'backup:latest',
2098
- * command: ['./backup.sh']
2099
- * });
2100
- * ```
2101
- *
2102
- * @since 2.1.0
2103
- */
2104
- addCronJob(spec: CronJobSpec): ApiObject;
2105
- /**
2106
- * Adds a Kubernetes Ingress to the chart
2107
- *
2108
- * @param {IngressSpec} spec - Ingress specification
2109
- * @returns {ApiObject} The created Ingress object
2110
- *
2111
- * @example
2112
- * ```typescript
2113
- * rutter.addIngress({
2114
- * name: 'web-ingress',
2115
- * rules: [{
2116
- * host: 'example.com',
2117
- * paths: [{
2118
- * path: '/',
2119
- * pathType: 'Prefix',
2120
- * backend: { service: { name: 'web-service', port: { number: 80 } } }
2121
- * }]
2122
- * }]
2123
- * });
2124
- * ```
2125
- *
2126
- * @since 1.0.0
2127
- */
2128
- addIngress(spec: IngressSpec): ApiObject;
2129
- addPersistentVolume(spec: PersistentVolumeSpec): ApiObject;
2130
- private optimizePVForCloud;
2131
- addPersistentVolumeClaim(spec: PersistentVolumeClaimSpec): ApiObject;
2132
- private validatePVCAccessModes;
2133
- /**
2134
- * Adds a Kubernetes ConfigMap to the chart
2135
- *
2136
- * @param {ConfigMapSpec} spec - ConfigMap specification
2137
- * @returns {ApiObject} The created ConfigMap object
2138
- *
2139
- * @example
2140
- * ```typescript
2141
- * rutter.addConfigMap({
2142
- * name: 'app-config',
2143
- * data: {
2144
- * 'config.yaml': 'key: value',
2145
- * 'app.properties': 'debug=true'
2146
- * }
2147
- * });
2148
- * ```
2149
- *
2150
- * @since 1.0.0
2151
- */
2152
- addConfigMap(spec: ConfigMapSpec): ApiObject;
2153
- /**
2154
- * Adds a Kubernetes Secret to the chart
2155
- *
2156
- * @param {SecretSpec} spec - Secret specification
2157
- * @returns {ApiObject} The created Secret object
2158
- *
2159
- * @example
2160
- * ```typescript
2161
- * rutter.addSecret({
2162
- * name: 'app-secrets',
2163
- * stringData: {
2164
- * 'username': 'admin',
2165
- * 'password': 'secret123'
2166
- * }
2167
- * });
2168
- * ```
2169
- *
2170
- * @since 1.0.0
2171
- */
2172
- addSecret(spec: SecretSpec): ApiObject;
2173
- /**
2174
- * Adds a Kubernetes ServiceAccount to the chart
2175
- *
2176
- * @param {ServiceAccountSpec} spec - ServiceAccount specification
2177
- * @returns {ApiObject} The created ServiceAccount object
2178
- *
2179
- * @example
2180
- * ```typescript
2181
- * rutter.addServiceAccount({
2182
- * name: 'app-sa',
2183
- * awsRoleArn: 'arn:aws:iam::123456789012:role/MyRole',
2184
- * automountServiceAccountToken: true
2185
- * });
2186
- * ```
2187
- *
2188
- * @since 1.0.0
2189
- */
2190
- addServiceAccount(spec: ServiceAccountSpec): ApiObject;
2191
- private buildServiceAccountAnnotations;
2192
- private addAWSIRSAAnnotations;
2193
- private addAzureWorkloadIdentityAnnotations;
2194
- private addGCPWorkloadIdentityAnnotations;
2195
- /**
2196
- * Adds a Kubernetes HorizontalPodAutoscaler to the chart
2197
- *
2198
- * @param {HorizontalPodAutoscalerSpec} spec - HPA specification
2199
- * @returns {ApiObject} The created HPA object
2200
- *
2201
- * @example
2202
- * ```typescript
2203
- * rutter.addHorizontalPodAutoscaler({
2204
- * name: 'web-hpa',
2205
- * scaleTargetRef: {
2206
- * apiVersion: 'apps/v1',
2207
- * kind: 'Deployment',
2208
- * name: 'web-app'
2209
- * },
2210
- * minReplicas: 2,
2211
- * maxReplicas: 10
2212
- * });
2213
- * ```
2214
- *
2215
- * @since 1.0.0
2216
- */
2217
- addHorizontalPodAutoscaler(spec: HorizontalPodAutoscalerSpec): ApiObject;
2218
- addVerticalPodAutoscaler(spec: VerticalPodAutoscalerSpec): ApiObject;
2219
- addPodDisruptionBudget(spec: PodDisruptionBudgetSpec): ApiObject;
2220
- addAWSEBSStorageClass(spec: AWSEBSStorageClassSpec): ApiObject;
2221
- addAWSEBSPersistentVolumeClaim(spec: AWSEBSPersistentVolumeClaimSpec): ApiObject;
2222
- addAWSEFSStorageClass(spec: AWSEFSStorageClassSpec): ApiObject;
2223
- addAWSEFSPersistentVolume(spec: AWSEFSPersistentVolumeSpec): ApiObject;
2224
- addAWSEFSPersistentVolumeClaim(spec: AWSEFSPersistentVolumeClaimSpec): ApiObject;
2225
- addAWSALBIngress(spec: AWSALBIngressSpec): ApiObject;
2226
- private buildALBAnnotations;
2227
- private addOptionalALBAnnotations;
2228
- private addHealthCheckAnnotations;
2229
- private addTagsAnnotation;
2230
- /**
2231
- * Add Azure Application Gateway Ingress Controller (AGIC) Ingress.
2232
- * Creates an Ingress resource with AGIC-specific annotations for AKS deployments.
2233
- *
2234
- * @param spec - AGIC Ingress specification
2235
- * @returns The created Ingress ApiObject
2236
- *
2237
- * @example
2238
- * ```typescript
2239
- * rutter.addAzureAGICIngress({
2240
- * name: 'app-ingress',
2241
- * rules: [{
2242
- * host: 'app.example.com',
2243
- * paths: [{
2244
- * path: '/',
2245
- * pathType: 'Prefix',
2246
- * backend: { service: { name: 'app-service', port: { number: 80 } } }
2247
- * }]
2248
- * }],
2249
- * sslRedirect: true,
2250
- * backendProtocol: 'https',
2251
- * healthProbePath: '/health'
2252
- * });
2253
- * ```
2254
- */
2255
- addAzureAGICIngress(spec: AzureAGICIngressSpec): ApiObject;
2256
- private buildAGICAnnotations;
2257
- private addAGICPathAnnotations;
2258
- private addAGICProtocolAnnotations;
2259
- private addAGICHealthProbeAnnotations;
2260
- private addAGICConnectionAnnotations;
2261
- private addAGICSecurityAnnotations;
2262
- private addAGICAdvancedAnnotations;
2263
- addAWSIRSAServiceAccount(spec: AWSIRSAServiceAccountSpec): ApiObject;
2264
- addAWSSecretProviderClass(spec: AWSSecretProviderClassSpec): ApiObject;
2265
- /**
2266
- * Add Azure Workload Identity ServiceAccount.
2267
- * Creates a ServiceAccount with Azure Workload Identity annotations for secure authentication.
2268
- *
2269
- * @param spec - Azure Workload Identity ServiceAccount specification
2270
- * @returns The created ServiceAccount ApiObject
2271
- *
2272
- * @example
2273
- * ```typescript
2274
- * rutter.addAzureWorkloadIdentityServiceAccount({
2275
- * name: 'workload-identity-sa',
2276
- * clientId: '12345678-1234-1234-1234-123456789012',
2277
- * tenantId: '87654321-4321-4321-4321-210987654321',
2278
- * tokenExpiration: 3600
2279
- * });
2280
- * ```
2281
- */
2282
- addAzureWorkloadIdentityServiceAccount(spec: AzureWorkloadIdentityServiceAccountSpec): ApiObject;
2283
- /**
2284
- * Add Azure Key Vault SecretProviderClass.
2285
- * Creates a SecretProviderClass for mounting secrets from Azure Key Vault using CSI driver.
2286
- *
2287
- * @param spec - Azure Key Vault SecretProviderClass specification
2288
- * @returns The created SecretProviderClass ApiObject
2289
- *
2290
- * @example
2291
- * ```typescript
2292
- * rutter.addAzureKeyVaultSecretProviderClass({
2293
- * name: 'app-secrets',
2294
- * keyVaultName: 'my-keyvault',
2295
- * tenantId: '87654321-4321-4321-4321-210987654321',
2296
- * objects: [
2297
- * { objectName: 'database-password', objectType: 'secret' },
2298
- * { objectName: 'api-key', objectType: 'secret', objectAlias: 'API_KEY' }
2299
- * ],
2300
- * userAssignedIdentityID: '12345678-1234-1234-1234-123456789012'
2301
- * });
2302
- * ```
2303
- */
2304
- addAzureKeyVaultSecretProviderClass(spec: AzureKeyVaultSecretProviderClassSpec): ApiObject;
2305
- /**
2306
- * Add Azure Files StorageClass.
2307
- * Creates a StorageClass for dynamic provisioning of Azure Files volumes.
2308
- *
2309
- * @param spec - Azure Files StorageClass specification
2310
- * @returns The created StorageClass ApiObject
2311
- *
2312
- * @example
2313
- * ```typescript
2314
- * rutter.addAzureFilesStorageClass({
2315
- * name: 'azure-files-premium',
2316
- * skuName: 'Premium_LRS',
2317
- * protocol: 'smb',
2318
- * allowSharedAccess: true
2319
- * });
2320
- * ```
2321
- */
2322
- addAzureFilesStorageClass(spec: AzureFilesStorageClassSpec): ApiObject;
2323
- /**
2324
- * Add Azure Files PersistentVolume.
2325
- * Creates a PersistentVolume for static Azure Files volume provisioning.
2326
- *
2327
- * @param spec - Azure Files PersistentVolume specification
2328
- * @returns The created PersistentVolume ApiObject
2329
- */
2330
- addAzureFilesPersistentVolume(spec: AzureFilesPersistentVolumeSpec): ApiObject;
2331
- /**
2332
- * Add Azure Files PersistentVolumeClaim.
2333
- * Creates a PersistentVolumeClaim for Azure Files storage.
2334
- *
2335
- * @param spec - Azure Files PersistentVolumeClaim specification
2336
- * @returns The created PersistentVolumeClaim ApiObject
2337
- */
2338
- addAzureFilesPersistentVolumeClaim(spec: AzureFilesPersistentVolumeClaimSpec): ApiObject;
2339
- /**
2340
- * Add Azure Container Registry ServiceAccount.
2341
- * Creates a ServiceAccount configured for ACR access.
2342
- *
2343
- * @param spec - Azure ACR ServiceAccount specification
2344
- * @returns The created ServiceAccount ApiObject
2345
- */
2346
- addAzureACRServiceAccount(spec: AzureACRServiceAccountSpec): ApiObject;
2347
- addAzureDiskStorageClass(spec: AzureDiskStorageClassSpec): ApiObject;
2348
- private buildAzureDiskParameters;
2349
- private addOptionalAzureDiskParameters;
2350
- private addAzureDiskEncryptionParameters;
2351
- private addAzureDiskPerformanceParameters;
2352
- private validateAzureDiskNumericParameters;
2353
- private validateAzureDiskIOPS;
2354
- private validateAzureDiskThroughput;
2355
- private validateAzureDiskShares;
2356
- private validateAzureDiskSectorSize;
2357
- /**
2358
- * Format cloud resource tags for provider-specific string format.
2359
- * Provides basic validation and consistent formatting across cloud providers.
2360
- */
2361
- private formatCloudResourceTags;
2362
- /**
2363
- * Validate cloud resource tags with basic rules.
2364
- * Each cloud provider has specific validation, but these are common basics.
2365
- */
2366
- private validateCloudResourceTags;
2367
- addNetworkPolicy(spec: NetworkPolicySpec): ApiObject;
2368
- private static readonly EMPTY_POD_SELECTOR;
2369
- /**
2370
- * Create a deny-all ingress NetworkPolicy for the current namespace
2371
- */
2372
- addDenyAllIngressNetworkPolicy(name?: string): ApiObject;
2373
- /**
2374
- * Create a deny-all egress NetworkPolicy for the current namespace
2375
- */
2376
- addDenyAllEgressNetworkPolicy(name?: string): ApiObject;
2377
- /**
2378
- * Create a deny-all NetworkPolicy for both ingress and egress
2379
- */
2380
- addDenyAllNetworkPolicy(name?: string): ApiObject;
2381
- /**
2382
- * Allow traffic from specific pods to target pods on specific ports
2383
- */
2384
- addAllowFromPodsNetworkPolicy(spec: {
2385
- name: string;
2386
- targetPodSelector: Record<string, string>;
2387
- sourcePodSelector: Record<string, string>;
2388
- ports?: NetworkPolicyPort[];
2389
- labels?: Record<string, string>;
2390
- annotations?: Record<string, string>;
2391
- }): ApiObject;
2392
- /**
2393
- * Allow traffic from specific namespace to target pods
2394
- */
2395
- addAllowFromNamespaceNetworkPolicy(spec: {
2396
- name: string;
2397
- targetPodSelector: Record<string, string>;
2398
- sourceNamespaceSelector: Record<string, string>;
2399
- ports?: NetworkPolicyPort[];
2400
- labels?: Record<string, string>;
2401
- annotations?: Record<string, string>;
2402
- }): ApiObject;
2403
- private validateNetworkPolicyTypes;
2404
- private validatePolicyTypeValues;
2405
- private validatePolicyTypeRules;
2406
- private validateNetworkPolicyCIDRs;
2407
- private isValidCIDR;
2408
- private isValidIPv4;
2409
- private isValidPrefix;
2410
- private validateIngressCIDRs;
2411
- private validateEgressCIDRs;
2412
- private validatePeerCIDRs;
2413
- private validateAGICHealthProbeParams;
2414
- private validateAGICSecurityParams;
2415
- private isValidHostname;
2416
- private validateAGICAnnotationConsistency;
2417
- private buildAzureFilesParameters;
2418
- private buildAzureFilesPVCSISpec;
2419
- private buildPodEnvironment;
2420
- private buildJobSpec;
2421
- private buildJobPodTemplate;
2422
- private buildCronJobSpec;
2423
- private buildCronJobTemplate;
2424
- /**
2425
- * Validate Job specification for security and best practices
2426
- */
2427
- private validateJobSpec;
2428
- /**
2429
- * Validate CronJob specification for security and best practices
2430
- */
2431
- private validateCronJobSpec;
2432
- /**
2433
- * Validate cron schedule expression
2434
- */
2435
- private validateCronSchedule;
2436
- /**
2437
- * Sanitize environment variable names and values
2438
- */
2439
- private sanitizeEnvVar;
2440
- /**
2441
- * Get default resource limits for Jobs and CronJobs
2442
- */
2443
- private getDefaultResources;
2444
- /**
2445
- * Validate Azure Files parameters for security and compliance
2446
- */
2447
- private validateAzureFilesParameters;
2448
- /**
2449
- * Sanitize volume handle to ensure valid format for CSI driver
2450
- */
2451
- private sanitizeVolumeHandle;
2452
- /**
2453
- * Capture the YAML of an ApiObject or Construct into assets.
2454
- */
2455
- private capture;
2456
- /**
2457
- * Extract a meaningful name from a Kubernetes resource object
2458
- */
2459
- private getResourceName;
2460
- /**
2461
- * Adds a raw CRD manifest to the chart
2462
- *
2463
- * @param {string} yaml - YAML content of the CRD
2464
- * @param {string} [id='crd'] - Asset identifier
2465
- *
2466
- * @example
2467
- * ```typescript
2468
- * const crdYaml = `
2469
- * apiVersion: apiextensions.k8s.io/v1
2470
- * kind: CustomResourceDefinition
2471
- * metadata:
2472
- * name: myresources.example.com
2473
- * `;
2474
- * rutter.addCrd(crdYaml, 'myresource-crd');
2475
- * ```
2476
- *
2477
- * @since 1.0.0
2478
- */
2479
- addCrd(yaml: string, id?: string): void;
2480
- /**
2481
- * Add Karpenter NodePool for intelligent node provisioning.
2482
- * Creates a NodePool resource that defines compute requirements and lifecycle policies.
2483
- *
2484
- * @param spec - Karpenter NodePool specification
2485
- * @returns The created NodePool ApiObject
2486
- *
2487
- * @example
2488
- * ```typescript
2489
- * rutter.addKarpenterNodePool({
2490
- * name: 'general-purpose',
2491
- * requirements: [
2492
- * { key: 'eks.amazonaws.com/instance-category', operator: 'In', values: ['c', 'm', 'r'] },
2493
- * { key: 'kubernetes.io/arch', operator: 'In', values: ['amd64'] }
2494
- * ],
2495
- * limits: { cpu: '1000', memory: '1000Gi' },
2496
- * nodeClassRef: { name: 'default' }
2497
- * });
2498
- * ```
2499
- *
2500
- * @since 2.3.0
2501
- */
2502
- addKarpenterNodePool(spec: KarpenterNodePoolSpec): ApiObject;
2503
- /**
2504
- * Add Karpenter EC2 NodeClass for AWS-specific node configuration.
2505
- * Creates a NodeClass resource that defines EC2 instance settings and networking.
2506
- *
2507
- * @param spec - Karpenter EC2 NodeClass specification
2508
- * @returns The created NodeClass ApiObject
2509
- *
2510
- * @example
2511
- * ```typescript
2512
- * rutter.addKarpenterEC2NodeClass({
2513
- * name: 'default',
2514
- * amiFamily: 'AL2023',
2515
- * subnetSelectorTerms: [{ tags: { 'karpenter.sh/discovery': 'my-cluster' } }],
2516
- * securityGroupSelectorTerms: [{ tags: { 'karpenter.sh/discovery': 'my-cluster' } }],
2517
- * role: 'KarpenterNodeInstanceProfile'
2518
- * });
2519
- * ```
2520
- *
2521
- * @since 2.3.0
2522
- */
2523
- addKarpenterEC2NodeClass(spec: KarpenterEC2NodeClassSpec): ApiObject;
2524
- /**
2525
- * Validate Karpenter NodePool specification
2526
- */
2527
- private validateKarpenterNodePoolSpec;
2528
- private validateNodeClassRef;
2529
- private validateNodePoolRequirements;
2530
- private validateNodePoolLimits;
2531
- private validateNodePoolDisruption;
2532
- /**
2533
- * Validate Karpenter EC2 NodeClass specification
2534
- */
2535
- private validateKarpenterEC2NodeClassSpec;
2536
- private validateNodeClassSelectors;
2537
- private validateNodeClassBlockDevices;
2538
- private validateNodeClassMetadataOptions;
2539
- /**
2540
- * Validate Kubernetes resource quantity format (e.g., "100m", "1Gi")
2541
- */
2542
- private isValidResourceQuantity;
2543
- /**
2544
- * Validate duration format (e.g., "30s", "5m", "1h")
2545
- */
2546
- private isValidDuration;
2547
- /**
2548
- * Validate storage size format (e.g., "20", "100Gi")
2549
- */
2550
- private isValidStorageSize;
2551
- /**
2552
- * Add Karpenter NodeClaim for individual node provisioning.
2553
- * Creates a NodeClaim resource that represents a request for a single node.
2554
- *
2555
- * @param spec - Karpenter NodeClaim specification
2556
- * @returns The created NodeClaim ApiObject
2557
- *
2558
- * @example
2559
- * ```typescript
2560
- * rutter.addKarpenterNodeClaim({
2561
- * name: 'high-memory-node',
2562
- * requirements: [
2563
- * { key: 'eks.amazonaws.com/instance-category', operator: 'In', values: ['r'] },
2564
- * { key: 'eks.amazonaws.com/instance-cpu', operator: 'In', values: ['16', '32'] }
2565
- * ],
2566
- * nodeClassRef: { name: 'memory-optimized' },
2567
- * expireAfter: '24h'
2568
- * });
2569
- * ```
2570
- *
2571
- * @since 2.3.0
2572
- */
2573
- addKarpenterNodeClaim(spec: KarpenterNodeClaimSpec): ApiObject;
2574
- /**
2575
- * Add advanced Karpenter scheduling configuration.
2576
- * Creates scheduling constraints for fine-grained pod placement control.
2577
- *
2578
- * @param spec - Karpenter scheduling specification
2579
- * @returns Configuration object for use in pod specs
2580
- *
2581
- * @example
2582
- * ```typescript
2583
- * const schedulingConfig = rutter.addKarpenterScheduling({
2584
- * name: 'zone-spread-scheduling',
2585
- * topologySpreadConstraints: [{
2586
- * maxSkew: 1,
2587
- * topologyKey: 'topology.kubernetes.io/zone',
2588
- * whenUnsatisfiable: 'DoNotSchedule',
2589
- * labelSelector: { matchLabels: { app: 'web' } }
2590
- * }],
2591
- * nodeAffinity: {
2592
- * requiredDuringSchedulingIgnoredDuringExecution: {
2593
- * nodeSelectorTerms: [{
2594
- * matchExpressions: [{
2595
- * key: 'eks.amazonaws.com/instance-category',
2596
- * operator: 'In',
2597
- * values: ['c', 'm']
2598
- * }]
2599
- * }]
2600
- * }
2601
- * }
2602
- * });
2603
- * ```
2604
- *
2605
- * @since 2.3.0
2606
- */
2607
- addKarpenterScheduling(spec: KarpenterSchedulingSpec): {
2608
- schedulerName?: string;
2609
- priorityClassName?: string;
2610
- tolerations?: {
2611
- key?: string;
2612
- operator?: "Exists" | "Equal";
2613
- value?: string;
2614
- effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
2615
- tolerationSeconds?: number;
2616
- }[];
2617
- topologySpreadConstraints?: KarpenterTopologySpreadConstraint[];
2618
- affinity?: {
2619
- nodeAffinity: KarpenterNodeAffinity;
2620
- };
2621
- nodeSelector?: Record<string, string>;
2622
- };
2623
- /**
2624
- * Create advanced disruption configuration for NodePools.
2625
- * Provides fine-grained control over when and how nodes are disrupted.
2626
- *
2627
- * @param spec - Advanced disruption specification
2628
- * @returns Disruption configuration object
2629
- *
2630
- * @example
2631
- * ```typescript
2632
- * const disruptionConfig = rutter.createKarpenterDisruption({
2633
- * consolidationPolicy: 'WhenEmptyOrUnderutilized',
2634
- * consolidateAfter: '30s',
2635
- * expireAfter: '2160h', // 90 days
2636
- * budgets: [{
2637
- * schedule: '0 9 * * mon-fri', // Business hours
2638
- * duration: '8h',
2639
- * nodes: '0', // No disruption during business hours
2640
- * reasons: ['Underutilized', 'Empty']
2641
- * }]
2642
- * });
2643
- * ```
2644
- *
2645
- * @since 2.3.0
2646
- */
2647
- createKarpenterDisruption(spec: KarpenterAdvancedDisruption): {
2648
- budgets?: KarpenterDisruptionBudget[];
2649
- expireAfter?: string;
2650
- consolidateAfter?: string;
2651
- consolidationPolicy?: "WhenEmpty" | "WhenEmptyOrUnderutilized";
2652
- };
2653
- /**
2654
- * Validate Karpenter NodeClaim specification
2655
- */
2656
- private validateKarpenterNodeClaimSpec;
2657
- /**
2658
- * Validate Karpenter scheduling specification
2659
- */
2660
- private validateKarpenterSchedulingSpec;
2661
- private validateTopologySpreadConstraints;
2662
- private validateSchedulingTolerations;
2663
- /**
2664
- * Validate Karpenter disruption specification
2665
- */
2666
- private validateKarpenterDisruptionSpec;
2667
- private validateDisruptionDurations;
2668
- private validateDisruptionBudgets;
2669
- /**
2670
- * Synthesizes the cdk8s app and writes a complete Helm chart
2671
- *
2672
- * Generates all Kubernetes manifests, applies Helm templating,
2673
- * and writes the complete chart structure to the output directory.
2674
- *
2675
- * @param {string} outDir - Output directory for the Helm chart
2676
- * @throws {Error} If synthesis or writing fails
2677
- *
2678
- * @example
2679
- * ```typescript
2680
- * rutter.write('./charts/my-app');
2681
- * // Creates: ./charts/my-app/Chart.yaml, values.yaml, templates/, etc.
2682
- * ```
2683
- *
2684
- * @since 1.0.0
2685
- */
2686
- write(outDir: string): void;
2687
- }
2688
- //# sourceMappingURL=Rutter.d.ts.map