timonel 2.8.0-beta.5 → 2.8.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 (128) hide show
  1. package/CHANGELOG.md +9 -25
  2. package/README.md +12 -55
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/{src/cli.js → cli.js} +4 -35
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +14 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +13 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/{src/lib → lib}/helm.d.ts +234 -4
  11. package/dist/lib/helm.d.ts.map +1 -0
  12. package/dist/{src/lib → lib}/helm.js +309 -20
  13. package/dist/lib/helm.js.map +1 -0
  14. package/dist/lib/helmChartWriter.d.ts.map +1 -0
  15. package/dist/{src/lib → lib}/helmChartWriter.js +5 -19
  16. package/dist/lib/helmChartWriter.js.map +1 -0
  17. package/dist/{src/lib → lib}/resources/baseResourceProvider.d.ts +1 -1
  18. package/dist/lib/resources/baseResourceProvider.d.ts.map +1 -0
  19. package/dist/lib/resources/baseResourceProvider.js.map +1 -0
  20. package/dist/{src/lib → lib}/resources/cloud/aws/awsResources.d.ts +5 -14
  21. package/dist/lib/resources/cloud/aws/awsResources.d.ts.map +1 -0
  22. package/dist/{src/lib → lib}/resources/cloud/aws/awsResources.js +63 -78
  23. package/dist/lib/resources/cloud/aws/awsResources.js.map +1 -0
  24. package/dist/lib/resources/cloud/aws/karpenterResources.d.ts.map +1 -0
  25. package/dist/lib/resources/cloud/aws/karpenterResources.js.map +1 -0
  26. package/dist/lib/rutter.d.ts +445 -0
  27. package/dist/lib/rutter.d.ts.map +1 -0
  28. package/dist/lib/rutter.js +585 -0
  29. package/dist/lib/rutter.js.map +1 -0
  30. package/dist/{src/lib → lib}/security.d.ts +2 -72
  31. package/dist/lib/security.d.ts.map +1 -0
  32. package/dist/lib/security.js +390 -0
  33. package/dist/lib/security.js.map +1 -0
  34. package/dist/lib/umbrella.d.ts.map +1 -0
  35. package/dist/lib/umbrella.js.map +1 -0
  36. package/dist/{src/lib → lib}/umbrellaRutter.d.ts +1 -1
  37. package/dist/lib/umbrellaRutter.d.ts.map +1 -0
  38. package/dist/lib/umbrellaRutter.js.map +1 -0
  39. package/dist/{src/lib → lib}/utils/helmHelpers.d.ts +2 -12
  40. package/dist/lib/utils/helmHelpers.d.ts.map +1 -0
  41. package/dist/{src/lib → lib}/utils/helmHelpers.js +2 -46
  42. package/dist/lib/utils/helmHelpers.js.map +1 -0
  43. package/package.json +3 -4
  44. package/dist/src/cli.d.ts.map +0 -1
  45. package/dist/src/cli.js.map +0 -1
  46. package/dist/src/index.d.ts +0 -23
  47. package/dist/src/index.d.ts.map +0 -1
  48. package/dist/src/index.js +0 -15
  49. package/dist/src/index.js.map +0 -1
  50. package/dist/src/lib/constants.d.ts +0 -142
  51. package/dist/src/lib/constants.d.ts.map +0 -1
  52. package/dist/src/lib/constants.js +0 -167
  53. package/dist/src/lib/constants.js.map +0 -1
  54. package/dist/src/lib/helm.d.ts.map +0 -1
  55. package/dist/src/lib/helm.js.map +0 -1
  56. package/dist/src/lib/helmChartWriter.d.ts.map +0 -1
  57. package/dist/src/lib/helmChartWriter.js.map +0 -1
  58. package/dist/src/lib/resources/autoscaling/autoscalingResources.d.ts +0 -248
  59. package/dist/src/lib/resources/autoscaling/autoscalingResources.d.ts.map +0 -1
  60. package/dist/src/lib/resources/autoscaling/autoscalingResources.js +0 -81
  61. package/dist/src/lib/resources/autoscaling/autoscalingResources.js.map +0 -1
  62. package/dist/src/lib/resources/baseResourceProvider.d.ts.map +0 -1
  63. package/dist/src/lib/resources/baseResourceProvider.js.map +0 -1
  64. package/dist/src/lib/resources/cloud/aws/awsResources.d.ts.map +0 -1
  65. package/dist/src/lib/resources/cloud/aws/awsResources.js.map +0 -1
  66. package/dist/src/lib/resources/cloud/aws/karpenterResources.d.ts.map +0 -1
  67. package/dist/src/lib/resources/cloud/aws/karpenterResources.js.map +0 -1
  68. package/dist/src/lib/resources/cloud/azure/azureResources.d.ts +0 -169
  69. package/dist/src/lib/resources/cloud/azure/azureResources.d.ts.map +0 -1
  70. package/dist/src/lib/resources/cloud/azure/azureResources.js +0 -218
  71. package/dist/src/lib/resources/cloud/azure/azureResources.js.map +0 -1
  72. package/dist/src/lib/resources/cloud/gcp/gcpResources.d.ts +0 -164
  73. package/dist/src/lib/resources/cloud/gcp/gcpResources.d.ts.map +0 -1
  74. package/dist/src/lib/resources/cloud/gcp/gcpResources.js +0 -192
  75. package/dist/src/lib/resources/cloud/gcp/gcpResources.js.map +0 -1
  76. package/dist/src/lib/resources/core/coreResources.d.ts +0 -790
  77. package/dist/src/lib/resources/core/coreResources.d.ts.map +0 -1
  78. package/dist/src/lib/resources/core/coreResources.js +0 -1115
  79. package/dist/src/lib/resources/core/coreResources.js.map +0 -1
  80. package/dist/src/lib/resources/core/storageResources.d.ts +0 -133
  81. package/dist/src/lib/resources/core/storageResources.d.ts.map +0 -1
  82. package/dist/src/lib/resources/core/storageResources.js +0 -120
  83. package/dist/src/lib/resources/core/storageResources.js.map +0 -1
  84. package/dist/src/lib/resources/network/networkResources.d.ts +0 -515
  85. package/dist/src/lib/resources/network/networkResources.d.ts.map +0 -1
  86. package/dist/src/lib/resources/network/networkResources.js +0 -784
  87. package/dist/src/lib/resources/network/networkResources.js.map +0 -1
  88. package/dist/src/lib/resources/security/encryption.d.ts +0 -290
  89. package/dist/src/lib/resources/security/encryption.d.ts.map +0 -1
  90. package/dist/src/lib/resources/security/encryption.js +0 -295
  91. package/dist/src/lib/resources/security/encryption.js.map +0 -1
  92. package/dist/src/lib/resources/security/index.d.ts +0 -6
  93. package/dist/src/lib/resources/security/index.d.ts.map +0 -1
  94. package/dist/src/lib/resources/security/index.js +0 -6
  95. package/dist/src/lib/resources/security/index.js.map +0 -1
  96. package/dist/src/lib/resources/validation/validationResources.d.ts +0 -26
  97. package/dist/src/lib/resources/validation/validationResources.d.ts.map +0 -1
  98. package/dist/src/lib/resources/validation/validationResources.js +0 -33
  99. package/dist/src/lib/resources/validation/validationResources.js.map +0 -1
  100. package/dist/src/lib/rutter.d.ts +0 -1106
  101. package/dist/src/lib/rutter.d.ts.map +0 -1
  102. package/dist/src/lib/rutter.js +0 -1295
  103. package/dist/src/lib/rutter.js.map +0 -1
  104. package/dist/src/lib/security.d.ts.map +0 -1
  105. package/dist/src/lib/security.js +0 -569
  106. package/dist/src/lib/security.js.map +0 -1
  107. package/dist/src/lib/umbrella.d.ts.map +0 -1
  108. package/dist/src/lib/umbrella.js.map +0 -1
  109. package/dist/src/lib/umbrellaRutter.d.ts.map +0 -1
  110. package/dist/src/lib/umbrellaRutter.js.map +0 -1
  111. package/dist/src/lib/utils/helmHelpers.d.ts.map +0 -1
  112. package/dist/src/lib/utils/helmHelpers.js.map +0 -1
  113. package/dist/src/lib/utils/podTemplates.d.ts +0 -192
  114. package/dist/src/lib/utils/podTemplates.d.ts.map +0 -1
  115. package/dist/src/lib/utils/podTemplates.js +0 -331
  116. package/dist/src/lib/utils/podTemplates.js.map +0 -1
  117. package/dist/src/lib/utils/resourceNaming.d.ts +0 -57
  118. package/dist/src/lib/utils/resourceNaming.d.ts.map +0 -1
  119. package/dist/src/lib/utils/resourceNaming.js +0 -82
  120. package/dist/src/lib/utils/resourceNaming.js.map +0 -1
  121. /package/dist/{src/cli.d.ts → cli.d.ts} +0 -0
  122. /package/dist/{src/lib → lib}/helmChartWriter.d.ts +0 -0
  123. /package/dist/{src/lib → lib}/resources/baseResourceProvider.js +0 -0
  124. /package/dist/{src/lib → lib}/resources/cloud/aws/karpenterResources.d.ts +0 -0
  125. /package/dist/{src/lib → lib}/resources/cloud/aws/karpenterResources.js +0 -0
  126. /package/dist/{src/lib → lib}/umbrella.d.ts +0 -0
  127. /package/dist/{src/lib → lib}/umbrella.js +0 -0
  128. /package/dist/{src/lib → lib}/umbrellaRutter.js +0 -0
