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.
- package/CHANGELOG.md +6 -0
- package/README.md +5 -1
- package/SECURITY.md +3 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/{HelmChartWriter.d.ts → helmChartWriter.d.ts} +1 -1
- package/dist/lib/{HelmChartWriter.d.ts.map → helmChartWriter.d.ts.map} +1 -1
- package/dist/lib/{HelmChartWriter.js → helmChartWriter.js} +1 -1
- package/dist/lib/{HelmChartWriter.js.map → helmChartWriter.js.map} +1 -1
- package/dist/lib/resources/autoscaling/autoscalingResources.d.ts +26 -0
- package/dist/lib/resources/autoscaling/autoscalingResources.d.ts.map +1 -0
- package/dist/lib/resources/autoscaling/autoscalingResources.js +35 -0
- package/dist/lib/resources/autoscaling/autoscalingResources.js.map +1 -0
- package/dist/lib/resources/baseResourceProvider.d.ts +47 -0
- package/dist/lib/resources/baseResourceProvider.d.ts.map +1 -0
- package/dist/lib/resources/baseResourceProvider.js +83 -0
- package/dist/lib/resources/baseResourceProvider.js.map +1 -0
- package/dist/lib/resources/cloud/aws/awsResources.d.ts +165 -0
- package/dist/lib/resources/cloud/aws/awsResources.d.ts.map +1 -0
- package/dist/lib/resources/cloud/aws/awsResources.js +187 -0
- package/dist/lib/resources/cloud/aws/awsResources.js.map +1 -0
- package/dist/lib/resources/cloud/azure/azureResources.d.ts +169 -0
- package/dist/lib/resources/cloud/azure/azureResources.d.ts.map +1 -0
- package/dist/lib/resources/cloud/azure/azureResources.js +218 -0
- package/dist/lib/resources/cloud/azure/azureResources.js.map +1 -0
- package/dist/lib/resources/cloud/gcp/gcpResources.d.ts +133 -0
- package/dist/lib/resources/cloud/gcp/gcpResources.d.ts.map +1 -0
- package/dist/lib/resources/cloud/gcp/gcpResources.js +162 -0
- package/dist/lib/resources/cloud/gcp/gcpResources.js.map +1 -0
- package/dist/lib/resources/core/coreResources.d.ts +584 -0
- package/dist/lib/resources/core/coreResources.d.ts.map +1 -0
- package/dist/lib/resources/core/coreResources.js +796 -0
- package/dist/lib/resources/core/coreResources.js.map +1 -0
- package/dist/lib/resources/core/storageResources.d.ts +133 -0
- package/dist/lib/resources/core/storageResources.d.ts.map +1 -0
- package/dist/lib/resources/core/storageResources.js +120 -0
- package/dist/lib/resources/core/storageResources.js.map +1 -0
- package/dist/lib/resources/validation/validationResources.d.ts +26 -0
- package/dist/lib/resources/validation/validationResources.d.ts.map +1 -0
- package/dist/lib/resources/validation/validationResources.js +33 -0
- package/dist/lib/resources/validation/validationResources.js.map +1 -0
- package/dist/lib/rutter.d.ts +554 -0
- package/dist/lib/rutter.d.ts.map +1 -0
- package/dist/lib/rutter.js +665 -0
- package/dist/lib/rutter.js.map +1 -0
- package/dist/lib/security.d.ts +21 -0
- package/dist/lib/security.d.ts.map +1 -1
- package/dist/lib/security.js +21 -0
- package/dist/lib/security.js.map +1 -1
- package/dist/lib/umbrella.d.ts +22 -2
- package/dist/lib/umbrella.d.ts.map +1 -1
- package/dist/lib/umbrella.js +21 -1
- package/dist/lib/umbrella.js.map +1 -1
- package/dist/lib/umbrellaRutter.d.ts +97 -0
- package/dist/lib/umbrellaRutter.d.ts.map +1 -0
- package/dist/lib/{UmbrellaRutter.js → umbrellaRutter.js} +44 -1
- package/dist/lib/umbrellaRutter.js.map +1 -0
- package/package.json +2 -1
- package/dist/lib/Rutter.d.ts +0 -2688
- package/dist/lib/Rutter.d.ts.map +0 -1
- package/dist/lib/Rutter.js +0 -2863
- package/dist/lib/Rutter.js.map +0 -1
- package/dist/lib/UmbrellaRutter.d.ts +0 -34
- package/dist/lib/UmbrellaRutter.d.ts.map +0 -1
- package/dist/lib/UmbrellaRutter.js.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { ApiObject } from 'cdk8s';
|
|
2
|
+
import { BaseResourceProvider } from '../../baseResourceProvider.js';
|
|
3
|
+
/**
|
|
4
|
+
* GCP-specific Kubernetes resources provider
|
|
5
|
+
* Handles GCP integrations like Persistent Disk, Filestore, GCE Ingress, Workload Identity, and other GCP services
|
|
6
|
+
*
|
|
7
|
+
* @since 2.4.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class GCPResources extends BaseResourceProvider {
|
|
10
|
+
private static readonly STORAGE_API_VERSION;
|
|
11
|
+
private static readonly CORE_API_VERSION;
|
|
12
|
+
private static readonly NETWORKING_API_VERSION;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a GCP Persistent Disk StorageClass
|
|
15
|
+
* @param spec - GCP PD StorageClass specification
|
|
16
|
+
* @returns Created StorageClass ApiObject
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* gcpResources.addPersistentDiskStorageClass({
|
|
21
|
+
* name: 'fast-ssd',
|
|
22
|
+
* type: 'pd-ssd',
|
|
23
|
+
* replicationType: 'regional-pd',
|
|
24
|
+
* allowVolumeExpansion: true
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @since 2.4.0
|
|
29
|
+
*/
|
|
30
|
+
addPersistentDiskStorageClass(spec: GCPPersistentDiskStorageClassSpec): ApiObject;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a GCP Filestore StorageClass
|
|
33
|
+
* @param spec - GCP Filestore StorageClass specification
|
|
34
|
+
* @returns Created StorageClass ApiObject
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* gcpResources.addFilestoreStorageClass({
|
|
39
|
+
* name: 'filestore-premium',
|
|
40
|
+
* tier: 'premium',
|
|
41
|
+
* network: 'default',
|
|
42
|
+
* allowVolumeExpansion: true
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @since 2.4.0
|
|
47
|
+
*/
|
|
48
|
+
addFilestoreStorageClass(spec: GCPFilestoreStorageClassSpec): ApiObject;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a GCE Ingress with Google Cloud Load Balancer
|
|
51
|
+
* @param spec - GCE Ingress specification
|
|
52
|
+
* @returns Created Ingress ApiObject
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* gcpResources.addGCEIngress({
|
|
57
|
+
* name: 'gce-ingress',
|
|
58
|
+
* host: 'myapp.example.com',
|
|
59
|
+
* serviceName: 'my-service',
|
|
60
|
+
* servicePort: 80,
|
|
61
|
+
* staticIPName: 'my-static-ip',
|
|
62
|
+
* managedCertificate: 'my-ssl-cert'
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @since 2.4.0
|
|
67
|
+
*/
|
|
68
|
+
addGCEIngress(spec: GCPGCEIngressSpec): ApiObject;
|
|
69
|
+
/**
|
|
70
|
+
* Creates a ServiceAccount with Workload Identity annotations
|
|
71
|
+
* @param spec - Workload Identity ServiceAccount specification
|
|
72
|
+
* @returns Created ServiceAccount ApiObject
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* gcpResources.addWorkloadIdentityServiceAccount({
|
|
77
|
+
* name: 'workload-identity-sa',
|
|
78
|
+
* googleServiceAccount: 'my-gsa@my-project.iam.gserviceaccount.com',
|
|
79
|
+
* namespace: 'default'
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @since 2.4.0
|
|
84
|
+
*/
|
|
85
|
+
addWorkloadIdentityServiceAccount(spec: GCPWorkloadIdentityServiceAccountSpec): ApiObject;
|
|
86
|
+
}
|
|
87
|
+
export interface GCPPersistentDiskStorageClassSpec {
|
|
88
|
+
name: string;
|
|
89
|
+
type?: 'pd-standard' | 'pd-ssd' | 'pd-balanced';
|
|
90
|
+
replicationType?: 'none' | 'regional-pd';
|
|
91
|
+
fsType?: string;
|
|
92
|
+
reclaimPolicy?: 'Delete' | 'Retain';
|
|
93
|
+
allowVolumeExpansion?: boolean;
|
|
94
|
+
volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
|
|
95
|
+
labels?: Record<string, string>;
|
|
96
|
+
annotations?: Record<string, string>;
|
|
97
|
+
}
|
|
98
|
+
export interface GCPFilestoreStorageClassSpec {
|
|
99
|
+
name: string;
|
|
100
|
+
tier?: 'standard' | 'premium' | 'basic-hdd' | 'basic-ssd';
|
|
101
|
+
network?: string;
|
|
102
|
+
location?: string;
|
|
103
|
+
reclaimPolicy?: 'Delete' | 'Retain';
|
|
104
|
+
allowVolumeExpansion?: boolean;
|
|
105
|
+
volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
|
|
106
|
+
labels?: Record<string, string>;
|
|
107
|
+
annotations?: Record<string, string>;
|
|
108
|
+
}
|
|
109
|
+
export interface GCPGCEIngressSpec {
|
|
110
|
+
name: string;
|
|
111
|
+
host: string;
|
|
112
|
+
serviceName: string;
|
|
113
|
+
servicePort: number;
|
|
114
|
+
path?: string;
|
|
115
|
+
staticIPName?: string;
|
|
116
|
+
managedCertificate?: string;
|
|
117
|
+
sslRedirect?: boolean;
|
|
118
|
+
backendConfig?: Record<string, unknown>;
|
|
119
|
+
tls?: Array<{
|
|
120
|
+
hosts: string[];
|
|
121
|
+
secretName: string;
|
|
122
|
+
}>;
|
|
123
|
+
labels?: Record<string, string>;
|
|
124
|
+
annotations?: Record<string, string>;
|
|
125
|
+
}
|
|
126
|
+
export interface GCPWorkloadIdentityServiceAccountSpec {
|
|
127
|
+
name: string;
|
|
128
|
+
googleServiceAccount: string;
|
|
129
|
+
namespace?: string;
|
|
130
|
+
labels?: Record<string, string>;
|
|
131
|
+
annotations?: Record<string, string>;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=gcpResources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcpResources.d.ts","sourceRoot":"","sources":["../../../../../src/lib/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M,EAAE,MAAM,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
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 storageClassSpec = {
|
|
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.createApiObject(spec.name, GCPResources.STORAGE_API_VERSION, 'StorageClass', storageClassSpec, 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 storageClassSpec = {
|
|
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.createApiObject(spec.name, GCPResources.STORAGE_API_VERSION, 'StorageClass', storageClassSpec, 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
|
+
GCPResources.STORAGE_API_VERSION = 'storage.k8s.io/v1';
|
|
160
|
+
GCPResources.CORE_API_VERSION = 'v1';
|
|
161
|
+
GCPResources.NETWORKING_API_VERSION = 'networking.k8s.io/v1';
|
|
162
|
+
//# sourceMappingURL=gcpResources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;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