timonel 2.3.0 → 2.5.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 +13 -0
- package/README.md +5 -1
- package/SECURITY.md +3 -3
- package/dist/cli.js +33 -38
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -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 +766 -0
- package/dist/lib/resources/core/coreResources.d.ts.map +1 -0
- package/dist/lib/resources/core/coreResources.js +1043 -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 +567 -0
- package/dist/lib/rutter.d.ts.map +1 -0
- package/dist/lib/rutter.js +694 -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/dist/lib/utils/helmHelpers.d.ts +58 -0
- package/dist/lib/utils/helmHelpers.d.ts.map +1 -0
- package/dist/lib/utils/helmHelpers.js +155 -0
- package/dist/lib/utils/helmHelpers.js.map +1 -0
- package/dist/lib/utils/podTemplates.d.ts +192 -0
- package/dist/lib/utils/podTemplates.d.ts.map +1 -0
- package/dist/lib/utils/podTemplates.js +331 -0
- package/dist/lib/utils/podTemplates.js.map +1 -0
- package/dist/lib/utils/resourceNaming.d.ts +57 -0
- package/dist/lib/utils/resourceNaming.d.ts.map +1 -0
- package/dist/lib/utils/resourceNaming.js +82 -0
- package/dist/lib/utils/resourceNaming.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,766 @@
|
|
|
1
|
+
import { ApiObject } from 'cdk8s';
|
|
2
|
+
import { BaseResourceProvider } from '../baseResourceProvider.js';
|
|
3
|
+
/**
|
|
4
|
+
* Core Kubernetes resources provider
|
|
5
|
+
* Handles fundamental Kubernetes resources like Deployments, Services, ConfigMaps, etc.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.4.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class CoreResources extends BaseResourceProvider {
|
|
10
|
+
private static readonly APPS_API_VERSION;
|
|
11
|
+
private static readonly CORE_API_VERSION;
|
|
12
|
+
private static readonly RBAC_API_VERSION;
|
|
13
|
+
private static readonly LABEL_NAME;
|
|
14
|
+
private static readonly HELPER_NAME;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a Deployment resource
|
|
17
|
+
* @param spec - Deployment specification
|
|
18
|
+
* @returns Created Deployment ApiObject
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* coreResources.addDeployment({
|
|
23
|
+
* name: 'web-app',
|
|
24
|
+
* image: 'nginx:1.21',
|
|
25
|
+
* replicas: 3,
|
|
26
|
+
* containerPort: 80
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @since 2.4.0
|
|
31
|
+
*/
|
|
32
|
+
addDeployment(spec: DeploymentSpec): ApiObject;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a Service resource
|
|
35
|
+
* @param spec - Service specification
|
|
36
|
+
* @returns Created Service ApiObject
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* coreResources.addService({
|
|
41
|
+
* name: 'web-service',
|
|
42
|
+
* port: 80,
|
|
43
|
+
* targetPort: 8080,
|
|
44
|
+
* type: 'ClusterIP'
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @since 2.4.0
|
|
49
|
+
*/
|
|
50
|
+
addService(spec: ServiceSpec): ApiObject;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a ConfigMap resource
|
|
53
|
+
* @param spec - ConfigMap specification
|
|
54
|
+
* @returns Created ConfigMap ApiObject
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* coreResources.addConfigMap({
|
|
59
|
+
* name: 'app-config',
|
|
60
|
+
* data: {
|
|
61
|
+
* 'config.yaml': 'key: value',
|
|
62
|
+
* 'app.properties': 'debug=true'
|
|
63
|
+
* }
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @since 2.4.0
|
|
68
|
+
*/
|
|
69
|
+
addConfigMap(spec: ConfigMapSpec): ApiObject;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a Secret resource
|
|
72
|
+
* @param spec - Secret specification
|
|
73
|
+
* @returns Created Secret ApiObject
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* coreResources.addSecret({
|
|
78
|
+
* name: 'app-secrets',
|
|
79
|
+
* type: 'Opaque',
|
|
80
|
+
* data: {
|
|
81
|
+
* username: 'YWRtaW4=',
|
|
82
|
+
* password: 'MWYyZDFlMmU2N2Rm'
|
|
83
|
+
* }
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @since 2.4.0
|
|
88
|
+
*/
|
|
89
|
+
addSecret(spec: SecretSpec): ApiObject;
|
|
90
|
+
/**
|
|
91
|
+
* Creates a ServiceAccount resource
|
|
92
|
+
* @param spec - ServiceAccount specification
|
|
93
|
+
* @returns Created ServiceAccount ApiObject
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* coreResources.addServiceAccount({
|
|
98
|
+
* name: 'app-service-account',
|
|
99
|
+
* automountServiceAccountToken: false
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @since 2.4.0
|
|
104
|
+
*/
|
|
105
|
+
addServiceAccount(spec: ServiceAccountSpec): ApiObject;
|
|
106
|
+
/**
|
|
107
|
+
* Creates a DaemonSet resource
|
|
108
|
+
* @param spec - DaemonSet specification
|
|
109
|
+
* @returns Created DaemonSet ApiObject
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* coreResources.addDaemonSet({
|
|
114
|
+
* name: 'log-collector',
|
|
115
|
+
* image: 'fluentd:v1.14',
|
|
116
|
+
* containerPort: 24224,
|
|
117
|
+
* hostNetwork: true
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @since 2.4.0
|
|
122
|
+
*/
|
|
123
|
+
addDaemonSet(spec: DaemonSetSpec): ApiObject;
|
|
124
|
+
/**
|
|
125
|
+
* Builds DaemonSet specification object
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
private buildDaemonSetSpec;
|
|
129
|
+
/**
|
|
130
|
+
* Builds container specification for DaemonSet
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
private buildDaemonSetContainers;
|
|
134
|
+
/**
|
|
135
|
+
* Builds pod specification for DaemonSet
|
|
136
|
+
* @private
|
|
137
|
+
*/
|
|
138
|
+
private buildDaemonSetPodSpec;
|
|
139
|
+
/**
|
|
140
|
+
* Creates a StatefulSet resource
|
|
141
|
+
* @param spec - StatefulSet specification
|
|
142
|
+
* @returns Created StatefulSet ApiObject
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```typescript
|
|
146
|
+
* coreResources.addStatefulSet({
|
|
147
|
+
* name: 'database',
|
|
148
|
+
* image: 'postgres:13',
|
|
149
|
+
* replicas: 3,
|
|
150
|
+
* containerPort: 5432,
|
|
151
|
+
* serviceName: 'database-headless'
|
|
152
|
+
* });
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @since 2.4.0
|
|
156
|
+
*/
|
|
157
|
+
addStatefulSet(spec: StatefulSetSpec): ApiObject;
|
|
158
|
+
/**
|
|
159
|
+
* Builds StatefulSet specification object
|
|
160
|
+
* @private
|
|
161
|
+
*/
|
|
162
|
+
private buildStatefulSetSpec;
|
|
163
|
+
/**
|
|
164
|
+
* Builds container specification for StatefulSet
|
|
165
|
+
* @private
|
|
166
|
+
*/
|
|
167
|
+
private buildStatefulSetContainers;
|
|
168
|
+
/**
|
|
169
|
+
* Builds pod specification for StatefulSet
|
|
170
|
+
* @private
|
|
171
|
+
*/
|
|
172
|
+
private buildStatefulSetPodSpec;
|
|
173
|
+
/**
|
|
174
|
+
* Creates a Role resource for RBAC
|
|
175
|
+
* @param spec - Role specification
|
|
176
|
+
* @returns Created Role ApiObject
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* coreResources.addRole({
|
|
181
|
+
* name: 'pod-reader',
|
|
182
|
+
* rules: [
|
|
183
|
+
* {
|
|
184
|
+
* apiGroups: [''],
|
|
185
|
+
* resources: ['pods'],
|
|
186
|
+
* verbs: ['get', 'list', 'watch']
|
|
187
|
+
* }
|
|
188
|
+
* ]
|
|
189
|
+
* });
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @since 2.4.0
|
|
193
|
+
*/
|
|
194
|
+
addRole(spec: RoleSpec): ApiObject;
|
|
195
|
+
/**
|
|
196
|
+
* Creates a ClusterRole resource for cluster-wide RBAC
|
|
197
|
+
* @param spec - ClusterRole specification
|
|
198
|
+
* @returns Created ClusterRole ApiObject
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* coreResources.addClusterRole({
|
|
203
|
+
* name: 'cluster-admin',
|
|
204
|
+
* rules: [
|
|
205
|
+
* {
|
|
206
|
+
* apiGroups: ['*'],
|
|
207
|
+
* resources: ['*'],
|
|
208
|
+
* verbs: ['*']
|
|
209
|
+
* }
|
|
210
|
+
* ]
|
|
211
|
+
* });
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* @since 2.4.0
|
|
215
|
+
*/
|
|
216
|
+
addClusterRole(spec: ClusterRoleSpec): ApiObject;
|
|
217
|
+
/**
|
|
218
|
+
* Creates a RoleBinding resource for RBAC
|
|
219
|
+
* @param spec - RoleBinding specification
|
|
220
|
+
* @returns Created RoleBinding ApiObject
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* coreResources.addRoleBinding({
|
|
225
|
+
* name: 'pod-reader-binding',
|
|
226
|
+
* roleRef: {
|
|
227
|
+
* kind: 'Role',
|
|
228
|
+
* name: 'pod-reader',
|
|
229
|
+
* apiGroup: 'rbac.authorization.k8s.io'
|
|
230
|
+
* },
|
|
231
|
+
* subjects: [
|
|
232
|
+
* {
|
|
233
|
+
* kind: 'ServiceAccount',
|
|
234
|
+
* name: 'my-service-account',
|
|
235
|
+
* namespace: 'default'
|
|
236
|
+
* }
|
|
237
|
+
* ]
|
|
238
|
+
* });
|
|
239
|
+
* ```
|
|
240
|
+
*
|
|
241
|
+
* @since 2.4.0
|
|
242
|
+
*/
|
|
243
|
+
addRoleBinding(spec: RoleBindingSpec): ApiObject;
|
|
244
|
+
/**
|
|
245
|
+
* Creates a ClusterRoleBinding resource for cluster-wide RBAC
|
|
246
|
+
* @param spec - ClusterRoleBinding specification
|
|
247
|
+
* @returns Created ClusterRoleBinding ApiObject
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```typescript
|
|
251
|
+
* coreResources.addClusterRoleBinding({
|
|
252
|
+
* name: 'cluster-admin-binding',
|
|
253
|
+
* roleRef: {
|
|
254
|
+
* kind: 'ClusterRole',
|
|
255
|
+
* name: 'cluster-admin',
|
|
256
|
+
* apiGroup: 'rbac.authorization.k8s.io'
|
|
257
|
+
* },
|
|
258
|
+
* subjects: [
|
|
259
|
+
* {
|
|
260
|
+
* kind: 'ServiceAccount',
|
|
261
|
+
* name: 'admin-user',
|
|
262
|
+
* namespace: 'kube-system'
|
|
263
|
+
* }
|
|
264
|
+
* ]
|
|
265
|
+
* });
|
|
266
|
+
* ```
|
|
267
|
+
*
|
|
268
|
+
* @since 2.4.0
|
|
269
|
+
*/
|
|
270
|
+
addClusterRoleBinding(spec: ClusterRoleBindingSpec): ApiObject;
|
|
271
|
+
/**
|
|
272
|
+
* Creates a Job resource for batch workloads
|
|
273
|
+
* @param spec - Job specification
|
|
274
|
+
* @returns Created Job ApiObject
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* ```typescript
|
|
278
|
+
* coreResources.addJob({
|
|
279
|
+
* name: 'data-processor',
|
|
280
|
+
* image: 'busybox:1.35',
|
|
281
|
+
* command: ['sh', '-c', 'echo "Processing data..." && sleep 30'],
|
|
282
|
+
* completions: 1,
|
|
283
|
+
* parallelism: 1
|
|
284
|
+
* });
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* @since 2.4.0
|
|
288
|
+
*/
|
|
289
|
+
addJob(spec: JobSpec): ApiObject;
|
|
290
|
+
/**
|
|
291
|
+
* Builds Job specification object
|
|
292
|
+
* @private
|
|
293
|
+
*/
|
|
294
|
+
private buildJobSpec;
|
|
295
|
+
/**
|
|
296
|
+
* Builds container specification for Job
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
private buildJobContainers;
|
|
300
|
+
/**
|
|
301
|
+
* Builds pod specification for Job
|
|
302
|
+
* @private
|
|
303
|
+
*/
|
|
304
|
+
private buildJobPodSpec;
|
|
305
|
+
/**
|
|
306
|
+
* Creates a ReplicaSet resource
|
|
307
|
+
* @param spec - ReplicaSet specification
|
|
308
|
+
* @returns Created ReplicaSet ApiObject
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```typescript
|
|
312
|
+
* coreResources.addReplicaSet({
|
|
313
|
+
* name: 'web-replica',
|
|
314
|
+
* image: 'nginx:1.21',
|
|
315
|
+
* replicas: 3,
|
|
316
|
+
* containerPort: 80
|
|
317
|
+
* });
|
|
318
|
+
* ```
|
|
319
|
+
*
|
|
320
|
+
* @since 2.4.0
|
|
321
|
+
*/
|
|
322
|
+
addReplicaSet(spec: ReplicaSetSpec): ApiObject;
|
|
323
|
+
/**
|
|
324
|
+
* Creates a Pod resource
|
|
325
|
+
* @param spec - Pod specification
|
|
326
|
+
* @returns Created Pod ApiObject
|
|
327
|
+
*
|
|
328
|
+
* @example
|
|
329
|
+
* ```typescript
|
|
330
|
+
* coreResources.addPod({
|
|
331
|
+
* name: 'web-pod',
|
|
332
|
+
* image: 'nginx:1.21',
|
|
333
|
+
* containerPort: 80
|
|
334
|
+
* });
|
|
335
|
+
* ```
|
|
336
|
+
*
|
|
337
|
+
* @since 2.4.0
|
|
338
|
+
*/
|
|
339
|
+
addPod(spec: PodSpec): ApiObject;
|
|
340
|
+
/**
|
|
341
|
+
* Creates a CronJob resource
|
|
342
|
+
* @param spec - CronJob specification
|
|
343
|
+
* @returns Created CronJob ApiObject
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```typescript
|
|
347
|
+
* coreResources.addCronJob({
|
|
348
|
+
* name: 'backup-job',
|
|
349
|
+
* schedule: '0 2 * * *',
|
|
350
|
+
* image: 'backup:latest',
|
|
351
|
+
* command: ['sh', '-c', 'backup-script.sh']
|
|
352
|
+
* });
|
|
353
|
+
* ```
|
|
354
|
+
*
|
|
355
|
+
* @since 2.4.0
|
|
356
|
+
*/
|
|
357
|
+
addCronJob(spec: CronJobSpec): ApiObject;
|
|
358
|
+
/**
|
|
359
|
+
* Builds CronJob specification object
|
|
360
|
+
* @private
|
|
361
|
+
*/
|
|
362
|
+
private buildCronJobSpec;
|
|
363
|
+
/**
|
|
364
|
+
* Builds generic container specification
|
|
365
|
+
* @private
|
|
366
|
+
*/
|
|
367
|
+
private buildGenericContainers;
|
|
368
|
+
/**
|
|
369
|
+
* Builds pod specification for CronJob
|
|
370
|
+
* @private
|
|
371
|
+
*/
|
|
372
|
+
private buildCronJobPodSpec;
|
|
373
|
+
}
|
|
374
|
+
export interface DeploymentSpec {
|
|
375
|
+
name: string;
|
|
376
|
+
image: string;
|
|
377
|
+
replicas?: number;
|
|
378
|
+
containerPort?: number;
|
|
379
|
+
env?: Array<{
|
|
380
|
+
name: string;
|
|
381
|
+
value?: string;
|
|
382
|
+
valueFrom?: unknown;
|
|
383
|
+
}>;
|
|
384
|
+
resources?: {
|
|
385
|
+
requests?: {
|
|
386
|
+
cpu?: string;
|
|
387
|
+
memory?: string;
|
|
388
|
+
};
|
|
389
|
+
limits?: {
|
|
390
|
+
cpu?: string;
|
|
391
|
+
memory?: string;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
volumeMounts?: Array<{
|
|
395
|
+
name: string;
|
|
396
|
+
mountPath: string;
|
|
397
|
+
readOnly?: boolean;
|
|
398
|
+
}>;
|
|
399
|
+
volumes?: Array<unknown>;
|
|
400
|
+
serviceAccountName?: string;
|
|
401
|
+
securityContext?: unknown;
|
|
402
|
+
nodeSelector?: Record<string, string>;
|
|
403
|
+
tolerations?: Array<unknown>;
|
|
404
|
+
affinity?: unknown;
|
|
405
|
+
matchLabels?: Record<string, string>;
|
|
406
|
+
labels?: Record<string, string>;
|
|
407
|
+
annotations?: Record<string, string>;
|
|
408
|
+
}
|
|
409
|
+
export interface DaemonSetSpec {
|
|
410
|
+
name: string;
|
|
411
|
+
image: string;
|
|
412
|
+
containerPort?: number;
|
|
413
|
+
env?: Array<{
|
|
414
|
+
name: string;
|
|
415
|
+
value?: string;
|
|
416
|
+
valueFrom?: unknown;
|
|
417
|
+
}>;
|
|
418
|
+
resources?: {
|
|
419
|
+
requests?: {
|
|
420
|
+
cpu?: string;
|
|
421
|
+
memory?: string;
|
|
422
|
+
};
|
|
423
|
+
limits?: {
|
|
424
|
+
cpu?: string;
|
|
425
|
+
memory?: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
volumeMounts?: Array<{
|
|
429
|
+
name: string;
|
|
430
|
+
mountPath: string;
|
|
431
|
+
readOnly?: boolean;
|
|
432
|
+
}>;
|
|
433
|
+
volumes?: Array<unknown>;
|
|
434
|
+
serviceAccountName?: string;
|
|
435
|
+
securityContext?: unknown;
|
|
436
|
+
nodeSelector?: Record<string, string>;
|
|
437
|
+
tolerations?: Array<unknown>;
|
|
438
|
+
affinity?: unknown;
|
|
439
|
+
matchLabels?: Record<string, string>;
|
|
440
|
+
labels?: Record<string, string>;
|
|
441
|
+
annotations?: Record<string, string>;
|
|
442
|
+
hostNetwork?: boolean;
|
|
443
|
+
hostPID?: boolean;
|
|
444
|
+
dnsPolicy?: string;
|
|
445
|
+
priorityClassName?: string;
|
|
446
|
+
updateStrategy?: {
|
|
447
|
+
type?: 'RollingUpdate' | 'OnDelete';
|
|
448
|
+
rollingUpdate?: {
|
|
449
|
+
maxUnavailable?: number | string;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
export interface StatefulSetSpec {
|
|
454
|
+
name: string;
|
|
455
|
+
image: string;
|
|
456
|
+
replicas?: number | string;
|
|
457
|
+
serviceName: string;
|
|
458
|
+
containerPort?: number;
|
|
459
|
+
env?: Array<{
|
|
460
|
+
name: string;
|
|
461
|
+
value?: string;
|
|
462
|
+
valueFrom?: unknown;
|
|
463
|
+
}>;
|
|
464
|
+
resources?: {
|
|
465
|
+
requests?: {
|
|
466
|
+
cpu?: string;
|
|
467
|
+
memory?: string;
|
|
468
|
+
};
|
|
469
|
+
limits?: {
|
|
470
|
+
cpu?: string;
|
|
471
|
+
memory?: string;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
volumeMounts?: Array<{
|
|
475
|
+
name: string;
|
|
476
|
+
mountPath: string;
|
|
477
|
+
readOnly?: boolean;
|
|
478
|
+
}>;
|
|
479
|
+
volumes?: Array<unknown>;
|
|
480
|
+
volumeClaimTemplates?: Array<unknown>;
|
|
481
|
+
serviceAccountName?: string;
|
|
482
|
+
securityContext?: unknown;
|
|
483
|
+
nodeSelector?: Record<string, string>;
|
|
484
|
+
tolerations?: Array<unknown>;
|
|
485
|
+
affinity?: unknown;
|
|
486
|
+
matchLabels?: Record<string, string>;
|
|
487
|
+
labels?: Record<string, string>;
|
|
488
|
+
annotations?: Record<string, string>;
|
|
489
|
+
initContainers?: Array<unknown>;
|
|
490
|
+
livenessProbe?: unknown;
|
|
491
|
+
readinessProbe?: unknown;
|
|
492
|
+
terminationGracePeriodSeconds?: number;
|
|
493
|
+
updateStrategy?: {
|
|
494
|
+
type?: 'RollingUpdate' | 'OnDelete';
|
|
495
|
+
rollingUpdate?: {
|
|
496
|
+
partition?: number;
|
|
497
|
+
maxUnavailable?: number | string;
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
podManagementPolicy?: 'OrderedReady' | 'Parallel';
|
|
501
|
+
revisionHistoryLimit?: number;
|
|
502
|
+
}
|
|
503
|
+
export interface RoleSpec {
|
|
504
|
+
name: string;
|
|
505
|
+
namespace?: string;
|
|
506
|
+
rules: Array<{
|
|
507
|
+
apiGroups?: string[];
|
|
508
|
+
resources?: string[];
|
|
509
|
+
resourceNames?: string[];
|
|
510
|
+
verbs: string[];
|
|
511
|
+
nonResourceURLs?: string[];
|
|
512
|
+
}>;
|
|
513
|
+
labels?: Record<string, string>;
|
|
514
|
+
annotations?: Record<string, string>;
|
|
515
|
+
}
|
|
516
|
+
export interface ClusterRoleSpec {
|
|
517
|
+
name: string;
|
|
518
|
+
rules: Array<{
|
|
519
|
+
apiGroups?: string[];
|
|
520
|
+
resources?: string[];
|
|
521
|
+
resourceNames?: string[];
|
|
522
|
+
verbs: string[];
|
|
523
|
+
nonResourceURLs?: string[];
|
|
524
|
+
}>;
|
|
525
|
+
labels?: Record<string, string>;
|
|
526
|
+
annotations?: Record<string, string>;
|
|
527
|
+
}
|
|
528
|
+
export interface RoleBindingSpec {
|
|
529
|
+
name: string;
|
|
530
|
+
namespace?: string;
|
|
531
|
+
roleRef: {
|
|
532
|
+
kind: 'Role' | 'ClusterRole';
|
|
533
|
+
name: string;
|
|
534
|
+
apiGroup: string;
|
|
535
|
+
};
|
|
536
|
+
subjects: Array<{
|
|
537
|
+
kind: 'User' | 'Group' | 'ServiceAccount';
|
|
538
|
+
name: string;
|
|
539
|
+
namespace?: string;
|
|
540
|
+
apiGroup?: string;
|
|
541
|
+
}>;
|
|
542
|
+
labels?: Record<string, string>;
|
|
543
|
+
annotations?: Record<string, string>;
|
|
544
|
+
}
|
|
545
|
+
export interface ClusterRoleBindingSpec {
|
|
546
|
+
name: string;
|
|
547
|
+
roleRef: {
|
|
548
|
+
kind: 'Role' | 'ClusterRole';
|
|
549
|
+
name: string;
|
|
550
|
+
apiGroup: string;
|
|
551
|
+
};
|
|
552
|
+
subjects: Array<{
|
|
553
|
+
kind: 'User' | 'Group' | 'ServiceAccount';
|
|
554
|
+
name: string;
|
|
555
|
+
namespace?: string;
|
|
556
|
+
apiGroup?: string;
|
|
557
|
+
}>;
|
|
558
|
+
labels?: Record<string, string>;
|
|
559
|
+
annotations?: Record<string, string>;
|
|
560
|
+
}
|
|
561
|
+
export interface JobSpec {
|
|
562
|
+
name: string;
|
|
563
|
+
image: string;
|
|
564
|
+
command?: string[];
|
|
565
|
+
args?: string[];
|
|
566
|
+
completions?: number;
|
|
567
|
+
parallelism?: number;
|
|
568
|
+
backoffLimit?: number;
|
|
569
|
+
activeDeadlineSeconds?: number;
|
|
570
|
+
ttlSecondsAfterFinished?: number;
|
|
571
|
+
completionMode?: 'NonIndexed' | 'Indexed';
|
|
572
|
+
suspend?: boolean;
|
|
573
|
+
restartPolicy?: 'Never' | 'OnFailure';
|
|
574
|
+
env?: Array<{
|
|
575
|
+
name: string;
|
|
576
|
+
value?: string;
|
|
577
|
+
valueFrom?: unknown;
|
|
578
|
+
}>;
|
|
579
|
+
resources?: {
|
|
580
|
+
requests?: {
|
|
581
|
+
cpu?: string;
|
|
582
|
+
memory?: string;
|
|
583
|
+
};
|
|
584
|
+
limits?: {
|
|
585
|
+
cpu?: string;
|
|
586
|
+
memory?: string;
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
volumeMounts?: Array<{
|
|
590
|
+
name: string;
|
|
591
|
+
mountPath: string;
|
|
592
|
+
readOnly?: boolean;
|
|
593
|
+
}>;
|
|
594
|
+
volumes?: Array<unknown>;
|
|
595
|
+
serviceAccountName?: string;
|
|
596
|
+
securityContext?: unknown;
|
|
597
|
+
nodeSelector?: Record<string, string>;
|
|
598
|
+
tolerations?: Array<unknown>;
|
|
599
|
+
affinity?: unknown;
|
|
600
|
+
matchLabels?: Record<string, string>;
|
|
601
|
+
labels?: Record<string, string>;
|
|
602
|
+
annotations?: Record<string, string>;
|
|
603
|
+
initContainers?: Array<unknown>;
|
|
604
|
+
}
|
|
605
|
+
export interface ServiceSpec {
|
|
606
|
+
name: string;
|
|
607
|
+
port: number;
|
|
608
|
+
targetPort?: number;
|
|
609
|
+
ports?: Array<{
|
|
610
|
+
port: number;
|
|
611
|
+
targetPort?: number;
|
|
612
|
+
protocol?: string;
|
|
613
|
+
name?: string;
|
|
614
|
+
}>;
|
|
615
|
+
type?: 'ClusterIP' | 'NodePort' | 'LoadBalancer' | 'ExternalName';
|
|
616
|
+
selector?: Record<string, string>;
|
|
617
|
+
clusterIP?: string;
|
|
618
|
+
externalIPs?: string[];
|
|
619
|
+
loadBalancerIP?: string;
|
|
620
|
+
sessionAffinity?: string;
|
|
621
|
+
protocol?: string;
|
|
622
|
+
labels?: Record<string, string>;
|
|
623
|
+
annotations?: Record<string, string>;
|
|
624
|
+
}
|
|
625
|
+
export interface ConfigMapSpec {
|
|
626
|
+
name: string;
|
|
627
|
+
data?: Record<string, string>;
|
|
628
|
+
binaryData?: Record<string, string>;
|
|
629
|
+
labels?: Record<string, string>;
|
|
630
|
+
annotations?: Record<string, string>;
|
|
631
|
+
}
|
|
632
|
+
export interface SecretSpec {
|
|
633
|
+
name: string;
|
|
634
|
+
type?: string;
|
|
635
|
+
data?: Record<string, string>;
|
|
636
|
+
stringData?: Record<string, string>;
|
|
637
|
+
labels?: Record<string, string>;
|
|
638
|
+
annotations?: Record<string, string>;
|
|
639
|
+
}
|
|
640
|
+
export interface ServiceAccountSpec {
|
|
641
|
+
name: string;
|
|
642
|
+
automountServiceAccountToken?: boolean;
|
|
643
|
+
imagePullSecrets?: Array<{
|
|
644
|
+
name: string;
|
|
645
|
+
}>;
|
|
646
|
+
secrets?: Array<{
|
|
647
|
+
name: string;
|
|
648
|
+
}>;
|
|
649
|
+
labels?: Record<string, string>;
|
|
650
|
+
annotations?: Record<string, string>;
|
|
651
|
+
}
|
|
652
|
+
export interface ReplicaSetSpec {
|
|
653
|
+
name: string;
|
|
654
|
+
image: string;
|
|
655
|
+
replicas?: number;
|
|
656
|
+
containerPort?: number;
|
|
657
|
+
env?: Array<{
|
|
658
|
+
name: string;
|
|
659
|
+
value?: string;
|
|
660
|
+
valueFrom?: unknown;
|
|
661
|
+
}>;
|
|
662
|
+
resources?: {
|
|
663
|
+
requests?: {
|
|
664
|
+
cpu?: string;
|
|
665
|
+
memory?: string;
|
|
666
|
+
};
|
|
667
|
+
limits?: {
|
|
668
|
+
cpu?: string;
|
|
669
|
+
memory?: string;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
volumeMounts?: Array<{
|
|
673
|
+
name: string;
|
|
674
|
+
mountPath: string;
|
|
675
|
+
readOnly?: boolean;
|
|
676
|
+
}>;
|
|
677
|
+
volumes?: Array<unknown>;
|
|
678
|
+
serviceAccountName?: string;
|
|
679
|
+
securityContext?: unknown;
|
|
680
|
+
nodeSelector?: Record<string, string>;
|
|
681
|
+
tolerations?: Array<unknown>;
|
|
682
|
+
affinity?: unknown;
|
|
683
|
+
matchLabels?: Record<string, string>;
|
|
684
|
+
labels?: Record<string, string>;
|
|
685
|
+
annotations?: Record<string, string>;
|
|
686
|
+
}
|
|
687
|
+
export interface PodSpec {
|
|
688
|
+
name: string;
|
|
689
|
+
image: string;
|
|
690
|
+
containerPort?: number;
|
|
691
|
+
restartPolicy?: 'Always' | 'OnFailure' | 'Never';
|
|
692
|
+
env?: Array<{
|
|
693
|
+
name: string;
|
|
694
|
+
value?: string;
|
|
695
|
+
valueFrom?: unknown;
|
|
696
|
+
}>;
|
|
697
|
+
resources?: {
|
|
698
|
+
requests?: {
|
|
699
|
+
cpu?: string;
|
|
700
|
+
memory?: string;
|
|
701
|
+
};
|
|
702
|
+
limits?: {
|
|
703
|
+
cpu?: string;
|
|
704
|
+
memory?: string;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
volumeMounts?: Array<{
|
|
708
|
+
name: string;
|
|
709
|
+
mountPath: string;
|
|
710
|
+
readOnly?: boolean;
|
|
711
|
+
}>;
|
|
712
|
+
volumes?: Array<unknown>;
|
|
713
|
+
serviceAccountName?: string;
|
|
714
|
+
securityContext?: unknown;
|
|
715
|
+
nodeSelector?: Record<string, string>;
|
|
716
|
+
tolerations?: Array<unknown>;
|
|
717
|
+
affinity?: unknown;
|
|
718
|
+
initContainers?: Array<unknown>;
|
|
719
|
+
labels?: Record<string, string>;
|
|
720
|
+
annotations?: Record<string, string>;
|
|
721
|
+
}
|
|
722
|
+
export interface CronJobSpec {
|
|
723
|
+
name: string;
|
|
724
|
+
schedule: string;
|
|
725
|
+
image: string;
|
|
726
|
+
command?: string[];
|
|
727
|
+
args?: string[];
|
|
728
|
+
restartPolicy?: 'OnFailure' | 'Never';
|
|
729
|
+
concurrencyPolicy?: 'Allow' | 'Forbid' | 'Replace';
|
|
730
|
+
suspend?: boolean;
|
|
731
|
+
successfulJobsHistoryLimit?: number;
|
|
732
|
+
failedJobsHistoryLimit?: number;
|
|
733
|
+
startingDeadlineSeconds?: number;
|
|
734
|
+
backoffLimit?: number;
|
|
735
|
+
activeDeadlineSeconds?: number;
|
|
736
|
+
env?: Array<{
|
|
737
|
+
name: string;
|
|
738
|
+
value?: string;
|
|
739
|
+
valueFrom?: unknown;
|
|
740
|
+
}>;
|
|
741
|
+
resources?: {
|
|
742
|
+
requests?: {
|
|
743
|
+
cpu?: string;
|
|
744
|
+
memory?: string;
|
|
745
|
+
};
|
|
746
|
+
limits?: {
|
|
747
|
+
cpu?: string;
|
|
748
|
+
memory?: string;
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
volumeMounts?: Array<{
|
|
752
|
+
name: string;
|
|
753
|
+
mountPath: string;
|
|
754
|
+
readOnly?: boolean;
|
|
755
|
+
}>;
|
|
756
|
+
volumes?: Array<unknown>;
|
|
757
|
+
serviceAccountName?: string;
|
|
758
|
+
securityContext?: unknown;
|
|
759
|
+
nodeSelector?: Record<string, string>;
|
|
760
|
+
tolerations?: Array<unknown>;
|
|
761
|
+
affinity?: unknown;
|
|
762
|
+
matchLabels?: Record<string, string>;
|
|
763
|
+
labels?: Record<string, string>;
|
|
764
|
+
annotations?: Record<string, string>;
|
|
765
|
+
}
|
|
766
|
+
//# sourceMappingURL=coreResources.d.ts.map
|