timonel 2.8.0-beta.4 → 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 (72) hide show
  1. package/CHANGELOG.md +9 -19
  2. package/README.md +12 -55
  3. package/dist/cli.js +2 -2
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.d.ts +7 -15
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +5 -7
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/helm.d.ts +234 -4
  10. package/dist/lib/helm.d.ts.map +1 -1
  11. package/dist/lib/helm.js +309 -20
  12. package/dist/lib/helm.js.map +1 -1
  13. package/dist/lib/helmChartWriter.js +5 -19
  14. package/dist/lib/helmChartWriter.js.map +1 -1
  15. package/dist/lib/resources/baseResourceProvider.d.ts +1 -1
  16. package/dist/lib/resources/baseResourceProvider.d.ts.map +1 -1
  17. package/dist/lib/resources/baseResourceProvider.js.map +1 -1
  18. package/dist/lib/resources/cloud/aws/awsResources.d.ts +5 -6
  19. package/dist/lib/resources/cloud/aws/awsResources.d.ts.map +1 -1
  20. package/dist/lib/resources/cloud/aws/awsResources.js +59 -30
  21. package/dist/lib/resources/cloud/aws/awsResources.js.map +1 -1
  22. package/dist/lib/rutter.d.ts +73 -708
  23. package/dist/lib/rutter.d.ts.map +1 -1
  24. package/dist/lib/rutter.js +157 -837
  25. package/dist/lib/rutter.js.map +1 -1
  26. package/dist/lib/security.d.ts +2 -1
  27. package/dist/lib/security.d.ts.map +1 -1
  28. package/dist/lib/security.js +33 -4
  29. package/dist/lib/security.js.map +1 -1
  30. package/dist/lib/umbrellaRutter.d.ts +1 -1
  31. package/dist/lib/umbrellaRutter.d.ts.map +1 -1
  32. package/dist/lib/utils/helmHelpers.d.ts +2 -12
  33. package/dist/lib/utils/helmHelpers.d.ts.map +1 -1
  34. package/dist/lib/utils/helmHelpers.js +2 -46
  35. package/dist/lib/utils/helmHelpers.js.map +1 -1
  36. package/package.json +2 -2
  37. package/dist/lib/resources/autoscaling/autoscalingResources.d.ts +0 -248
  38. package/dist/lib/resources/autoscaling/autoscalingResources.d.ts.map +0 -1
  39. package/dist/lib/resources/autoscaling/autoscalingResources.js +0 -81
  40. package/dist/lib/resources/autoscaling/autoscalingResources.js.map +0 -1
  41. package/dist/lib/resources/cloud/azure/azureResources.d.ts +0 -169
  42. package/dist/lib/resources/cloud/azure/azureResources.d.ts.map +0 -1
  43. package/dist/lib/resources/cloud/azure/azureResources.js +0 -218
  44. package/dist/lib/resources/cloud/azure/azureResources.js.map +0 -1
  45. package/dist/lib/resources/cloud/gcp/gcpResources.d.ts +0 -164
  46. package/dist/lib/resources/cloud/gcp/gcpResources.d.ts.map +0 -1
  47. package/dist/lib/resources/cloud/gcp/gcpResources.js +0 -192
  48. package/dist/lib/resources/cloud/gcp/gcpResources.js.map +0 -1
  49. package/dist/lib/resources/core/coreResources.d.ts +0 -790
  50. package/dist/lib/resources/core/coreResources.d.ts.map +0 -1
  51. package/dist/lib/resources/core/coreResources.js +0 -1115
  52. package/dist/lib/resources/core/coreResources.js.map +0 -1
  53. package/dist/lib/resources/core/storageResources.d.ts +0 -133
  54. package/dist/lib/resources/core/storageResources.d.ts.map +0 -1
  55. package/dist/lib/resources/core/storageResources.js +0 -120
  56. package/dist/lib/resources/core/storageResources.js.map +0 -1
  57. package/dist/lib/resources/network/networkResources.d.ts +0 -229
  58. package/dist/lib/resources/network/networkResources.d.ts.map +0 -1
  59. package/dist/lib/resources/network/networkResources.js +0 -310
  60. package/dist/lib/resources/network/networkResources.js.map +0 -1
  61. package/dist/lib/resources/validation/validationResources.d.ts +0 -26
  62. package/dist/lib/resources/validation/validationResources.d.ts.map +0 -1
  63. package/dist/lib/resources/validation/validationResources.js +0 -33
  64. package/dist/lib/resources/validation/validationResources.js.map +0 -1
  65. package/dist/lib/utils/podTemplates.d.ts +0 -192
  66. package/dist/lib/utils/podTemplates.d.ts.map +0 -1
  67. package/dist/lib/utils/podTemplates.js +0 -331
  68. package/dist/lib/utils/podTemplates.js.map +0 -1
  69. package/dist/lib/utils/resourceNaming.d.ts +0 -57
  70. package/dist/lib/utils/resourceNaming.d.ts.map +0 -1
  71. package/dist/lib/utils/resourceNaming.js +0 -82
  72. package/dist/lib/utils/resourceNaming.js.map +0 -1
