timonel 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +323 -695
- package/dist/cli.js +275 -15
- package/dist/index.d.ts +5 -1
- package/dist/index.js +12 -0
- package/dist/lib/helm.d.ts +471 -0
- package/dist/lib/helm.js +483 -0
- package/dist/lib/helmChartWriter.d.ts +157 -0
- package/dist/lib/helmChartWriter.js +171 -1
- package/dist/lib/policy/configurationLoader.d.ts +132 -0
- package/dist/lib/policy/configurationLoader.js +132 -0
- package/dist/lib/policy/errorContextGenerator.d.ts +89 -0
- package/dist/lib/policy/errorContextGenerator.js +99 -2
- package/dist/lib/policy/errors.d.ts +35 -0
- package/dist/lib/policy/errors.js +36 -0
- package/dist/lib/policy/index.d.ts +9 -0
- package/dist/lib/policy/index.js +16 -0
- package/dist/lib/policy/parallelExecutor.d.ts +90 -0
- package/dist/lib/policy/parallelExecutor.js +86 -3
- package/dist/lib/policy/pluginLoader.d.ts +92 -0
- package/dist/lib/policy/pluginLoader.js +92 -1
- package/dist/lib/policy/pluginRegistry.d.ts +54 -0
- package/dist/lib/policy/pluginRegistry.js +56 -0
- package/dist/lib/policy/policyEngine.d.ts +137 -0
- package/dist/lib/policy/policyEngine.js +191 -5
- package/dist/lib/policy/resultAggregator.d.ts +46 -0
- package/dist/lib/policy/resultAggregator.js +69 -1
- package/dist/lib/policy/resultFormatter.d.ts +88 -0
- package/dist/lib/policy/resultFormatter.js +101 -0
- package/dist/lib/policy/types.d.ts +136 -0
- package/dist/lib/policy/types.js +8 -0
- package/dist/lib/policy/validationCache.d.ts +146 -0
- package/dist/lib/policy/validationCache.js +142 -6
- package/dist/lib/resources/baseResourceProvider.d.ts +45 -0
- package/dist/lib/resources/baseResourceProvider.js +48 -1
- package/dist/lib/resources/cloud/aws/awsResources.d.ts +192 -0
- package/dist/lib/resources/cloud/aws/awsResources.js +163 -1
- package/dist/lib/resources/cloud/aws/karpenterResources.d.ts +131 -0
- package/dist/lib/resources/cloud/aws/karpenterResources.js +77 -0
- package/dist/lib/rutter.d.ts +381 -3
- package/dist/lib/rutter.js +439 -28
- package/dist/lib/security.d.ts +123 -0
- package/dist/lib/security.js +162 -4
- package/dist/lib/templates/flexible-subchart.d.ts +52 -0
- package/dist/lib/templates/flexible-subchart.js +70 -0
- package/dist/lib/templates/umbrella-chart.d.ts +27 -0
- package/dist/lib/templates/umbrella-chart.js +89 -0
- package/dist/lib/types.d.ts +26 -0
- package/dist/lib/umbrella.d.ts +23 -0
- package/dist/lib/umbrella.js +23 -0
- package/dist/lib/umbrellaRutter.d.ts +75 -0
- package/dist/lib/umbrellaRutter.js +82 -2
- package/dist/lib/utils/envVarsLoader.d.ts +49 -0
- package/dist/lib/utils/envVarsLoader.js +53 -0
- package/dist/lib/utils/helmConstructSerializer.d.ts +17 -0
- package/dist/lib/utils/helmConstructSerializer.js +22 -0
- package/dist/lib/utils/helmControlStructures.d.ts +194 -0
- package/dist/lib/utils/helmControlStructures.js +180 -0
- package/dist/lib/utils/helmHelpers/envHelpers.d.ts +13 -0
- package/dist/lib/utils/helmHelpers/envHelpers.js +13 -0
- package/dist/lib/utils/helmHelpers/gitopsHelpers.d.ts +13 -0
- package/dist/lib/utils/helmHelpers/gitopsHelpers.js +13 -0
- package/dist/lib/utils/helmHelpers/index.d.ts +74 -0
- package/dist/lib/utils/helmHelpers/index.js +85 -1
- package/dist/lib/utils/helmHelpers/observabilityHelpers.d.ts +13 -0
- package/dist/lib/utils/helmHelpers/observabilityHelpers.js +13 -0
- package/dist/lib/utils/helmHelpers/types.d.ts +23 -0
- package/dist/lib/utils/helmHelpers/types.js +4 -0
- package/dist/lib/utils/helmHelpers/validationHelpers.d.ts +13 -0
- package/dist/lib/utils/helmHelpers/validationHelpers.js +13 -0
- package/dist/lib/utils/helmHelpers.d.ts +62 -0
- package/dist/lib/utils/helmHelpers.js +77 -0
- package/dist/lib/utils/helmYamlSerializer.d.ts +77 -0
- package/dist/lib/utils/helmYamlSerializer.js +398 -21
- package/dist/lib/utils/logger.d.ts +153 -0
- package/dist/lib/utils/logger.js +170 -2
- package/dist/lib/utils/valuesRef.d.ts +181 -50
- package/dist/lib/utils/valuesRef.js +168 -170
- package/dist/lib/validation/inputValidator.d.ts +45 -0
- package/dist/lib/validation/inputValidator.js +67 -2
- package/dist/types/index.d.ts +34 -0
- package/dist/types/index.js +3 -0
- package/package.json +31 -38
package/dist/lib/rutter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiObject } from 'cdk8s';
|
|
1
|
+
import { ApiObject, Chart } from 'cdk8s';
|
|
2
2
|
import type { ChartProps } from 'cdk8s';
|
|
3
3
|
import type { Ingress, ServiceAccount } from 'cdk8s-plus-33';
|
|
4
4
|
import type { Construct } from 'constructs';
|
|
@@ -8,9 +8,15 @@ import type { AWSALBIngressSpec, AWSEBSStorageClassSpec, AWSECRServiceAccountSpe
|
|
|
8
8
|
import type { KarpenterEC2NodeClassSpec, KarpenterNodeClaimSpec, KarpenterNodePoolSpec } from './resources/cloud/aws/karpenterResources.js';
|
|
9
9
|
import type { HelperDefinition } from './utils/helmHelpers.js';
|
|
10
10
|
import type { PolicyEngine } from './policy/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Rutter class with modular architecture
|
|
13
|
+
* Provides a clean API while delegating to specialized resource providers
|
|
14
|
+
* Maintains full backward compatibility with the original Rutter class
|
|
15
|
+
*
|
|
16
|
+
* @since 2.8.0+
|
|
17
|
+
*/
|
|
11
18
|
export declare class Rutter {
|
|
12
19
|
private static readonly HELPER_NAME;
|
|
13
|
-
private readonly app;
|
|
14
20
|
private readonly assets;
|
|
15
21
|
private readonly awsResources;
|
|
16
22
|
private readonly chart;
|
|
@@ -21,13 +27,168 @@ export declare class Rutter {
|
|
|
21
27
|
private readonly props;
|
|
22
28
|
private readonly logger;
|
|
23
29
|
constructor(props: RutterProps);
|
|
30
|
+
/**
|
|
31
|
+
* Creates an AWS EBS StorageClass
|
|
32
|
+
* @param spec - EBS StorageClass specification
|
|
33
|
+
* @returns Created StorageClass ApiObject
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* rutter.addAWSEBSStorageClass({
|
|
38
|
+
* name: 'fast-ebs',
|
|
39
|
+
* volumeType: 'gp3',
|
|
40
|
+
* encrypted: true,
|
|
41
|
+
* allowVolumeExpansion: true
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @since 2.8.0+
|
|
46
|
+
*/
|
|
24
47
|
addAWSEBSStorageClass(spec: AWSEBSStorageClassSpec): ApiObject;
|
|
48
|
+
/**
|
|
49
|
+
* Creates an AWS EFS StorageClass
|
|
50
|
+
* @param spec - EFS StorageClass specification
|
|
51
|
+
* @returns Created StorageClass ApiObject
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* rutter.addAWSEFSStorageClass({
|
|
56
|
+
* name: 'efs-storage',
|
|
57
|
+
* fileSystemId: 'fs-12345678',
|
|
58
|
+
* directoryPerms: '0755'
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @since 2.8.0+
|
|
63
|
+
*/
|
|
25
64
|
addAWSEFSStorageClass(spec: AWSEFSStorageClassSpec): ApiObject;
|
|
65
|
+
/**
|
|
66
|
+
* Creates an AWS IRSA ServiceAccount
|
|
67
|
+
* @param spec - IRSA ServiceAccount specification
|
|
68
|
+
* @returns Created cdk8s-plus ServiceAccount
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* rutter.addAWSIRSAServiceAccount({
|
|
73
|
+
* name: 'my-service-account',
|
|
74
|
+
* roleArn: 'arn:aws:iam::ACCOUNT_ID:role/MyRole'
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @since 2.8.0+
|
|
79
|
+
*/
|
|
26
80
|
addAWSIRSAServiceAccount(spec: AWSIRSAServiceAccountSpec): ServiceAccount;
|
|
81
|
+
/**
|
|
82
|
+
* Creates an AWS ALB Ingress
|
|
83
|
+
* @param spec - ALB Ingress specification
|
|
84
|
+
* @returns Created cdk8s-plus Ingress
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* rutter.addAWSALBIngress({
|
|
89
|
+
* name: 'web-ingress',
|
|
90
|
+
* rules: [{
|
|
91
|
+
* paths: [{
|
|
92
|
+
* path: '/',
|
|
93
|
+
* pathType: 'Prefix',
|
|
94
|
+
* backend: { service: { name: 'web-service', port: { number: 80 } } }
|
|
95
|
+
* }]
|
|
96
|
+
* }],
|
|
97
|
+
* scheme: 'internet-facing'
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @since 2.8.0+
|
|
102
|
+
*/
|
|
27
103
|
addAWSALBIngress(spec: AWSALBIngressSpec): Ingress;
|
|
104
|
+
/**
|
|
105
|
+
* Creates a Karpenter NodePool resource
|
|
106
|
+
* @param spec - NodePool specification
|
|
107
|
+
* @returns Created NodePool ApiObject
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* rutter.addKarpenterNodePool({
|
|
112
|
+
* name: 'default-nodepool',
|
|
113
|
+
* template: {
|
|
114
|
+
* spec: {
|
|
115
|
+
* nodeClassRef: {
|
|
116
|
+
* apiVersion: 'karpenter.k8s.aws/v1beta1',
|
|
117
|
+
* kind: 'EC2NodeClass',
|
|
118
|
+
* name: 'default'
|
|
119
|
+
* }
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @since 2.8.0+
|
|
126
|
+
*/
|
|
28
127
|
addKarpenterNodePool(spec: KarpenterNodePoolSpec): ApiObject;
|
|
128
|
+
/**
|
|
129
|
+
* Creates a Karpenter NodeClaim resource
|
|
130
|
+
* @param spec - NodeClaim specification
|
|
131
|
+
* @returns Created NodeClaim ApiObject
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* rutter.addKarpenterNodeClaim({
|
|
136
|
+
* name: 'my-node-claim',
|
|
137
|
+
* nodeClassRef: {
|
|
138
|
+
* apiVersion: 'karpenter.k8s.aws/v1beta1',
|
|
139
|
+
* kind: 'EC2NodeClass',
|
|
140
|
+
* name: 'default'
|
|
141
|
+
* }
|
|
142
|
+
* });
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @since 2.8.0+
|
|
146
|
+
*/
|
|
29
147
|
addKarpenterNodeClaim(spec: KarpenterNodeClaimSpec): ApiObject;
|
|
148
|
+
/**
|
|
149
|
+
* Creates a Karpenter EC2NodeClass resource
|
|
150
|
+
* @param spec - EC2NodeClass specification
|
|
151
|
+
* @returns Created EC2NodeClass ApiObject
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```typescript
|
|
155
|
+
* rutter.addKarpenterEC2NodeClass({
|
|
156
|
+
* name: 'default',
|
|
157
|
+
* amiFamily: 'AL2',
|
|
158
|
+
* subnetSelectorTerms: [{ tags: { 'karpenter.sh/discovery': 'my-cluster' } }],
|
|
159
|
+
* securityGroupSelectorTerms: [{ tags: { 'karpenter.sh/discovery': 'my-cluster' } }]
|
|
160
|
+
* });
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @since 2.8.0+
|
|
164
|
+
*/
|
|
30
165
|
addKarpenterEC2NodeClass(spec: KarpenterEC2NodeClassSpec): ApiObject;
|
|
166
|
+
/**
|
|
167
|
+
* Creates a Karpenter NodePool with optimized disruption settings for cost efficiency
|
|
168
|
+
* @param spec - NodePool specification with disruption optimization
|
|
169
|
+
* @returns Created NodePool ApiObject
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* rutter.addKarpenterNodePoolWithDisruption({
|
|
174
|
+
* name: 'cost-optimized',
|
|
175
|
+
* nodeClassRef: {
|
|
176
|
+
* apiVersion: 'karpenter.k8s.aws/v1beta1',
|
|
177
|
+
* kind: 'EC2NodeClass',
|
|
178
|
+
* name: 'default'
|
|
179
|
+
* },
|
|
180
|
+
* consolidationPolicy: 'WhenEmptyOrUnderutilized',
|
|
181
|
+
* consolidateAfter: '30s',
|
|
182
|
+
* expireAfter: '24h',
|
|
183
|
+
* disruptionBudgets: [
|
|
184
|
+
* { nodes: '20%' },
|
|
185
|
+
* { nodes: '0', schedule: '0 9 * * 1-5', duration: '8h' }
|
|
186
|
+
* ]
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
*
|
|
190
|
+
* @since 2.8.0+
|
|
191
|
+
*/
|
|
31
192
|
addKarpenterNodePoolWithDisruption(spec: {
|
|
32
193
|
name: string;
|
|
33
194
|
nodeClassRef: {
|
|
@@ -53,6 +214,33 @@ export declare class Rutter {
|
|
|
53
214
|
labels?: Record<string, string>;
|
|
54
215
|
annotations?: Record<string, string>;
|
|
55
216
|
}): ApiObject;
|
|
217
|
+
/**
|
|
218
|
+
* Creates a Karpenter NodePool with scheduling constraints and priorities
|
|
219
|
+
* @param spec - NodePool specification with scheduling optimization
|
|
220
|
+
* @returns Created NodePool ApiObject
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* rutter.addKarpenterNodePoolWithScheduling({
|
|
225
|
+
* name: 'gpu-workloads',
|
|
226
|
+
* nodeClassRef: {
|
|
227
|
+
* apiVersion: 'karpenter.k8s.aws/v1beta1',
|
|
228
|
+
* kind: 'EC2NodeClass',
|
|
229
|
+
* name: 'gpu-nodeclass'
|
|
230
|
+
* },
|
|
231
|
+
* requirements: [
|
|
232
|
+
* { key: 'node.kubernetes.io/instance-type', operator: 'In', values: ['g4dn.xlarge', 'g4dn.2xlarge'] }
|
|
233
|
+
* ],
|
|
234
|
+
* taints: [
|
|
235
|
+
* { key: 'nvidia.com/gpu', effect: 'NoSchedule' }
|
|
236
|
+
* ],
|
|
237
|
+
* terminationGracePeriod: '60s',
|
|
238
|
+
* weight: 100
|
|
239
|
+
* });
|
|
240
|
+
* ```
|
|
241
|
+
*
|
|
242
|
+
* @since 2.8.0+
|
|
243
|
+
*/
|
|
56
244
|
addKarpenterNodePoolWithScheduling(spec: {
|
|
57
245
|
name: string;
|
|
58
246
|
nodeClassRef: {
|
|
@@ -81,49 +269,239 @@ export declare class Rutter {
|
|
|
81
269
|
labels?: Record<string, string>;
|
|
82
270
|
annotations?: Record<string, string>;
|
|
83
271
|
}): ApiObject;
|
|
272
|
+
/**
|
|
273
|
+
* Creates a ServiceAccount with ECR access annotations
|
|
274
|
+
* @param spec - ECR ServiceAccount specification
|
|
275
|
+
* @returns Created cdk8s-plus ServiceAccount
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* rutter.addAWSECRServiceAccount({
|
|
280
|
+
* name: 'ecr-service-account',
|
|
281
|
+
* roleArn: 'arn:aws:iam::ACCOUNT_ID:role/ECRAccessRole'
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* @since 2.8.0+
|
|
286
|
+
*/
|
|
84
287
|
addAWSECRServiceAccount(spec: AWSECRServiceAccountSpec): ServiceAccount;
|
|
85
|
-
|
|
288
|
+
/**
|
|
289
|
+
* Adds an object-form Kubernetes manifest as a cdk8s ApiObject.
|
|
290
|
+
*
|
|
291
|
+
* Prefer native cdk8s/cdk8s-plus constructs attached to `getChart()` whenever an
|
|
292
|
+
* upstream typed construct exists. Use this object form primarily for CRDs or
|
|
293
|
+
* custom resources that do not yet have a suitable typed construct.
|
|
294
|
+
*
|
|
295
|
+
* @param yamlOrObject - Kubernetes manifest object, or deprecated raw YAML input
|
|
296
|
+
* @param id - Unique construct identifier
|
|
297
|
+
* @since 2.8.0+
|
|
298
|
+
*/
|
|
299
|
+
addManifest(manifestObject: Record<string, unknown>, id: string): ApiObject;
|
|
300
|
+
/**
|
|
301
|
+
* @deprecated Raw YAML bypasses TypeScript resource typing. Prefer cdk8s/cdk8s-plus
|
|
302
|
+
* constructs through `getChart()` or pass a typed object to `addManifest()`.
|
|
303
|
+
*/
|
|
304
|
+
addManifest(yaml: string, id: string): ApiObject;
|
|
305
|
+
/**
|
|
306
|
+
* Adds a template manifest to the chart with custom YAML content that preserves Helm expressions.
|
|
307
|
+
* This method allows you to provide raw YAML with Helm templates without serialization issues.
|
|
308
|
+
*
|
|
309
|
+
* @param yamlTemplate - The YAML template string with Helm expressions
|
|
310
|
+
* @param id - Unique identifier for the manifest
|
|
311
|
+
* @returns A compatibility placeholder that is excluded from synthesized output
|
|
312
|
+
* @deprecated Raw YAML templates bypass TypeScript resource typing. Prefer typed
|
|
313
|
+
* cdk8s/cdk8s-plus constructs through `getChart()` and ValuesRef for Helm values.
|
|
314
|
+
* This method is planned for removal in the next major release.
|
|
315
|
+
*/
|
|
86
316
|
addTemplateManifest(yamlTemplate: string, id: string): ApiObject;
|
|
317
|
+
/**
|
|
318
|
+
* Adds a Kubernetes manifest wrapped in a Helm conditional using programmatic template generation
|
|
319
|
+
*
|
|
320
|
+
* This method creates a manifest that will only be rendered if the specified
|
|
321
|
+
* condition evaluates to true. The condition is checked against .Values in Helm.
|
|
322
|
+
*
|
|
323
|
+
* **Key improvements in v2.9.2:**
|
|
324
|
+
* - Uses programmatic Helm template generation instead of JavaScript interpolation
|
|
325
|
+
* - Eliminates Handlebars dependency for conditional manifests
|
|
326
|
+
* - Leverages the include() function from helm.ts for proper Helm syntax
|
|
327
|
+
* - Provides better type safety and eliminates double interpolation issues
|
|
328
|
+
* - Maintains backward compatibility with existing condition syntax
|
|
329
|
+
*
|
|
330
|
+
* @param manifestObject - JavaScript object representing the Kubernetes manifest
|
|
331
|
+
* @param condition - Helm condition path (e.g., 'enabled', 'feature.enabled')
|
|
332
|
+
* Can also be a full Helm expression like '{{ .Values.enabled }}'
|
|
333
|
+
* @param id - Unique identifier for the manifest
|
|
334
|
+
* @returns ApiObject instance for CDK8S compatibility
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```typescript
|
|
338
|
+
* // Simple boolean condition
|
|
339
|
+
* rutter.addConditionalManifest(
|
|
340
|
+
* {
|
|
341
|
+
* apiVersion: 'v1',
|
|
342
|
+
* kind: 'Namespace',
|
|
343
|
+
* metadata: { name: 'my-namespace' }
|
|
344
|
+
* },
|
|
345
|
+
* 'createNamespace',
|
|
346
|
+
* 'namespace'
|
|
347
|
+
* );
|
|
348
|
+
*
|
|
349
|
+
* // Nested condition with complex logic
|
|
350
|
+
* rutter.addConditionalManifest(
|
|
351
|
+
* {
|
|
352
|
+
* apiVersion: 'v1',
|
|
353
|
+
* kind: 'ConfigMap',
|
|
354
|
+
* metadata: { name: 'app-config' },
|
|
355
|
+
* data: {
|
|
356
|
+
* config: '{{ .Values.config }}',
|
|
357
|
+
* environment: '{{ .Values.environment }}'
|
|
358
|
+
* }
|
|
359
|
+
* },
|
|
360
|
+
* 'features.configMap.enabled',
|
|
361
|
+
* 'app-config'
|
|
362
|
+
* );
|
|
363
|
+
* ```
|
|
364
|
+
*
|
|
365
|
+
* @throws {Error} When condition is invalid or manifest structure is malformed
|
|
366
|
+
* @since 2.8.4
|
|
367
|
+
* @since 2.9.2 Enhanced with programmatic Helm template generation for better reliability
|
|
368
|
+
*/
|
|
87
369
|
addConditionalManifest(manifestObject: Record<string, unknown>, condition: string, id: string): ApiObject;
|
|
370
|
+
/**
|
|
371
|
+
* Validates the structure of a Kubernetes manifest object
|
|
372
|
+
* @param manifest - The manifest object to validate
|
|
373
|
+
* @private
|
|
374
|
+
* @since 2.8.0+
|
|
375
|
+
*/
|
|
88
376
|
private validateManifestStructure;
|
|
377
|
+
/**
|
|
378
|
+
* Returns stable logical identifiers for all synthesized ApiObjects, including
|
|
379
|
+
* those nested inside cdk8s-plus resources.
|
|
380
|
+
*/
|
|
381
|
+
private getSynthesizedApiObjectIds;
|
|
382
|
+
/**
|
|
383
|
+
* Returns the underlying cdk8s Chart so consumers can attach fully typed
|
|
384
|
+
* cdk8s/cdk8s-plus constructs directly to Timonel's synthesis tree.
|
|
385
|
+
*
|
|
386
|
+
* @returns The cdk8s Chart owned by this Rutter instance
|
|
387
|
+
*/
|
|
388
|
+
getChart(): Chart;
|
|
389
|
+
/**
|
|
390
|
+
* Gets chart metadata
|
|
391
|
+
* @returns Chart metadata
|
|
392
|
+
*
|
|
393
|
+
* @since 2.8.0+
|
|
394
|
+
*/
|
|
89
395
|
getMeta(): ChartMetadata;
|
|
396
|
+
/**
|
|
397
|
+
* Gets default values
|
|
398
|
+
* @returns Default values object
|
|
399
|
+
*
|
|
400
|
+
* @since 1.0.0
|
|
401
|
+
*/
|
|
90
402
|
getDefaultValues(): Record<string, unknown>;
|
|
403
|
+
/**
|
|
404
|
+
* Gets environment-specific values
|
|
405
|
+
* @returns Environment values object
|
|
406
|
+
*
|
|
407
|
+
* @since 1.0.0
|
|
408
|
+
*/
|
|
91
409
|
getEnvValues(): Record<string, Record<string, unknown>>;
|
|
410
|
+
/**
|
|
411
|
+
* Gets all assets (CRDs, etc.)
|
|
412
|
+
* @returns Array of assets
|
|
413
|
+
*
|
|
414
|
+
* @since 1.0.0
|
|
415
|
+
*/
|
|
92
416
|
getAssets(): Array<{
|
|
93
417
|
id: string;
|
|
94
418
|
yaml: string;
|
|
95
419
|
target: string;
|
|
96
420
|
}>;
|
|
421
|
+
/**
|
|
422
|
+
* Converts the chart to SynthAsset array for HelmChartWriter
|
|
423
|
+
* @returns Array of synthesized assets
|
|
424
|
+
*
|
|
425
|
+
* @since 2.8.0+
|
|
426
|
+
*/
|
|
97
427
|
toSynthArray(): Promise<SynthAsset[]>;
|
|
428
|
+
/**
|
|
429
|
+
* Synchronous version of toSynthArray for backward compatibility
|
|
430
|
+
* @returns Array of synthesized assets
|
|
431
|
+
* @deprecated Use toSynthArray() instead for proper async handling
|
|
432
|
+
* @since 2.8.0+
|
|
433
|
+
*/
|
|
98
434
|
toSynthArraySync(): SynthAsset[];
|
|
435
|
+
/**
|
|
436
|
+
* Formats policy validation errors into a readable error message
|
|
437
|
+
* @param result - Policy validation result
|
|
438
|
+
* @returns Formatted error message
|
|
439
|
+
* @private
|
|
440
|
+
*/
|
|
99
441
|
private formatPolicyErrors;
|
|
442
|
+
/**
|
|
443
|
+
* Writes the Helm chart to the specified output directory
|
|
444
|
+
* @param outDir - Output directory path
|
|
445
|
+
*
|
|
446
|
+
* @since 1.0.0
|
|
447
|
+
*/
|
|
100
448
|
write(outDir: string): Promise<void>;
|
|
101
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* Helm chart metadata accepted by `Rutter`.
|
|
452
|
+
*
|
|
453
|
+
* `name` and `version` are required because they are emitted into `Chart.yaml`.
|
|
454
|
+
*/
|
|
102
455
|
export interface ChartMetadata {
|
|
456
|
+
/** Human-readable Helm chart description. */
|
|
103
457
|
description?: string;
|
|
458
|
+
/** Project or product home page URL. */
|
|
104
459
|
home?: string;
|
|
460
|
+
/** Search keywords emitted into chart metadata. */
|
|
105
461
|
keywords?: string[];
|
|
462
|
+
/** Helm chart maintainer records. */
|
|
106
463
|
maintainers?: Array<{
|
|
107
464
|
email?: string;
|
|
108
465
|
name: string;
|
|
109
466
|
url?: string;
|
|
110
467
|
}>;
|
|
468
|
+
/** Helm chart name. */
|
|
111
469
|
name: string;
|
|
470
|
+
/** Source repository or documentation URLs. */
|
|
112
471
|
sources?: string[];
|
|
472
|
+
/** Helm chart semantic version. */
|
|
113
473
|
version: string;
|
|
114
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* Configuration for a `Rutter` chart.
|
|
477
|
+
*/
|
|
115
478
|
export interface RutterProps {
|
|
479
|
+
/** Additional cdk8s Chart properties applied to the generated chart. */
|
|
116
480
|
chartProps?: ChartProps;
|
|
481
|
+
/** Cloud provider for default helpers. */
|
|
117
482
|
cloudProvider?: 'aws';
|
|
483
|
+
/** Default values emitted to `values.yaml`. */
|
|
118
484
|
defaultValues?: Record<string, unknown>;
|
|
485
|
+
/** Environment-specific values emitted to `values-<environment>.yaml`. */
|
|
119
486
|
envValues?: Record<string, Record<string, unknown>>;
|
|
487
|
+
/** Custom Helm helpers content or definitions. */
|
|
120
488
|
helpersTpl?: string | HelperDefinition[];
|
|
489
|
+
/** Custom prefix for manifest files. */
|
|
121
490
|
manifestPrefix?: string;
|
|
491
|
+
/** Required Helm chart metadata. */
|
|
122
492
|
meta: ChartMetadata;
|
|
493
|
+
/** Optional default namespace for the underlying cdk8s Chart. */
|
|
123
494
|
namespace?: string;
|
|
495
|
+
/** Optional policy engine for manifest validation. */
|
|
124
496
|
policyEngine?: PolicyEngine;
|
|
497
|
+
/** Optional caller-owned construct scope used as the parent of Timonel's cdk8s Chart. */
|
|
125
498
|
scope?: Construct;
|
|
499
|
+
/** Combine all resources into a single manifest file. */
|
|
126
500
|
singleManifestFile?: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Custom logger instance.
|
|
503
|
+
* @since 2.13.0
|
|
504
|
+
*/
|
|
127
505
|
logger?: TimonelLogger;
|
|
128
506
|
}
|
|
129
507
|
export type { AWSALBIngressSpec, AWSEBSStorageClassSpec, AWSEFSStorageClassSpec, AWSIRSAServiceAccountSpec, } from './resources/cloud/aws/awsResources.js';
|