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.
- package/CHANGELOG.md +9 -19
- package/README.md +12 -55
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +7 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/lib/helm.d.ts +234 -4
- package/dist/lib/helm.d.ts.map +1 -1
- package/dist/lib/helm.js +309 -20
- package/dist/lib/helm.js.map +1 -1
- package/dist/lib/helmChartWriter.js +5 -19
- package/dist/lib/helmChartWriter.js.map +1 -1
- package/dist/lib/resources/baseResourceProvider.d.ts +1 -1
- package/dist/lib/resources/baseResourceProvider.d.ts.map +1 -1
- package/dist/lib/resources/baseResourceProvider.js.map +1 -1
- package/dist/lib/resources/cloud/aws/awsResources.d.ts +5 -6
- package/dist/lib/resources/cloud/aws/awsResources.d.ts.map +1 -1
- package/dist/lib/resources/cloud/aws/awsResources.js +59 -30
- package/dist/lib/resources/cloud/aws/awsResources.js.map +1 -1
- package/dist/lib/rutter.d.ts +73 -708
- package/dist/lib/rutter.d.ts.map +1 -1
- package/dist/lib/rutter.js +157 -837
- package/dist/lib/rutter.js.map +1 -1
- package/dist/lib/security.d.ts +2 -1
- package/dist/lib/security.d.ts.map +1 -1
- package/dist/lib/security.js +33 -4
- package/dist/lib/security.js.map +1 -1
- package/dist/lib/umbrellaRutter.d.ts +1 -1
- package/dist/lib/umbrellaRutter.d.ts.map +1 -1
- package/dist/lib/utils/helmHelpers.d.ts +2 -12
- package/dist/lib/utils/helmHelpers.d.ts.map +1 -1
- package/dist/lib/utils/helmHelpers.js +2 -46
- package/dist/lib/utils/helmHelpers.js.map +1 -1
- package/package.json +2 -2
- package/dist/lib/resources/autoscaling/autoscalingResources.d.ts +0 -248
- package/dist/lib/resources/autoscaling/autoscalingResources.d.ts.map +0 -1
- package/dist/lib/resources/autoscaling/autoscalingResources.js +0 -81
- package/dist/lib/resources/autoscaling/autoscalingResources.js.map +0 -1
- package/dist/lib/resources/cloud/azure/azureResources.d.ts +0 -169
- package/dist/lib/resources/cloud/azure/azureResources.d.ts.map +0 -1
- package/dist/lib/resources/cloud/azure/azureResources.js +0 -218
- package/dist/lib/resources/cloud/azure/azureResources.js.map +0 -1
- package/dist/lib/resources/cloud/gcp/gcpResources.d.ts +0 -164
- package/dist/lib/resources/cloud/gcp/gcpResources.d.ts.map +0 -1
- package/dist/lib/resources/cloud/gcp/gcpResources.js +0 -192
- package/dist/lib/resources/cloud/gcp/gcpResources.js.map +0 -1
- package/dist/lib/resources/core/coreResources.d.ts +0 -790
- package/dist/lib/resources/core/coreResources.d.ts.map +0 -1
- package/dist/lib/resources/core/coreResources.js +0 -1115
- package/dist/lib/resources/core/coreResources.js.map +0 -1
- package/dist/lib/resources/core/storageResources.d.ts +0 -133
- package/dist/lib/resources/core/storageResources.d.ts.map +0 -1
- package/dist/lib/resources/core/storageResources.js +0 -120
- package/dist/lib/resources/core/storageResources.js.map +0 -1
- package/dist/lib/resources/network/networkResources.d.ts +0 -229
- package/dist/lib/resources/network/networkResources.d.ts.map +0 -1
- package/dist/lib/resources/network/networkResources.js +0 -310
- package/dist/lib/resources/network/networkResources.js.map +0 -1
- package/dist/lib/resources/validation/validationResources.d.ts +0 -26
- package/dist/lib/resources/validation/validationResources.d.ts.map +0 -1
- package/dist/lib/resources/validation/validationResources.js +0 -33
- package/dist/lib/resources/validation/validationResources.js.map +0 -1
- package/dist/lib/utils/podTemplates.d.ts +0 -192
- package/dist/lib/utils/podTemplates.d.ts.map +0 -1
- package/dist/lib/utils/podTemplates.js +0 -331
- package/dist/lib/utils/podTemplates.js.map +0 -1
- package/dist/lib/utils/resourceNaming.d.ts +0 -57
- package/dist/lib/utils/resourceNaming.d.ts.map +0 -1
- package/dist/lib/utils/resourceNaming.js +0 -82
- package/dist/lib/utils/resourceNaming.js.map +0 -1
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Autoscaling resources for Kubernetes workloads
|
|
3
|
-
* @since 2.3.0
|
|
4
|
-
*/
|
|
5
|
-
import { BaseResourceProvider } from '../baseResourceProvider.js';
|
|
6
|
-
/**
|
|
7
|
-
* Autoscaling resources provider for HPA, VPA, and CronJob
|
|
8
|
-
* @extends BaseResourceProvider
|
|
9
|
-
* @since 2.3.0
|
|
10
|
-
*/
|
|
11
|
-
export class AutoscalingResources extends BaseResourceProvider {
|
|
12
|
-
/**
|
|
13
|
-
* Creates a Horizontal Pod Autoscaler (HPA) resource
|
|
14
|
-
* @param spec - HPA specification
|
|
15
|
-
* @returns Created HPA ApiObject
|
|
16
|
-
* @since 2.7.0
|
|
17
|
-
*/
|
|
18
|
-
addHorizontalPodAutoscaler(spec) {
|
|
19
|
-
const hpaSpec = {
|
|
20
|
-
scaleTargetRef: spec.scaleTargetRef,
|
|
21
|
-
maxReplicas: spec.maxReplicas,
|
|
22
|
-
};
|
|
23
|
-
if (spec.minReplicas !== undefined) {
|
|
24
|
-
hpaSpec['minReplicas'] = spec.minReplicas;
|
|
25
|
-
}
|
|
26
|
-
if (spec.metrics) {
|
|
27
|
-
hpaSpec['metrics'] = spec.metrics;
|
|
28
|
-
}
|
|
29
|
-
if (spec.behavior) {
|
|
30
|
-
hpaSpec['behavior'] = spec.behavior;
|
|
31
|
-
}
|
|
32
|
-
return this.createApiObject(spec.name, 'autoscaling/v2', 'HorizontalPodAutoscaler', hpaSpec, spec.labels, spec.annotations);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Creates a Vertical Pod Autoscaler (VPA) resource
|
|
36
|
-
* @param spec - VPA specification
|
|
37
|
-
* @returns Created VPA ApiObject
|
|
38
|
-
* @since 2.7.0
|
|
39
|
-
*/
|
|
40
|
-
addVerticalPodAutoscaler(spec) {
|
|
41
|
-
const vpaSpec = {
|
|
42
|
-
targetRef: spec.targetRef,
|
|
43
|
-
};
|
|
44
|
-
if (spec.updatePolicy) {
|
|
45
|
-
vpaSpec['updatePolicy'] = spec.updatePolicy;
|
|
46
|
-
}
|
|
47
|
-
if (spec.resourcePolicy) {
|
|
48
|
-
vpaSpec['resourcePolicy'] = spec.resourcePolicy;
|
|
49
|
-
}
|
|
50
|
-
return this.createApiObject(spec.name, 'autoscaling.k8s.io/v1', 'VerticalPodAutoscaler', vpaSpec, spec.labels, spec.annotations);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Creates a CronJob resource
|
|
54
|
-
* @param spec - CronJob specification
|
|
55
|
-
* @returns Created CronJob ApiObject
|
|
56
|
-
* @since 2.7.0
|
|
57
|
-
*/
|
|
58
|
-
addCronJob(spec) {
|
|
59
|
-
const cronJobSpec = {
|
|
60
|
-
schedule: spec.schedule,
|
|
61
|
-
jobTemplate: spec.jobTemplate,
|
|
62
|
-
};
|
|
63
|
-
if (spec.concurrencyPolicy) {
|
|
64
|
-
cronJobSpec['concurrencyPolicy'] = spec.concurrencyPolicy;
|
|
65
|
-
}
|
|
66
|
-
if (spec.startingDeadlineSeconds !== undefined) {
|
|
67
|
-
cronJobSpec['startingDeadlineSeconds'] = spec.startingDeadlineSeconds;
|
|
68
|
-
}
|
|
69
|
-
if (spec.suspend !== undefined) {
|
|
70
|
-
cronJobSpec['suspend'] = spec.suspend;
|
|
71
|
-
}
|
|
72
|
-
if (spec.successfulJobsHistoryLimit !== undefined) {
|
|
73
|
-
cronJobSpec['successfulJobsHistoryLimit'] = spec.successfulJobsHistoryLimit;
|
|
74
|
-
}
|
|
75
|
-
if (spec.failedJobsHistoryLimit !== undefined) {
|
|
76
|
-
cronJobSpec['failedJobsHistoryLimit'] = spec.failedJobsHistoryLimit;
|
|
77
|
-
}
|
|
78
|
-
return this.createApiObject(spec.name, 'batch/v1', 'CronJob', cronJobSpec, spec.labels, spec.annotations);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=autoscalingResources.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autoscalingResources.js","sourceRoot":"","sources":["../../../../src/lib/resources/autoscaling/autoscalingResources.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AA0NlE;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,oBAAoB;IAC5D;;;;;OAKG;IACH,0BAA0B,CAAC,IAAiC;QAC1D,MAAM,OAAO,GAA4B;YACvC,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC5C,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QACpC,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CACzB,IAAI,CAAC,IAAI,EACT,gBAAgB,EAChB,yBAAyB,EACzB,OAAO,EACP,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,WAAW,CACjB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,wBAAwB,CAAC,IAA+B;QACtD,MAAM,OAAO,GAA4B;YACvC,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;QAEF,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC9C,CAAC;QAED,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,OAAO,CAAC,gBAAgB,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cdk8s';
|
|
2
|
-
import { BaseResourceProvider } from '../../baseResourceProvider.js';
|
|
3
|
-
/**
|
|
4
|
-
* Azure-specific Kubernetes resources provider
|
|
5
|
-
* Handles Azure integrations like Azure Disk, Azure File, Application Gateway, AGIC, and other Azure services
|
|
6
|
-
*
|
|
7
|
-
* @since 2.4.0
|
|
8
|
-
*/
|
|
9
|
-
export declare class AzureResources extends BaseResourceProvider {
|
|
10
|
-
private static readonly STORAGE_API_VERSION;
|
|
11
|
-
private static readonly NETWORKING_API_VERSION;
|
|
12
|
-
/**
|
|
13
|
-
* Creates an Azure Disk StorageClass
|
|
14
|
-
* @param spec - Azure Disk StorageClass specification
|
|
15
|
-
* @returns Created StorageClass ApiObject
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* azureResources.addAzureDiskStorageClass({
|
|
20
|
-
* name: 'premium-disk',
|
|
21
|
-
* skuName: 'Premium_LRS',
|
|
22
|
-
* cachingMode: 'ReadOnly',
|
|
23
|
-
* allowVolumeExpansion: true
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @since 2.4.0
|
|
28
|
-
*/
|
|
29
|
-
addAzureDiskStorageClass(spec: AzureDiskStorageClassSpec): ApiObject;
|
|
30
|
-
/**
|
|
31
|
-
* Creates an Azure File StorageClass
|
|
32
|
-
* @param spec - Azure File StorageClass specification
|
|
33
|
-
* @returns Created StorageClass ApiObject
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* azureResources.addAzureFileStorageClass({
|
|
38
|
-
* name: 'azure-file-premium',
|
|
39
|
-
* skuName: 'Premium_LRS',
|
|
40
|
-
* protocol: 'nfs',
|
|
41
|
-
* allowSharedAccess: true
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @since 2.4.0
|
|
46
|
-
*/
|
|
47
|
-
addAzureFileStorageClass(spec: AzureFileStorageClassSpec): ApiObject;
|
|
48
|
-
/**
|
|
49
|
-
* Creates an Azure Application Gateway Ingress
|
|
50
|
-
* @param spec - AGIC Ingress specification
|
|
51
|
-
* @returns Created Ingress ApiObject
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```typescript
|
|
55
|
-
* azureResources.addApplicationGatewayIngress({
|
|
56
|
-
* name: 'app-gateway-ingress',
|
|
57
|
-
* host: 'myapp.example.com',
|
|
58
|
-
* serviceName: 'my-service',
|
|
59
|
-
* servicePort: 80,
|
|
60
|
-
* sslRedirect: true
|
|
61
|
-
* });
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* @since 2.4.0
|
|
65
|
-
*/
|
|
66
|
-
addApplicationGatewayIngress(spec: AzureAGICIngressSpec): ApiObject;
|
|
67
|
-
/**
|
|
68
|
-
* Creates an Azure Key Vault SecretProviderClass
|
|
69
|
-
* @param spec - Azure Key Vault SecretProviderClass specification
|
|
70
|
-
* @returns Created SecretProviderClass ApiObject
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* azureResources.addAzureKeyVaultSecretProviderClass({
|
|
75
|
-
* name: 'app-secrets',
|
|
76
|
-
* keyVaultName: 'my-keyvault',
|
|
77
|
-
* tenantId: '87654321-4321-4321-4321-210987654321',
|
|
78
|
-
* objects: [
|
|
79
|
-
* { objectName: 'database-password', objectType: 'secret' }
|
|
80
|
-
* ]
|
|
81
|
-
* });
|
|
82
|
-
* ```
|
|
83
|
-
*
|
|
84
|
-
* @since 2.4.0
|
|
85
|
-
*/
|
|
86
|
-
addAzureKeyVaultSecretProviderClass(spec: AzureKeyVaultSecretProviderClassSpec): ApiObject;
|
|
87
|
-
/**
|
|
88
|
-
* Creates an Azure Container Registry ServiceAccount
|
|
89
|
-
* @param spec - Azure ACR ServiceAccount specification
|
|
90
|
-
* @returns Created ServiceAccount ApiObject
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```typescript
|
|
94
|
-
* azureResources.addAzureACRServiceAccount({
|
|
95
|
-
* name: 'acr-service-account',
|
|
96
|
-
* acrName: 'myregistry',
|
|
97
|
-
* resourceGroup: 'my-rg'
|
|
98
|
-
* });
|
|
99
|
-
* ```
|
|
100
|
-
*
|
|
101
|
-
* @since 2.4.0
|
|
102
|
-
*/
|
|
103
|
-
addAzureACRServiceAccount(spec: AzureACRServiceAccountSpec): ApiObject;
|
|
104
|
-
}
|
|
105
|
-
export interface AzureDiskStorageClassSpec {
|
|
106
|
-
name: string;
|
|
107
|
-
skuName?: 'Standard_LRS' | 'Premium_LRS' | 'StandardSSD_LRS' | 'UltraSSD_LRS';
|
|
108
|
-
cachingMode?: 'None' | 'ReadOnly' | 'ReadWrite';
|
|
109
|
-
fsType?: string;
|
|
110
|
-
kind?: 'Shared' | 'Dedicated' | 'Managed';
|
|
111
|
-
reclaimPolicy?: 'Delete' | 'Retain';
|
|
112
|
-
allowVolumeExpansion?: boolean;
|
|
113
|
-
volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
|
|
114
|
-
labels?: Record<string, string>;
|
|
115
|
-
annotations?: Record<string, string>;
|
|
116
|
-
}
|
|
117
|
-
export interface AzureFileStorageClassSpec {
|
|
118
|
-
name: string;
|
|
119
|
-
skuName?: 'Standard_LRS' | 'Premium_LRS';
|
|
120
|
-
protocol?: 'smb' | 'nfs';
|
|
121
|
-
allowSharedAccess?: boolean;
|
|
122
|
-
reclaimPolicy?: 'Delete' | 'Retain';
|
|
123
|
-
allowVolumeExpansion?: boolean;
|
|
124
|
-
volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
|
|
125
|
-
labels?: Record<string, string>;
|
|
126
|
-
annotations?: Record<string, string>;
|
|
127
|
-
}
|
|
128
|
-
export interface AzureAGICIngressSpec {
|
|
129
|
-
name: string;
|
|
130
|
-
host: string;
|
|
131
|
-
serviceName: string;
|
|
132
|
-
servicePort: number;
|
|
133
|
-
path?: string;
|
|
134
|
-
sslRedirect?: boolean;
|
|
135
|
-
cookieBasedAffinity?: boolean;
|
|
136
|
-
requestTimeout?: number;
|
|
137
|
-
connectionDraining?: boolean;
|
|
138
|
-
tls?: Array<{
|
|
139
|
-
hosts: string[];
|
|
140
|
-
secretName: string;
|
|
141
|
-
}>;
|
|
142
|
-
labels?: Record<string, string>;
|
|
143
|
-
annotations?: Record<string, string>;
|
|
144
|
-
}
|
|
145
|
-
export interface AzureKeyVaultSecretProviderClassSpec {
|
|
146
|
-
name: string;
|
|
147
|
-
keyVaultName: string;
|
|
148
|
-
tenantId: string;
|
|
149
|
-
objects: Array<{
|
|
150
|
-
objectName: string;
|
|
151
|
-
objectType: 'secret' | 'key' | 'cert';
|
|
152
|
-
objectAlias?: string;
|
|
153
|
-
objectVersion?: string;
|
|
154
|
-
}>;
|
|
155
|
-
secretName?: string;
|
|
156
|
-
userAssignedIdentityID?: string;
|
|
157
|
-
labels?: Record<string, string>;
|
|
158
|
-
annotations?: Record<string, string>;
|
|
159
|
-
}
|
|
160
|
-
export interface AzureACRServiceAccountSpec {
|
|
161
|
-
name: string;
|
|
162
|
-
acrName: string;
|
|
163
|
-
resourceGroup?: string;
|
|
164
|
-
clientId?: string;
|
|
165
|
-
tenantId?: string;
|
|
166
|
-
labels?: Record<string, string>;
|
|
167
|
-
annotations?: Record<string, string>;
|
|
168
|
-
}
|
|
169
|
-
//# sourceMappingURL=azureResources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"azureResources.d.ts","sourceRoot":"","sources":["../../../../../src/lib/resources/cloud/azure/azureResources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,oBAAoB;IACtD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAuB;IAClE,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AAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC"}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import { BaseResourceProvider } from '../../baseResourceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Azure-specific Kubernetes resources provider
|
|
4
|
-
* Handles Azure integrations like Azure Disk, Azure File, Application Gateway, AGIC, and other Azure services
|
|
5
|
-
*
|
|
6
|
-
* @since 2.4.0
|
|
7
|
-
*/
|
|
8
|
-
export class AzureResources extends BaseResourceProvider {
|
|
9
|
-
/**
|
|
10
|
-
* Creates an Azure Disk StorageClass
|
|
11
|
-
* @param spec - Azure Disk StorageClass specification
|
|
12
|
-
* @returns Created StorageClass ApiObject
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* azureResources.addAzureDiskStorageClass({
|
|
17
|
-
* name: 'premium-disk',
|
|
18
|
-
* skuName: 'Premium_LRS',
|
|
19
|
-
* cachingMode: 'ReadOnly',
|
|
20
|
-
* allowVolumeExpansion: true
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @since 2.4.0
|
|
25
|
-
*/
|
|
26
|
-
addAzureDiskStorageClass(spec) {
|
|
27
|
-
const parameters = {
|
|
28
|
-
skuName: spec.skuName ?? 'Standard_LRS',
|
|
29
|
-
...(spec.cachingMode ? { cachingmode: spec.cachingMode } : {}),
|
|
30
|
-
...(spec.fsType ? { fsType: spec.fsType } : {}),
|
|
31
|
-
...(spec.kind ? { kind: spec.kind } : {}),
|
|
32
|
-
};
|
|
33
|
-
const fields = {
|
|
34
|
-
provisioner: 'disk.csi.azure.com',
|
|
35
|
-
parameters,
|
|
36
|
-
reclaimPolicy: spec.reclaimPolicy ?? 'Delete',
|
|
37
|
-
allowVolumeExpansion: spec.allowVolumeExpansion ?? true,
|
|
38
|
-
volumeBindingMode: spec.volumeBindingMode ?? 'WaitForFirstConsumer',
|
|
39
|
-
};
|
|
40
|
-
return this.createRootLevelApiObject(spec.name, AzureResources.STORAGE_API_VERSION, 'StorageClass', fields, spec.labels, spec.annotations);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Creates an Azure File StorageClass
|
|
44
|
-
* @param spec - Azure File StorageClass specification
|
|
45
|
-
* @returns Created StorageClass ApiObject
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```typescript
|
|
49
|
-
* azureResources.addAzureFileStorageClass({
|
|
50
|
-
* name: 'azure-file-premium',
|
|
51
|
-
* skuName: 'Premium_LRS',
|
|
52
|
-
* protocol: 'nfs',
|
|
53
|
-
* allowSharedAccess: true
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* @since 2.4.0
|
|
58
|
-
*/
|
|
59
|
-
addAzureFileStorageClass(spec) {
|
|
60
|
-
const parameters = {
|
|
61
|
-
skuName: spec.skuName ?? 'Standard_LRS',
|
|
62
|
-
...(spec.protocol ? { protocol: spec.protocol } : {}),
|
|
63
|
-
...(spec.allowSharedAccess !== undefined
|
|
64
|
-
? { allowSharedAccess: String(spec.allowSharedAccess) }
|
|
65
|
-
: {}),
|
|
66
|
-
};
|
|
67
|
-
const fields = {
|
|
68
|
-
provisioner: 'file.csi.azure.com',
|
|
69
|
-
parameters,
|
|
70
|
-
reclaimPolicy: spec.reclaimPolicy ?? 'Delete',
|
|
71
|
-
allowVolumeExpansion: spec.allowVolumeExpansion ?? true,
|
|
72
|
-
volumeBindingMode: spec.volumeBindingMode ?? 'Immediate',
|
|
73
|
-
};
|
|
74
|
-
return this.createRootLevelApiObject(spec.name, AzureResources.STORAGE_API_VERSION, 'StorageClass', fields, spec.labels, spec.annotations);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Creates an Azure Application Gateway Ingress
|
|
78
|
-
* @param spec - AGIC Ingress specification
|
|
79
|
-
* @returns Created Ingress ApiObject
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```typescript
|
|
83
|
-
* azureResources.addApplicationGatewayIngress({
|
|
84
|
-
* name: 'app-gateway-ingress',
|
|
85
|
-
* host: 'myapp.example.com',
|
|
86
|
-
* serviceName: 'my-service',
|
|
87
|
-
* servicePort: 80,
|
|
88
|
-
* sslRedirect: true
|
|
89
|
-
* });
|
|
90
|
-
* ```
|
|
91
|
-
*
|
|
92
|
-
* @since 2.4.0
|
|
93
|
-
*/
|
|
94
|
-
addApplicationGatewayIngress(spec) {
|
|
95
|
-
const annotations = {
|
|
96
|
-
'kubernetes.io/ingress.class': 'azure/application-gateway',
|
|
97
|
-
...(spec.sslRedirect !== undefined
|
|
98
|
-
? { 'appgw.ingress.kubernetes.io/ssl-redirect': String(spec.sslRedirect) }
|
|
99
|
-
: {}),
|
|
100
|
-
...(spec.cookieBasedAffinity !== undefined
|
|
101
|
-
? { 'appgw.ingress.kubernetes.io/cookie-based-affinity': String(spec.cookieBasedAffinity) }
|
|
102
|
-
: {}),
|
|
103
|
-
...(spec.requestTimeout
|
|
104
|
-
? { 'appgw.ingress.kubernetes.io/request-timeout': String(spec.requestTimeout) }
|
|
105
|
-
: {}),
|
|
106
|
-
...(spec.connectionDraining !== undefined
|
|
107
|
-
? { 'appgw.ingress.kubernetes.io/connection-draining': String(spec.connectionDraining) }
|
|
108
|
-
: {}),
|
|
109
|
-
...(spec.annotations || {}),
|
|
110
|
-
};
|
|
111
|
-
const rules = [
|
|
112
|
-
{
|
|
113
|
-
host: spec.host,
|
|
114
|
-
http: {
|
|
115
|
-
paths: [
|
|
116
|
-
{
|
|
117
|
-
path: spec.path ?? '/',
|
|
118
|
-
pathType: 'Prefix',
|
|
119
|
-
backend: {
|
|
120
|
-
service: {
|
|
121
|
-
name: spec.serviceName,
|
|
122
|
-
port: { number: spec.servicePort },
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
const ingressSpec = {
|
|
131
|
-
rules,
|
|
132
|
-
...(spec.tls ? { tls: spec.tls } : {}),
|
|
133
|
-
};
|
|
134
|
-
return this.createApiObject(spec.name, AzureResources.NETWORKING_API_VERSION, 'Ingress', ingressSpec, spec.labels, annotations);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Creates an Azure Key Vault SecretProviderClass
|
|
138
|
-
* @param spec - Azure Key Vault SecretProviderClass specification
|
|
139
|
-
* @returns Created SecretProviderClass ApiObject
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* azureResources.addAzureKeyVaultSecretProviderClass({
|
|
144
|
-
* name: 'app-secrets',
|
|
145
|
-
* keyVaultName: 'my-keyvault',
|
|
146
|
-
* tenantId: '87654321-4321-4321-4321-210987654321',
|
|
147
|
-
* objects: [
|
|
148
|
-
* { objectName: 'database-password', objectType: 'secret' }
|
|
149
|
-
* ]
|
|
150
|
-
* });
|
|
151
|
-
* ```
|
|
152
|
-
*
|
|
153
|
-
* @since 2.4.0
|
|
154
|
-
*/
|
|
155
|
-
addAzureKeyVaultSecretProviderClass(spec) {
|
|
156
|
-
// Validate object names for security
|
|
157
|
-
spec.objects.forEach((obj) => {
|
|
158
|
-
if (obj.objectName.includes('../') || obj.objectName.includes('..\\')) {
|
|
159
|
-
throw new Error(`Azure Key Vault ${spec.name}: Object name '${obj.objectName}' contains invalid path traversal sequences`);
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
const objects = spec.objects.map((obj) => ({
|
|
163
|
-
objectName: obj.objectName,
|
|
164
|
-
objectType: obj.objectType,
|
|
165
|
-
...(obj.objectAlias ? { objectAlias: obj.objectAlias } : {}),
|
|
166
|
-
...(obj.objectVersion ? { objectVersion: obj.objectVersion } : {}),
|
|
167
|
-
}));
|
|
168
|
-
const secretProviderSpec = {
|
|
169
|
-
secretObjects: [
|
|
170
|
-
{
|
|
171
|
-
secretName: spec.secretName || spec.name,
|
|
172
|
-
type: 'Opaque',
|
|
173
|
-
data: objects.map((obj) => ({
|
|
174
|
-
objectName: obj.objectName,
|
|
175
|
-
key: obj.objectAlias || obj.objectName,
|
|
176
|
-
})),
|
|
177
|
-
},
|
|
178
|
-
],
|
|
179
|
-
parameters: {
|
|
180
|
-
keyvaultName: spec.keyVaultName,
|
|
181
|
-
tenantId: spec.tenantId,
|
|
182
|
-
objects: JSON.stringify({ array: objects }),
|
|
183
|
-
...(spec.userAssignedIdentityID
|
|
184
|
-
? { userAssignedIdentityID: spec.userAssignedIdentityID }
|
|
185
|
-
: {}),
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
return this.createApiObject(spec.name, 'secrets-store.csi.x-k8s.io/v1', 'SecretProviderClass', secretProviderSpec, spec.labels, spec.annotations);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Creates an Azure Container Registry ServiceAccount
|
|
192
|
-
* @param spec - Azure ACR ServiceAccount specification
|
|
193
|
-
* @returns Created ServiceAccount ApiObject
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* ```typescript
|
|
197
|
-
* azureResources.addAzureACRServiceAccount({
|
|
198
|
-
* name: 'acr-service-account',
|
|
199
|
-
* acrName: 'myregistry',
|
|
200
|
-
* resourceGroup: 'my-rg'
|
|
201
|
-
* });
|
|
202
|
-
* ```
|
|
203
|
-
*
|
|
204
|
-
* @since 2.4.0
|
|
205
|
-
*/
|
|
206
|
-
addAzureACRServiceAccount(spec) {
|
|
207
|
-
const annotations = {
|
|
208
|
-
'azure.workload.identity/client-id': spec.clientId || '',
|
|
209
|
-
'azure.workload.identity/tenant-id': spec.tenantId || '',
|
|
210
|
-
...(spec.annotations || {}),
|
|
211
|
-
};
|
|
212
|
-
const serviceAccountSpec = {};
|
|
213
|
-
return this.createApiObject(spec.name, 'v1', 'ServiceAccount', serviceAccountSpec, spec.labels, annotations);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
AzureResources.STORAGE_API_VERSION = 'storage.k8s.io/v1';
|
|
217
|
-
AzureResources.NETWORKING_API_VERSION = 'networking.k8s.io/v1';
|
|
218
|
-
//# sourceMappingURL=azureResources.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"azureResources.js","sourceRoot":"","sources":["../../../../../src/lib/resources/cloud/azure/azureResources.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;GAKG;AACH,MAAM,OAAO,cAAe,SAAQ,oBAAoB;IAItD;;;;;;;;;;;;;;;;OAgBG;IACH,wBAAwB,CAAC,IAA+B;QACtD,MAAM,UAAU,GAA2B;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,cAAc;YACvC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC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ACJ,gBAAgB,EAChB,kBAAkB,EAClB,IAAI,CAAC,MAAM,EACX,WAAW,CACZ,CAAC;IACJ,CAAC;;AArQuB,kCAAmB,GAAG,mBAAmB,CAAC;AAC1C,qCAAsB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1,164 +0,0 @@
|
|
|
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
|
-
* Creates a ServiceAccount with GCP Artifact Registry access
|
|
88
|
-
* @param spec - Artifact Registry ServiceAccount specification
|
|
89
|
-
* @returns Created ServiceAccount ApiObject
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```typescript
|
|
93
|
-
* gcpResources.addArtifactRegistryServiceAccount({
|
|
94
|
-
* name: 'artifact-registry-sa',
|
|
95
|
-
* googleServiceAccount: 'my-gsa@project.iam.gserviceaccount.com'
|
|
96
|
-
* });
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* @since 2.7.0
|
|
100
|
-
*/
|
|
101
|
-
addArtifactRegistryServiceAccount(spec: GCPArtifactRegistryServiceAccountSpec): ApiObject;
|
|
102
|
-
}
|
|
103
|
-
export interface GCPPersistentDiskStorageClassSpec {
|
|
104
|
-
name: string;
|
|
105
|
-
type?: 'pd-standard' | 'pd-ssd' | 'pd-balanced';
|
|
106
|
-
replicationType?: 'none' | 'regional-pd';
|
|
107
|
-
fsType?: string;
|
|
108
|
-
reclaimPolicy?: 'Delete' | 'Retain';
|
|
109
|
-
allowVolumeExpansion?: boolean;
|
|
110
|
-
volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
|
|
111
|
-
labels?: Record<string, string>;
|
|
112
|
-
annotations?: Record<string, string>;
|
|
113
|
-
}
|
|
114
|
-
export interface GCPFilestoreStorageClassSpec {
|
|
115
|
-
name: string;
|
|
116
|
-
tier?: 'standard' | 'premium' | 'basic-hdd' | 'basic-ssd';
|
|
117
|
-
network?: string;
|
|
118
|
-
location?: string;
|
|
119
|
-
reclaimPolicy?: 'Delete' | 'Retain';
|
|
120
|
-
allowVolumeExpansion?: boolean;
|
|
121
|
-
volumeBindingMode?: 'Immediate' | 'WaitForFirstConsumer';
|
|
122
|
-
labels?: Record<string, string>;
|
|
123
|
-
annotations?: Record<string, string>;
|
|
124
|
-
}
|
|
125
|
-
export interface GCPGCEIngressSpec {
|
|
126
|
-
name: string;
|
|
127
|
-
host: string;
|
|
128
|
-
serviceName: string;
|
|
129
|
-
servicePort: number;
|
|
130
|
-
path?: string;
|
|
131
|
-
staticIPName?: string;
|
|
132
|
-
managedCertificate?: string;
|
|
133
|
-
sslRedirect?: boolean;
|
|
134
|
-
backendConfig?: Record<string, unknown>;
|
|
135
|
-
tls?: Array<{
|
|
136
|
-
hosts: string[];
|
|
137
|
-
secretName: string;
|
|
138
|
-
}>;
|
|
139
|
-
labels?: Record<string, string>;
|
|
140
|
-
annotations?: Record<string, string>;
|
|
141
|
-
}
|
|
142
|
-
export interface GCPWorkloadIdentityServiceAccountSpec {
|
|
143
|
-
name: string;
|
|
144
|
-
googleServiceAccount: string;
|
|
145
|
-
namespace?: string;
|
|
146
|
-
labels?: Record<string, string>;
|
|
147
|
-
annotations?: Record<string, string>;
|
|
148
|
-
}
|
|
149
|
-
export type GCPArtifactRegistryServiceAccountSpec = {
|
|
150
|
-
name: string;
|
|
151
|
-
automountServiceAccountToken?: boolean;
|
|
152
|
-
imagePullSecrets?: Array<{
|
|
153
|
-
name: string;
|
|
154
|
-
}>;
|
|
155
|
-
labels?: Record<string, string>;
|
|
156
|
-
annotations?: Record<string, string>;
|
|
157
|
-
} & ({
|
|
158
|
-
/** @deprecated Use gcpServiceAccount instead */ googleServiceAccount: string;
|
|
159
|
-
gcpServiceAccount?: never;
|
|
160
|
-
} | {
|
|
161
|
-
gcpServiceAccount: string;
|
|
162
|
-
googleServiceAccount?: never;
|
|
163
|
-
});
|
|
164
|
-
//# sourceMappingURL=gcpResources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gcpResources.d.ts","sourceRoot":"","sources":["../../../../../src/lib/resources/cloud/gcp/gcpResources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,oBAA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