@@ -1,192 +0,0 @@
1
- import { BaseResourceProvider } from '../../baseResourceProvider.js';
2
- /**
3
- * GCP-specific Kubernetes resources provider
4
- * Handles GCP integrations like Persistent Disk, Filestore, GCE Ingress, Workload Identity, and other GCP services
5
- *
6
- * @since 2.4.0
7
- */
8
- export class GCPResources extends BaseResourceProvider {
9
- /**
10
- * Creates a GCP Persistent Disk StorageClass
11
- * @param spec - GCP PD StorageClass specification
12
- * @returns Created StorageClass ApiObject
13
- *
14
- * @example
15
- * ```typescript
16
- * gcpResources.addPersistentDiskStorageClass({
17
- * name: 'fast-ssd',
18
- * type: 'pd-ssd',
19
- * replicationType: 'regional-pd',
20
- * allowVolumeExpansion: true
21
- * });
22
- * ```
23
- *
24
- * @since 2.4.0
25
- */
26
- addPersistentDiskStorageClass(spec) {
27
- const parameters = {
28
- type: spec.type ?? 'pd-standard',
29
- ...(spec.replicationType ? { 'replication-type': spec.replicationType } : {}),
30
- ...(spec.fsType ? { fstype: spec.fsType } : {}),
31
- };
32
- const fields = {
33
- provisioner: 'pd.csi.storage.gke.io',
34
- parameters,
35
- reclaimPolicy: spec.reclaimPolicy ?? 'Delete',
36
- allowVolumeExpansion: spec.allowVolumeExpansion ?? true,
37
- volumeBindingMode: spec.volumeBindingMode ?? 'WaitForFirstConsumer',
38
- };
39
- return this.createRootLevelApiObject(spec.name, GCPResources.STORAGE_API_VERSION, 'StorageClass', fields, spec.labels, spec.annotations);
40
- }
41
- /**
42
- * Creates a GCP Filestore StorageClass
43
- * @param spec - GCP Filestore StorageClass specification
44
- * @returns Created StorageClass ApiObject
45
- *
46
- * @example
47
- * ```typescript
48
- * gcpResources.addFilestoreStorageClass({
49
- * name: 'filestore-premium',
50
- * tier: 'premium',
51
- * network: 'default',
52
- * allowVolumeExpansion: true
53
- * });
54
- * ```
55
- *
56
- * @since 2.4.0
57
- */
58
- addFilestoreStorageClass(spec) {
59
- const parameters = {
60
- tier: spec.tier ?? 'standard',
61
- network: spec.network ?? 'default',
62
- ...(spec.location ? { location: spec.location } : {}),
63
- };
64
- const fields = {
65
- provisioner: 'filestore.csi.storage.gke.io',
66
- parameters,
67
- reclaimPolicy: spec.reclaimPolicy ?? 'Delete',
68
- allowVolumeExpansion: spec.allowVolumeExpansion ?? true,
69
- volumeBindingMode: spec.volumeBindingMode ?? 'Immediate',
70
- };
71
- return this.createRootLevelApiObject(spec.name, GCPResources.STORAGE_API_VERSION, 'StorageClass', fields, spec.labels, spec.annotations);
72
- }
73
- /**
74
- * Creates a GCE Ingress with Google Cloud Load Balancer
75
- * @param spec - GCE Ingress specification
76
- * @returns Created Ingress ApiObject
77
- *
78
- * @example
79
- * ```typescript
80
- * gcpResources.addGCEIngress({
81
- * name: 'gce-ingress',
82
- * host: 'myapp.example.com',
83
- * serviceName: 'my-service',
84
- * servicePort: 80,
85
- * staticIPName: 'my-static-ip',
86
- * managedCertificate: 'my-ssl-cert'
87
- * });
88
- * ```
89
- *
90
- * @since 2.4.0
91
- */
92
- addGCEIngress(spec) {
93
- const annotations = {
94
- 'kubernetes.io/ingress.class': 'gce',
95
- ...(spec.staticIPName
96
- ? { 'kubernetes.io/ingress.global-static-ip-name': spec.staticIPName }
97
- : {}),
98
- ...(spec.managedCertificate
99
- ? { 'networking.gke.io/managed-certificates': spec.managedCertificate }
100
- : {}),
101
- ...(spec.sslRedirect !== undefined
102
- ? { 'ingress.gcp.kubernetes.io/force-ssl-redirect': String(spec.sslRedirect) }
103
- : {}),
104
- ...(spec.backendConfig
105
- ? { 'cloud.google.com/backend-config': JSON.stringify(spec.backendConfig) }
106
- : {}),
107
- ...(spec.annotations || {}),
108
- };
109
- const rules = [
110
- {
111
- host: spec.host,
112
- http: {
113
- paths: [
114
- {
115
- path: spec.path ?? '/*',
116
- pathType: 'ImplementationSpecific',
117
- backend: {
118
- service: {
119
- name: spec.serviceName,
120
- port: { number: spec.servicePort },
121
- },
122
- },
123
- },
124
- ],
125
- },
126
- },
127
- ];
128
- const ingressSpec = {
129
- rules,
130
- ...(spec.tls ? { tls: spec.tls } : {}),
131
- };
132
- return this.createApiObject(spec.name, GCPResources.NETWORKING_API_VERSION, 'Ingress', ingressSpec, spec.labels, annotations);
133
- }
134
- /**
135
- * Creates a ServiceAccount with Workload Identity annotations
136
- * @param spec - Workload Identity ServiceAccount specification
137
- * @returns Created ServiceAccount ApiObject
138
- *
139
- * @example
140
- * ```typescript
141
- * gcpResources.addWorkloadIdentityServiceAccount({
142
- * name: 'workload-identity-sa',
143
- * googleServiceAccount: 'my-gsa@my-project.iam.gserviceaccount.com',
144
- * namespace: 'default'
145
- * });
146
- * ```
147
- *
148
- * @since 2.4.0
149
- */
150
- addWorkloadIdentityServiceAccount(spec) {
151
- const annotations = {
152
- 'iam.gke.io/gcp-service-account': spec.googleServiceAccount,
153
- ...(spec.annotations || {}),
154
- };
155
- const serviceAccountSpec = {};
156
- return this.createApiObject(spec.name, GCPResources.CORE_API_VERSION, 'ServiceAccount', serviceAccountSpec, spec.labels, annotations);
157
- }
158
- /**
159
- * Creates a ServiceAccount with GCP Artifact Registry access
160
- * @param spec - Artifact Registry ServiceAccount specification
161
- * @returns Created ServiceAccount ApiObject
162
- *
163
- * @example
164
- * ```typescript
165
- * gcpResources.addArtifactRegistryServiceAccount({
166
- * name: 'artifact-registry-sa',
167
- * googleServiceAccount: 'my-gsa@project.iam.gserviceaccount.com'
168
- * });
169
- * ```
170
- *
171
- * @since 2.7.0
172
- */
173
- addArtifactRegistryServiceAccount(spec) {
174
- const googleServiceAccount = 'googleServiceAccount' in spec ? spec.googleServiceAccount : spec.gcpServiceAccount;
175
- const annotations = {
176
- 'iam.gke.io/gcp-service-account': googleServiceAccount,
177
- ...(spec.annotations || {}),
178
- };
179
- const serviceAccountSpec = {};
180
- if (spec.automountServiceAccountToken !== undefined) {
181
- serviceAccountSpec['automountServiceAccountToken'] = spec.automountServiceAccountToken;
182
- }
183
- if (spec.imagePullSecrets) {
184
- serviceAccountSpec['imagePullSecrets'] = spec.imagePullSecrets;
185
- }
186
- return this.createApiObject(spec.name, GCPResources.CORE_API_VERSION, 'ServiceAccount', serviceAccountSpec, spec.labels, annotations);
187
- }
188
- }
189
- GCPResources.STORAGE_API_VERSION = 'storage.k8s.io/v1';
190
- GCPResources.CORE_API_VERSION = 'v1';
191
- GCPResources.NETWORKING_API_VERSION = 'networking.k8s.io/v1';
192
- //# sourceMappingURL=gcpResources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gcpResources.js","sourceRoot":"","sources":["../../../../../src/lib/resources/cloud/gcp/gcpResources.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;GAKG;AACH,MAAM,OAAO,YAAa,SAAQ,oBAAoB;IAKpD;;;;;;;;;;;;;;;;OAgBG;IACH,6BAA6B,CAAC,IAAuC;QACnE,MAAM,UAAU,GAA2B;YACzC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,aAAa;YAChC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7E,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChD,CAAC;QAEF,MAAM,MAAM,GAAG;YACb,WAAW,EAAE,uBAAuB;YACpC,UAAU;YACV,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,QAAQ;YAC7C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,IAAI,IAAI;YACvD,iBAAiB,EAAE,IAAI,CA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