@@ -1,515 +0,0 @@
1
- /**
2
- * @fileoverview Network resources for Kubernetes networking
3
- * @since 2.7.0
4
- */
5
- import type { ApiObject } from 'cdk8s';
6
- import { BaseResourceProvider } from '../baseResourceProvider.js';
7
- /**
8
- * Network policy rule specification
9
- * @since 2.7.0
10
- */
11
- export interface NetworkPolicyRule {
12
- /** Ports to allow */
13
- ports?: Array<{
14
- port?: number | string;
15
- protocol?: 'TCP' | 'UDP' | 'SCTP';
16
- }>;
17
- /** Pod selector for allowed pods */
18
- podSelector?: {
19
- matchLabels?: Record<string, string>;
20
- matchExpressions?: Array<{
21
- key: string;
22
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
23
- values?: string[];
24
- }>;
25
- };
26
- /** Namespace selector for allowed namespaces */
27
- namespaceSelector?: {
28
- matchLabels?: Record<string, string>;
29
- matchExpressions?: Array<{
30
- key: string;
31
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
32
- values?: string[];
33
- }>;
34
- };
35
- }
36
- /**
37
- * Predefined NetworkPolicy templates for common security patterns
38
- * @since 2.9.0
39
- */
40
- export interface NetworkPolicyTemplate {
41
- /** Template name */
42
- name: string;
43
- /** Template description */
44
- description: string;
45
- /** Policy types */
46
- policyTypes: Array<'Ingress' | 'Egress'>;
47
- /** Ingress rules */
48
- ingress?: NetworkPolicyRule[];
49
- /** Egress rules */
50
- egress?: NetworkPolicyRule[];
51
- }
52
- /**
53
- * Network policy specification
54
- * @since 2.7.0
55
- */
56
- export interface NetworkPolicySpec {
57
- /** Resource name */
58
- name: string;
59
- /** Pod selector to apply policy to */
60
- podSelector: {
61
- matchLabels?: Record<string, string>;
62
- matchExpressions?: Array<{
63
- key: string;
64
- operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
65
- values?: string[];
66
- }>;
67
- };
68
- /** Policy types to apply */
69
- policyTypes?: Array<'Ingress' | 'Egress'>;
70
- /** Ingress rules */
71
- ingress?: NetworkPolicyRule[];
72
- /** Egress rules */
73
- egress?: NetworkPolicyRule[];
74
- /** Resource labels */
75
- labels?: Record<string, string>;
76
- /** Resource annotations */
77
- annotations?: Record<string, string>;
78
- }
79
- /**
80
- * TLS configuration for Ingress
81
- * @since 2.8.0
82
- */
83
- export interface IngressTLSConfig {
84
- /** Hosts covered by the TLS certificate */
85
- hosts?: string[];
86
- /** Name of the secret containing the TLS certificate and key */
87
- secretName?: string;
88
- }
89
- /**
90
- * Environment types for Ingress security validation
91
- * @since 2.8.0
92
- */
93
- export type IngressEnvironment = 'development' | 'staging' | 'production';
94
- /**
95
- * NGINX Ingress specific configuration
96
- * @since 2.9.0
97
- */
98
- export interface NginxIngressConfig {
99
- /** Enable SSL redirect */
100
- sslRedirect?: boolean;
101
- /** Force SSL redirect */
102
- forceSSLRedirect?: boolean;
103
- /** SSL protocols */
104
- sslProtocols?: string;
105
- /** SSL ciphers */
106
- sslCiphers?: string;
107
- /** Enable HSTS */
108
- enableHSTS?: boolean;
109
- /** HSTS max age */
110
- hstsMaxAge?: number;
111
- /** Include HSTS subdomains */
112
- hstsIncludeSubdomains?: boolean;
113
- /** Enable HSTS preload */
114
- hstsPreload?: boolean;
115
- /** Proxy body size */
116
- proxyBodySize?: string;
117
- /** Proxy connect timeout */
118
- proxyConnectTimeout?: number;
119
- /** Proxy send timeout */
120
- proxySendTimeout?: number;
121
- /** Proxy read timeout */
122
- proxyReadTimeout?: number;
123
- /** Enable CORS */
124
- enableCORS?: boolean;
125
- /** CORS allow origin */
126
- corsAllowOrigin?: string;
127
- /** CORS allow methods */
128
- corsAllowMethods?: string;
129
- /** CORS allow headers */
130
- corsAllowHeaders?: string;
131
- /** Rate limiting */
132
- rateLimiting?: {
133
- rps?: number;
134
- rpm?: number;
135
- connections?: number;
136
- };
137
- /** Custom configuration snippet */
138
- configurationSnippet?: string;
139
- /** Server snippet */
140
- serverSnippet?: string;
141
- /** Rewrite target */
142
- rewriteTarget?: string;
143
- /** Use regex in rewrite */
144
- useRegex?: boolean;
145
- /** Backend protocol */
146
- backendProtocol?: 'HTTP' | 'HTTPS' | 'GRPC' | 'GRPCS';
147
- /** Upstream hash by */
148
- upstreamHashBy?: string;
149
- /** Session affinity */
150
- sessionAffinity?: 'cookie';
151
- /** Session cookie name */
152
- sessionCookieName?: string;
153
- /** Session cookie expires */
154
- sessionCookieExpires?: number;
155
- /** Session cookie max age */
156
- sessionCookieMaxAge?: number;
157
- /** Session cookie path */
158
- sessionCookiePath?: string;
159
- /** Whitelist source range */
160
- whitelistSourceRange?: string[];
161
- }
162
- /**
163
- * Cert-manager integration configuration
164
- * @since 2.9.0
165
- */
166
- export interface CertManagerConfig {
167
- /** ClusterIssuer name */
168
- clusterIssuer?: string;
169
- /** Issuer name */
170
- issuer?: string;
171
- /** ACME challenge type */
172
- acmeChallenge?: 'http01' | 'dns01';
173
- /** Certificate class */
174
- certificateClass?: string;
175
- }
176
- /**
177
- * Ingress specification with enhanced TLS validation and security defaults
178
- * @since 2.7.0
179
- */
180
- export interface IngressSpec {
181
- /** Resource name */
182
- name: string;
183
- /** Ingress class name */
184
- ingressClassName?: string;
185
- /** TLS configuration with validation */
186
- tls?: IngressTLSConfig[];
187
- /** Ingress rules */
188
- rules?: Array<{
189
- host?: string;
190
- http?: {
191
- paths: Array<{
192
- path?: string;
193
- pathType?: 'Exact' | 'Prefix' | 'ImplementationSpecific';
194
- backend: {
195
- service: {
196
- name: string;
197
- port: {
198
- number?: number;
199
- name?: string;
200
- };
201
- };
202
- };
203
- }>;
204
- };
205
- }>;
206
- /** Environment for security validation (production requires TLS) */
207
- environment?: IngressEnvironment;
208
- /** Force TLS requirement regardless of environment */
209
- requireTLS?: boolean;
210
- /** Automatically redirect HTTP to HTTPS */
211
- forceSSLRedirect?: boolean;
212
- /** NGINX specific configuration */
213
- nginx?: NginxIngressConfig;
214
- /** Cert-manager integration */
215
- certManager?: CertManagerConfig;
216
- /** Resource labels */
217
- labels?: Record<string, string>;
218
- /** Resource annotations */
219
- annotations?: Record<string, string>;
220
- }
221
- /**
222
- * Network resources provider for NetworkPolicy and Ingress
223
- * @extends BaseResourceProvider
224
- * @since 2.7.0
225
- */
226
- export declare class NetworkResources extends BaseResourceProvider {
227
- /**
228
- * Error message for missing TLS configuration in production environments
229
- * @since 2.9.0
230
- */
231
- private static readonly TLS_REQUIRED_ERROR_MESSAGE;
232
- /**
233
- * Warning message for NetworkPolicy with default policy types
234
- * @since 2.9.0
235
- */
236
- private static readonly NETWORK_POLICY_DEFAULT_WARNING;
237
- /**
238
- * Info message for NetworkPolicy template usage
239
- * @since 2.9.0
240
- */
241
- private static readonly NETWORK_POLICY_TEMPLATE_INFO;
242
- /**
243
- * Kubernetes networking API version
244
- * @since 2.9.0
245
- */
246
- private static readonly NETWORKING_API_VERSION;
247
- /**
248
- * Creates a NetworkPolicy resource with enhanced defaults
249
- * @param spec - NetworkPolicy specification
250
- * @returns Created NetworkPolicy ApiObject
251
- * @since 2.7.0
252
- */
253
- addNetworkPolicy(spec: NetworkPolicySpec): ApiObject;
254
- /**
255
- * Creates a deny-all NetworkPolicy that blocks all ingress and egress traffic
256
- * @param name - Policy name
257
- * @param podSelector - Pod selector to apply policy to
258
- * @param labels - Optional labels
259
- * @param annotations - Optional annotations
260
- * @returns Created NetworkPolicy ApiObject
261
- * @since 2.7.0
262
- */
263
- addDenyAllNetworkPolicy(name: string, podSelector?: NetworkPolicySpec['podSelector'], labels?: Record<string, string>, annotations?: Record<string, string>): ApiObject;
264
- /**
265
- * Creates a NetworkPolicy that allows traffic from specific pods
266
- * @param name - Policy name
267
- * @param podSelector - Pod selector to apply policy to
268
- * @param fromPodSelector - Pod selector for allowed source pods
269
- * @param ports - Optional ports to allow
270
- * @param labels - Optional labels
271
- * @param annotations - Optional annotations
272
- * @returns Created NetworkPolicy ApiObject
273
- * @since 2.7.0
274
- */
275
- addAllowFromPodsNetworkPolicy(name: string, podSelector: NetworkPolicySpec['podSelector'], fromPodSelector: NetworkPolicyRule['podSelector'], ports?: NetworkPolicyRule['ports'], labels?: Record<string, string>, annotations?: Record<string, string>): ApiObject;
276
- /**
277
- * Creates a NetworkPolicy that allows traffic from specific namespaces
278
- * @param name - Policy name
279
- * @param podSelector - Pod selector to apply policy to
280
- * @param fromNamespaceSelector - Namespace selector for allowed source namespaces
281
- * @param ports - Optional ports to allow
282
- * @param labels - Optional labels
283
- * @param annotations - Optional annotations
284
- * @returns Created NetworkPolicy ApiObject
285
- * @since 2.7.0
286
- */
287
- addAllowFromNamespaceNetworkPolicy(name: string, podSelector: NetworkPolicySpec['podSelector'], fromNamespaceSelector: NetworkPolicyRule['namespaceSelector'], ports?: NetworkPolicyRule['ports'], labels?: Record<string, string>, annotations?: Record<string, string>): ApiObject;
288
- /**
289
- * Validates TLS configuration for security compliance
290
- * @param spec - Ingress specification to validate
291
- * @throws Error if TLS validation fails
292
- * @since 2.8.0
293
- */
294
- private validateIngressSecurity;
295
- /**
296
- * Validates hostname format (supports wildcards) with ReDoS protection
297
- * @param hostname - Hostname to validate
298
- * @returns True if hostname is valid
299
- * @since 2.8.0
300
- */
301
- private isValidHostname;
302
- /**
303
- * Applies NGINX Ingress specific annotations
304
- * @param spec - Ingress specification
305
- * @param annotations - Base annotations to enhance
306
- * @returns Enhanced annotations with NGINX specific settings
307
- * @since 2.9.0
308
- */
309
- private applyNginxAnnotations;
310
- /**
311
- * Apply SSL/TLS annotations
312
- * @private
313
- */
314
- private applySSLAnnotations;
315
- /**
316
- * Apply HSTS annotations
317
- * @private
318
- */
319
- private applyHSTSAnnotations;
320
- /**
321
- * Apply proxy annotations
322
- * @private
323
- */
324
- private applyProxyAnnotations;
325
- /**
326
- * Apply CORS annotations
327
- * @private
328
- */
329
- private applyCORSAnnotations;
330
- /**
331
- * Apply rate limiting annotations
332
- * @private
333
- */
334
- private applyRateLimitingAnnotations;
335
- /**
336
- * Apply rewrite annotations
337
- * @private
338
- */
339
- private applyRewriteAnnotations;
340
- /**
341
- * Apply backend annotations
342
- * @private
343
- */
344
- private applyBackendAnnotations;
345
- /**
346
- * Apply session affinity annotations
347
- * @private
348
- */
349
- private applySessionAffinityAnnotations;
350
- /**
351
- * Apply security annotations
352
- * @private
353
- */
354
- private applySecurityAnnotations;
355
- /**
356
- * Apply custom annotations
357
- * @private
358
- */
359
- private applyCustomAnnotations;
360
- /**
361
- * Applies cert-manager annotations for automatic certificate management
362
- * @param spec - Ingress specification
363
- * @param annotations - Base annotations to enhance
364
- * @returns Enhanced annotations with cert-manager settings
365
- * @since 2.9.0
366
- */
367
- private applyCertManagerAnnotations;
368
- /**
369
- * Applies security defaults to Ingress annotations
370
- * @param spec - Ingress specification
371
- * @returns Enhanced annotations with security defaults
372
- * @since 2.8.0
373
- */
374
- private applySecurityDefaults;
375
- /**
376
- * Creates a secure Ingress with TLS validation and environment-aware defaults
377
- * @param spec - Enhanced Ingress specification
378
- * @returns Created Ingress ApiObject
379
- * @example
380
- * ```typescript
381
- * // Production Ingress with mandatory TLS
382
- * networkResources.addSecureIngress({
383
- * name: 'web-ingress',
384
- * environment: 'production',
385
- * tls: [{
386
- * hosts: ['example.com'],
387
- * secretName: 'example-tls'
388
- * }],
389
- * rules: [{
390
- * host: 'example.com',
391
- * http: {
392
- * paths: [{
393
- * path: '/',
394
- * pathType: 'Prefix',
395
- * backend: {
396
- * service: { name: 'web-service', port: { number: 80 } }
397
- * }
398
- * }]
399
- * }
400
- * }]
401
- * });
402
- * ```
403
- * @since 2.8.0
404
- */
405
- addSecureIngress(spec: IngressSpec): ApiObject;
406
- /**
407
- * Creates an Ingress resource with optional TLS validation
408
- * @param spec - Ingress specification
409
- * @returns Created Ingress ApiObject
410
- * @deprecated Use addSecureIngress for enhanced security validation
411
- * @since 2.7.0
412
- */
413
- addIngress(spec: IngressSpec): ApiObject;
414
- /**
415
- * Creates an NGINX Ingress with enhanced configuration and cert-manager integration
416
- * @param spec - Enhanced Ingress specification with NGINX and cert-manager support
417
- * @returns Created Ingress ApiObject
418
- * @example
419
- * ```typescript
420
- * // NGINX Ingress with Let's Encrypt and advanced features
421
- * networkResources.addNginxIngress({
422
- * name: 'web-ingress',
423
- * ingressClassName: 'nginx',
424
- * environment: 'production',
425
- * rules: [{
426
- * host: 'example.com',
427
- * http: {
428
- * paths: [{
429
- * path: '/',
430
- * pathType: 'Prefix',
431
- * backend: {
432
- * service: { name: 'web-service', port: { number: 80 } }
433
- * }
434
- * }]
435
- * }
436
- * }],
437
- * tls: [{
438
- * hosts: ['example.com'],
439
- * secretName: 'example-tls'
440
- * }],
441
- * nginx: {
442
- * sslRedirect: true,
443
- * enableHSTS: true,
444
- * hstsMaxAge: 31536000,
445
- * proxyBodySize: '10m',
446
- * rateLimiting: { rps: 100 }
447
- * },
448
- * certManager: {
449
- * clusterIssuer: 'letsencrypt-prod'
450
- * }
451
- * });
452
- * ```
453
- * @since 2.9.0
454
- */
455
- addNginxIngress(spec: IngressSpec): ApiObject;
456
- /**
457
- * Creates an NGINX Ingress with Let's Encrypt certificate automation
458
- * @param name - Ingress name
459
- * @param host - Primary hostname
460
- * @param serviceName - Backend service name
461
- * @param servicePort - Backend service port
462
- * @param clusterIssuer - Let's Encrypt ClusterIssuer name
463
- * @param additionalHosts - Additional hostnames
464
- * @param path - URL path (default: '/')
465
- * @param pathType - Path type (default: 'Prefix')
466
- * @param nginxConfig - Optional NGINX configuration
467
- * @param labels - Optional labels
468
- * @param annotations - Optional additional annotations
469
- * @returns Created Ingress ApiObject
470
- * @example
471
- * ```typescript
472
- * // Simple NGINX Ingress with Let's Encrypt
473
- * networkResources.addNginxIngressWithLetsEncrypt(
474
- * 'web-ingress',
475
- * 'example.com',
476
- * 'web-service',
477
- * 80,
478
- * 'letsencrypt-prod',
479
- * ['www.example.com'],
480
- * '/',
481
- * 'Prefix',
482
- * { enableHSTS: true, rateLimiting: { rps: 50 } }
483
- * );
484
- * ```
485
- * @since 2.9.0
486
- */
487
- addNginxIngressWithLetsEncrypt(name: string, host: string, serviceName: string, servicePort: number, clusterIssuer: string, additionalHosts?: string[], path?: string, pathType?: 'Exact' | 'Prefix' | 'ImplementationSpecific', nginxConfig?: NginxIngressConfig, labels?: Record<string, string>, annotations?: Record<string, string>): ApiObject;
488
- /**
489
- * Gets predefined NetworkPolicy templates for common security patterns
490
- * @returns Array of predefined NetworkPolicy templates
491
- * @since 2.9.0
492
- */
493
- static getNetworkPolicyTemplates(): NetworkPolicyTemplate[];
494
- /**
495
- * Creates a NetworkPolicy from a predefined template
496
- * @param templateName - Name of the predefined template
497
- * @param name - Policy name
498
- * @param podSelector - Pod selector to apply policy to
499
- * @param labels - Optional labels
500
- * @param annotations - Optional annotations
501
- * @returns Created NetworkPolicy ApiObject
502
- * @example
503
- * ```typescript
504
- * // Create a deny-all policy
505
- * networkResources.addNetworkPolicyFromTemplate(
506
- * 'deny-all',
507
- * 'default-deny',
508
- * { matchLabels: { app: 'web' } }
509
- * );
510
- * ```
511
- * @since 2.9.0
512
- */
513
- addNetworkPolicyFromTemplate(templateName: string, name: string, podSelector: NetworkPolicySpec['podSelector'], labels?: Record<string, string>, annotations?: Record<string, string>): ApiObject;
514
- }
515
- //# sourceMappingURL=networkResources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"networkResources.d.ts","sourceRoot":"","sources":["../../../../../src/lib/resources/network/networkResources.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;KACnC,CAAC,CAAC;IACH,oCAAoC;IACpC,WAAW,CAAC,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,gBAAgB,CAAC,EAAE,KAAK,CAAC;YACvB,GAAG,EAAE,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