cdk8s-plus-31 2.0.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 (114) hide show
  1. package/.backportrc.json +17 -0
  2. package/.jsii +90235 -0
  3. package/CODE_OF_CONDUCT.md +3 -0
  4. package/CONTRIBUTING.md +185 -0
  5. package/DCO +34 -0
  6. package/LICENSE +202 -0
  7. package/NOTICE +1 -0
  8. package/OWNERS.md +5 -0
  9. package/README.md +32 -0
  10. package/SECURITY.md +5 -0
  11. package/cdk8s.yaml +8 -0
  12. package/docs/java.md +23855 -0
  13. package/docs/plus/config-map.md +98 -0
  14. package/docs/plus/container.md +133 -0
  15. package/docs/plus/cronjob.md +67 -0
  16. package/docs/plus/deployment.md +232 -0
  17. package/docs/plus/horizontal-pod-autoscaler.md +226 -0
  18. package/docs/plus/ingress.md +68 -0
  19. package/docs/plus/job.md +48 -0
  20. package/docs/plus/namespace.md +58 -0
  21. package/docs/plus/network-policy.md +341 -0
  22. package/docs/plus/pod.md +455 -0
  23. package/docs/plus/pv.md +82 -0
  24. package/docs/plus/pvc.md +77 -0
  25. package/docs/plus/rbac.md +104 -0
  26. package/docs/plus/secret.md +32 -0
  27. package/docs/plus/service-account.md +35 -0
  28. package/docs/plus/service.md +41 -0
  29. package/docs/plus/volume.md +38 -0
  30. package/docs/python.md +26079 -0
  31. package/docs/typescript.md +19565 -0
  32. package/git-hooks/README.md +9 -0
  33. package/git-hooks/prepare-commit-msg +18 -0
  34. package/git-hooks/setup.sh +10 -0
  35. package/lib/_action.d.ts +21 -0
  36. package/lib/_action.js +32 -0
  37. package/lib/api-resource.d.ts +298 -0
  38. package/lib/api-resource.js +430 -0
  39. package/lib/base.d.ts +79 -0
  40. package/lib/base.js +92 -0
  41. package/lib/config-map.d.ts +126 -0
  42. package/lib/config-map.js +159 -0
  43. package/lib/container.d.ts +1057 -0
  44. package/lib/container.js +845 -0
  45. package/lib/cron-job.d.ts +138 -0
  46. package/lib/cron-job.js +103 -0
  47. package/lib/daemon-set.d.ts +45 -0
  48. package/lib/daemon-set.js +55 -0
  49. package/lib/deployment.d.ts +223 -0
  50. package/lib/deployment.js +214 -0
  51. package/lib/handler.d.ts +62 -0
  52. package/lib/handler.js +54 -0
  53. package/lib/horizontal-pod-autoscaler.d.ts +500 -0
  54. package/lib/horizontal-pod-autoscaler.js +569 -0
  55. package/lib/imports/k8s.d.ts +21534 -0
  56. package/lib/imports/k8s.js +16496 -0
  57. package/lib/index.d.ts +26 -0
  58. package/lib/index.js +39 -0
  59. package/lib/ingress.d.ts +230 -0
  60. package/lib/ingress.js +246 -0
  61. package/lib/job.d.ts +64 -0
  62. package/lib/job.js +54 -0
  63. package/lib/namespace.d.ts +128 -0
  64. package/lib/namespace.js +109 -0
  65. package/lib/network-policy.d.ts +311 -0
  66. package/lib/network-policy.js +344 -0
  67. package/lib/pod.d.ts +1080 -0
  68. package/lib/pod.js +1139 -0
  69. package/lib/probe.d.ts +141 -0
  70. package/lib/probe.js +77 -0
  71. package/lib/pv.d.ts +375 -0
  72. package/lib/pv.js +273 -0
  73. package/lib/pvc.d.ts +163 -0
  74. package/lib/pvc.js +152 -0
  75. package/lib/role-binding.d.ts +138 -0
  76. package/lib/role-binding.js +165 -0
  77. package/lib/role.d.ts +268 -0
  78. package/lib/role.js +401 -0
  79. package/lib/secret.d.ts +195 -0
  80. package/lib/secret.js +185 -0
  81. package/lib/service-account.d.ts +83 -0
  82. package/lib/service-account.js +105 -0
  83. package/lib/service.d.ts +289 -0
  84. package/lib/service.js +182 -0
  85. package/lib/stateful-set.d.ts +169 -0
  86. package/lib/stateful-set.js +174 -0
  87. package/lib/utils.d.ts +4 -0
  88. package/lib/utils.js +34 -0
  89. package/lib/volume.d.ts +573 -0
  90. package/lib/volume.js +371 -0
  91. package/lib/workload.d.ts +121 -0
  92. package/lib/workload.js +122 -0
  93. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  94. package/node_modules/balanced-match/LICENSE.md +21 -0
  95. package/node_modules/balanced-match/README.md +97 -0
  96. package/node_modules/balanced-match/index.js +62 -0
  97. package/node_modules/balanced-match/package.json +48 -0
  98. package/node_modules/concat-map/.travis.yml +4 -0
  99. package/node_modules/concat-map/LICENSE +18 -0
  100. package/node_modules/concat-map/README.markdown +62 -0
  101. package/node_modules/concat-map/example/map.js +6 -0
  102. package/node_modules/concat-map/index.js +13 -0
  103. package/node_modules/concat-map/package.json +43 -0
  104. package/node_modules/concat-map/test/map.js +39 -0
  105. package/node_modules/minimatch/LICENSE +15 -0
  106. package/node_modules/minimatch/README.md +230 -0
  107. package/node_modules/minimatch/minimatch.js +947 -0
  108. package/node_modules/minimatch/node_modules/brace-expansion/LICENSE +21 -0
  109. package/node_modules/minimatch/node_modules/brace-expansion/README.md +129 -0
  110. package/node_modules/minimatch/node_modules/brace-expansion/index.js +201 -0
  111. package/node_modules/minimatch/node_modules/brace-expansion/package.json +47 -0
  112. package/node_modules/minimatch/package.json +33 -0
  113. package/package.json +186 -0
  114. package/rotate.md +84 -0
@@ -0,0 +1,573 @@
1
+ import { Size } from 'cdk8s';
2
+ import { IConstruct, Construct } from 'constructs';
3
+ import * as configmap from './config-map';
4
+ import * as k8s from './imports/k8s';
5
+ import * as pvc from './pvc';
6
+ import * as secret from './secret';
7
+ /**
8
+ * Represents a piece of storage in the cluster.
9
+ */
10
+ export interface IStorage extends IConstruct {
11
+ /**
12
+ * Convert the piece of storage into a concrete volume.
13
+ */
14
+ asVolume(): Volume;
15
+ }
16
+ /**
17
+ * Volume represents a named volume in a pod that may be accessed by any
18
+ * container in the pod.
19
+ *
20
+ * Docker also has a concept of volumes, though it is somewhat looser and less
21
+ * managed. In Docker, a volume is simply a directory on disk or in another
22
+ * Container. Lifetimes are not managed and until very recently there were only
23
+ * local-disk-backed volumes. Docker now provides volume drivers, but the
24
+ * functionality is very limited for now (e.g. as of Docker 1.7 only one volume
25
+ * driver is allowed per Container and there is no way to pass parameters to
26
+ * volumes).
27
+ *
28
+ * A Kubernetes volume, on the other hand, has an explicit lifetime - the same
29
+ * as the Pod that encloses it. Consequently, a volume outlives any Containers
30
+ * that run within the Pod, and data is preserved across Container restarts. Of
31
+ * course, when a Pod ceases to exist, the volume will cease to exist, too.
32
+ * Perhaps more importantly than this, Kubernetes supports many types of
33
+ * volumes, and a Pod can use any number of them simultaneously.
34
+ *
35
+ * At its core, a volume is just a directory, possibly with some data in it,
36
+ * which is accessible to the Containers in a Pod. How that directory comes to
37
+ * be, the medium that backs it, and the contents of it are determined by the
38
+ * particular volume type used.
39
+ *
40
+ * To use a volume, a Pod specifies what volumes to provide for the Pod (the
41
+ * .spec.volumes field) and where to mount those into Containers (the
42
+ * .spec.containers[*].volumeMounts field).
43
+ *
44
+ * A process in a container sees a filesystem view composed from their Docker
45
+ * image and volumes. The Docker image is at the root of the filesystem
46
+ * hierarchy, and any volumes are mounted at the specified paths within the
47
+ * image. Volumes can not mount onto other volumes
48
+ */
49
+ export declare class Volume extends Construct implements IStorage {
50
+ readonly name: string;
51
+ private readonly config;
52
+ /**
53
+ * Mounts an Amazon Web Services (AWS) EBS volume into your pod.
54
+ * Unlike emptyDir, which is erased when a pod is removed, the contents of an EBS volume are
55
+ * persisted and the volume is unmounted. This means that an EBS volume can be pre-populated with data,
56
+ * and that data can be shared between pods.
57
+ *
58
+ * There are some restrictions when using an awsElasticBlockStore volume:
59
+ *
60
+ * - the nodes on which pods are running must be AWS EC2 instances.
61
+ * - those instances need to be in the same region and availability zone as the EBS volume.
62
+ * - EBS only supports a single EC2 instance mounting a volume.
63
+ */
64
+ static fromAwsElasticBlockStore(scope: Construct, id: string, volumeId: string, options?: AwsElasticBlockStoreVolumeOptions): Volume;
65
+ /**
66
+ * Mounts a Microsoft Azure Data Disk into a pod.
67
+ */
68
+ static fromAzureDisk(scope: Construct, id: string, diskName: string, diskUri: string, options?: AzureDiskVolumeOptions): Volume;
69
+ /**
70
+ * Mounts a Google Compute Engine (GCE) persistent disk (PD) into your Pod.
71
+ * Unlike emptyDir, which is erased when a pod is removed, the contents of a PD are
72
+ * preserved and the volume is merely unmounted. This means that a PD can be pre-populated
73
+ * with data, and that data can be shared between pods.
74
+ *
75
+ * There are some restrictions when using a gcePersistentDisk:
76
+ *
77
+ * - the nodes on which Pods are running must be GCE VMs
78
+ * - those VMs need to be in the same GCE project and zone as the persistent disk
79
+ */
80
+ static fromGcePersistentDisk(scope: Construct, id: string, pdName: string, options?: GCEPersistentDiskVolumeOptions): Volume;
81
+ /**
82
+ * Populate the volume from a ConfigMap.
83
+ *
84
+ * The configMap resource provides a way to inject configuration data into
85
+ * Pods. The data stored in a ConfigMap object can be referenced in a volume
86
+ * of type configMap and then consumed by containerized applications running
87
+ * in a Pod.
88
+ *
89
+ * When referencing a configMap object, you can simply provide its name in the
90
+ * volume to reference it. You can also customize the path to use for a
91
+ * specific entry in the ConfigMap.
92
+ *
93
+ * @param configMap The config map to use to populate the volume.
94
+ * @param options Options
95
+ */
96
+ static fromConfigMap(scope: Construct, id: string, configMap: configmap.IConfigMap, options?: ConfigMapVolumeOptions): Volume;
97
+ /**
98
+ * An emptyDir volume is first created when a Pod is assigned to a Node, and
99
+ * exists as long as that Pod is running on that node. As the name says, it is
100
+ * initially empty. Containers in the Pod can all read and write the same
101
+ * files in the emptyDir volume, though that volume can be mounted at the same
102
+ * or different paths in each Container. When a Pod is removed from a node for
103
+ * any reason, the data in the emptyDir is deleted forever.
104
+ *
105
+ * @see http://kubernetes.io/docs/user-guide/volumes#emptydir
106
+ *
107
+ * @param options - Additional options.
108
+ */
109
+ static fromEmptyDir(scope: Construct, id: string, name: string, options?: EmptyDirVolumeOptions): Volume;
110
+ /**
111
+ * Populate the volume from a Secret.
112
+ *
113
+ * A secret volume is used to pass sensitive information, such as passwords, to Pods.
114
+ * You can store secrets in the Kubernetes API and mount them as files for use by pods
115
+ * without coupling to Kubernetes directly.
116
+ *
117
+ * secret volumes are backed by tmpfs (a RAM-backed filesystem)
118
+ * so they are never written to non-volatile storage.
119
+ *
120
+ * @see https://kubernetes.io/docs/concepts/storage/volumes/#secret
121
+ *
122
+ * @param secr The secret to use to populate the volume.
123
+ * @param options Options
124
+ */
125
+ static fromSecret(scope: Construct, id: string, secr: secret.ISecret, options?: SecretVolumeOptions): Volume;
126
+ /**
127
+ * Used to mount a PersistentVolume into a Pod.
128
+ * PersistentVolumeClaims are a way for users to "claim" durable storage (such as a GCE PersistentDisk or an iSCSI volume)
129
+ * without knowing the details of the particular cloud environment.
130
+ *
131
+ * @see https://kubernetes.io/docs/concepts/storage/persistent-volumes/
132
+ */
133
+ static fromPersistentVolumeClaim(scope: Construct, id: string, claim: pvc.IPersistentVolumeClaim, options?: PersistentVolumeClaimVolumeOptions): Volume;
134
+ /**
135
+ * Used to mount a file or directory from the host node's filesystem into a Pod.
136
+ * This is not something that most Pods will need, but it offers a powerful
137
+ * escape hatch for some applications.
138
+ *
139
+ * @see https://kubernetes.io/docs/concepts/storage/volumes/#hostpath
140
+ */
141
+ static fromHostPath(scope: Construct, id: string, name: string, options: HostPathVolumeOptions): Volume;
142
+ /**
143
+ * Used to mount an NFS share into a Pod.
144
+ *
145
+ * @see https://kubernetes.io/docs/concepts/storage/volumes/#nfs
146
+ */
147
+ static fromNfs(scope: Construct, id: string, name: string, options: NfsVolumeOptions): Volume;
148
+ /**
149
+ * Populate the volume from a CSI driver, for example the Secrets Store CSI
150
+ * Driver: https://secrets-store-csi-driver.sigs.k8s.io/introduction.html.
151
+ * Which in turn needs an associated provider to source the secrets, such as
152
+ * the AWS Secrets Manager and Systems Manager Parameter Store provider:
153
+ * https://aws.github.io/secrets-store-csi-driver-provider-aws/.
154
+ *
155
+ * @param driver The name of the CSI driver to use to populate the volume.
156
+ * @param options Options for the CSI volume, including driver-specific ones.
157
+ */
158
+ static fromCsi(scope: Construct, id: string, driver: string, options?: CsiVolumeOptions): Volume;
159
+ /**
160
+ * @internal
161
+ */
162
+ private static renderItems;
163
+ private constructor();
164
+ asVolume(): Volume;
165
+ /**
166
+ * @internal
167
+ */
168
+ _toKube(): k8s.Volume;
169
+ }
170
+ /**
171
+ * Options of `Volume.fromGcePersistentDisk`.
172
+ */
173
+ export interface GCEPersistentDiskVolumeOptions {
174
+ /**
175
+ * The volume name.
176
+ *
177
+ * @default - auto-generated
178
+ */
179
+ readonly name?: string;
180
+ /**
181
+ * Filesystem type of the volume that you want to mount.
182
+ * Tip: Ensure that the filesystem type is supported by the host operating system.
183
+ *
184
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
185
+ * @default 'ext4'
186
+ */
187
+ readonly fsType?: string;
188
+ /**
189
+ * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name.
190
+ * Examples: For volume /dev/sda1, you specify the partition as "1".
191
+ * Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
192
+ *
193
+ * @default - No partition.
194
+ */
195
+ readonly partition?: number;
196
+ /**
197
+ * Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
198
+ *
199
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
200
+ * @default false
201
+ */
202
+ readonly readOnly?: boolean;
203
+ }
204
+ /**
205
+ * Options of `Volume.fromAzureDisk`.
206
+ */
207
+ export interface AzureDiskVolumeOptions {
208
+ /**
209
+ * The volume name.
210
+ *
211
+ * @default - auto-generated
212
+ */
213
+ readonly name?: string;
214
+ /**
215
+ * Host Caching mode.
216
+ *
217
+ * @default - AzureDiskPersistentVolumeCachingMode.NONE.
218
+ */
219
+ readonly cachingMode?: AzureDiskPersistentVolumeCachingMode;
220
+ /**
221
+ * Filesystem type to mount. Must be a filesystem type supported by the host operating system.
222
+ *
223
+ * @default 'ext4'
224
+ */
225
+ readonly fsType?: string;
226
+ /**
227
+ * Kind of disk.
228
+ *
229
+ * @default AzureDiskPersistentVolumeKind.SHARED
230
+ */
231
+ readonly kind?: AzureDiskPersistentVolumeKind;
232
+ /**
233
+ * Force the ReadOnly setting in VolumeMounts.
234
+ *
235
+ * @default false
236
+ */
237
+ readonly readOnly?: boolean;
238
+ }
239
+ /**
240
+ * Options of `Volume.fromAwsElasticBlockStore`.
241
+ */
242
+ export interface AwsElasticBlockStoreVolumeOptions {
243
+ /**
244
+ * The volume name.
245
+ *
246
+ * @default - auto-generated
247
+ */
248
+ readonly name?: string;
249
+ /**
250
+ * Filesystem type of the volume that you want to mount.
251
+ * Tip: Ensure that the filesystem type is supported by the host operating system.
252
+ *
253
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
254
+ * @default 'ext4'
255
+ */
256
+ readonly fsType?: string;
257
+ /**
258
+ * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name.
259
+ * Examples: For volume /dev/sda1, you specify the partition as "1".
260
+ * Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
261
+ *
262
+ * @default - No partition.
263
+ */
264
+ readonly partition?: number;
265
+ /**
266
+ * Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
267
+ *
268
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
269
+ * @default false
270
+ */
271
+ readonly readOnly?: boolean;
272
+ }
273
+ /**
274
+ * Options for the ConfigMap-based volume.
275
+ */
276
+ export interface ConfigMapVolumeOptions {
277
+ /**
278
+ * The volume name.
279
+ *
280
+ * @default - auto-generated
281
+ */
282
+ readonly name?: string;
283
+ /**
284
+ * Mode bits to use on created files by default. Must be a value between 0 and
285
+ * 0777. Defaults to 0644. Directories within the path are not affected by
286
+ * this setting. This might be in conflict with other options that affect the
287
+ * file mode, like fsGroup, and the result can be other mode bits set.
288
+ *
289
+ * @default 0644. Directories within the path are not affected by this
290
+ * setting. This might be in conflict with other options that affect the file
291
+ * mode, like fsGroup, and the result can be other mode bits set.
292
+ */
293
+ readonly defaultMode?: number;
294
+ /**
295
+ * Specify whether the ConfigMap or its keys must be defined.
296
+ * @default - undocumented
297
+ */
298
+ readonly optional?: boolean;
299
+ /**
300
+ * If unspecified, each key-value pair in the Data field of the referenced
301
+ * ConfigMap will be projected into the volume as a file whose name is the key
302
+ * and content is the value. If specified, the listed keys will be projected
303
+ * into the specified paths, and unlisted keys will not be present. If a key
304
+ * is specified which is not present in the ConfigMap, the volume setup will
305
+ * error unless it is marked optional. Paths must be relative and may not
306
+ * contain the '..' path or start with '..'.
307
+ *
308
+ * @default - no mapping
309
+ */
310
+ readonly items?: {
311
+ [key: string]: PathMapping;
312
+ };
313
+ }
314
+ /**
315
+ * Maps a string key to a path within a volume.
316
+ */
317
+ export interface PathMapping {
318
+ /**
319
+ * The relative path of the file to map the key to. May not be an absolute
320
+ * path. May not contain the path element '..'. May not start with the string
321
+ * '..'.
322
+ */
323
+ readonly path: string;
324
+ /**
325
+ * Optional: mode bits to use on this file, must be a value between 0 and
326
+ * 0777. If not specified, the volume defaultMode will be used. This might be
327
+ * in conflict with other options that affect the file mode, like fsGroup, and
328
+ * the result can be other mode bits set.
329
+ */
330
+ readonly mode?: number;
331
+ }
332
+ /**
333
+ * Options for volumes populated with an empty directory.
334
+ */
335
+ export interface EmptyDirVolumeOptions {
336
+ /**
337
+ * By default, emptyDir volumes are stored on whatever medium is backing the
338
+ * node - that might be disk or SSD or network storage, depending on your
339
+ * environment. However, you can set the emptyDir.medium field to
340
+ * `EmptyDirMedium.MEMORY` to tell Kubernetes to mount a tmpfs (RAM-backed
341
+ * filesystem) for you instead. While tmpfs is very fast, be aware that unlike
342
+ * disks, tmpfs is cleared on node reboot and any files you write will count
343
+ * against your Container's memory limit.
344
+ *
345
+ * @default EmptyDirMedium.DEFAULT
346
+ */
347
+ readonly medium?: EmptyDirMedium;
348
+ /**
349
+ * Total amount of local storage required for this EmptyDir volume. The size
350
+ * limit is also applicable for memory medium. The maximum usage on memory
351
+ * medium EmptyDir would be the minimum value between the SizeLimit specified
352
+ * here and the sum of memory limits of all containers in a pod.
353
+ *
354
+ * @default - limit is undefined
355
+ */
356
+ readonly sizeLimit?: Size;
357
+ }
358
+ /**
359
+ * The medium on which to store the volume.
360
+ */
361
+ export declare enum EmptyDirMedium {
362
+ /**
363
+ * The default volume of the backing node.
364
+ */
365
+ DEFAULT = "",
366
+ /**
367
+ * Mount a tmpfs (RAM-backed filesystem) for you instead. While tmpfs is very
368
+ * fast, be aware that unlike disks, tmpfs is cleared on node reboot and any
369
+ * files you write will count against your Container's memory limit.
370
+ */
371
+ MEMORY = "Memory"
372
+ }
373
+ /**
374
+ * Options for a PersistentVolumeClaim-based volume.
375
+ */
376
+ export interface PersistentVolumeClaimVolumeOptions {
377
+ /**
378
+ * The volume name.
379
+ *
380
+ * @default - Derived from the PVC name.
381
+ */
382
+ readonly name?: string;
383
+ /**
384
+ * Will force the ReadOnly setting in VolumeMounts.
385
+ *
386
+ * @default false
387
+ */
388
+ readonly readOnly?: boolean;
389
+ }
390
+ /**
391
+ * Options for the Secret-based volume.
392
+ */
393
+ export interface SecretVolumeOptions {
394
+ /**
395
+ * The volume name.
396
+ *
397
+ * @default - auto-generated
398
+ */
399
+ readonly name?: string;
400
+ /**
401
+ * Mode bits to use on created files by default. Must be a value between 0 and
402
+ * 0777. Defaults to 0644. Directories within the path are not affected by
403
+ * this setting. This might be in conflict with other options that affect the
404
+ * file mode, like fsGroup, and the result can be other mode bits set.
405
+ *
406
+ * @default 0644. Directories within the path are not affected by this
407
+ * setting. This might be in conflict with other options that affect the file
408
+ * mode, like fsGroup, and the result can be other mode bits set.
409
+ */
410
+ readonly defaultMode?: number;
411
+ /**
412
+ * Specify whether the secret or its keys must be defined.
413
+ * @default - undocumented
414
+ */
415
+ readonly optional?: boolean;
416
+ /**
417
+ * If unspecified, each key-value pair in the Data field of the referenced
418
+ * secret will be projected into the volume as a file whose name is the key
419
+ * and content is the value. If specified, the listed keys will be projected
420
+ * into the specified paths, and unlisted keys will not be present. If a key
421
+ * is specified which is not present in the secret, the volume setup will
422
+ * error unless it is marked optional. Paths must be relative and may not
423
+ * contain the '..' path or start with '..'.
424
+ *
425
+ * @default - no mapping
426
+ */
427
+ readonly items?: {
428
+ [key: string]: PathMapping;
429
+ };
430
+ }
431
+ /**
432
+ * Azure Disk kinds.
433
+ */
434
+ export declare enum AzureDiskPersistentVolumeKind {
435
+ /**
436
+ * Multiple blob disks per storage account.
437
+ */
438
+ SHARED = "Shared",
439
+ /**
440
+ * Single blob disk per storage account.
441
+ */
442
+ DEDICATED = "Dedicated",
443
+ /**
444
+ * Azure managed data disk.
445
+ */
446
+ MANAGED = "Managed"
447
+ }
448
+ /**
449
+ * Azure disk caching modes.
450
+ */
451
+ export declare enum AzureDiskPersistentVolumeCachingMode {
452
+ /**
453
+ * None.
454
+ */
455
+ NONE = "None",
456
+ /**
457
+ * ReadOnly.
458
+ */
459
+ READ_ONLY = "ReadOnly",
460
+ /**
461
+ * ReadWrite.
462
+ */
463
+ READ_WRITE = "ReadWrite"
464
+ }
465
+ /**
466
+ * Options for a HostPathVolume-based volume.
467
+ */
468
+ export interface HostPathVolumeOptions {
469
+ /**
470
+ * The path of the directory on the host.
471
+ */
472
+ readonly path: string;
473
+ /**
474
+ * The expected type of the path found on the host.
475
+ *
476
+ * @default HostPathVolumeType.DEFAULT
477
+ */
478
+ readonly type?: HostPathVolumeType;
479
+ }
480
+ /**
481
+ * Host path types.
482
+ */
483
+ export declare enum HostPathVolumeType {
484
+ /**
485
+ * Empty string (default) is for backward compatibility, which means that no
486
+ * checks will be performed before mounting the hostPath volume.
487
+ */
488
+ DEFAULT = "",
489
+ /**
490
+ * If nothing exists at the given path, an empty directory will be created
491
+ * there as needed with permission set to 0755, having the same group and
492
+ * ownership with Kubelet.
493
+ */
494
+ DIRECTORY_OR_CREATE = "DirectoryOrCreate",
495
+ /**
496
+ * A directory must exist at the given path.
497
+ */
498
+ DIRECTORY = "Directory",
499
+ /**
500
+ * If nothing exists at the given path, an empty file will be created there
501
+ * as needed with permission set to 0644, having the same group and ownership
502
+ * with Kubelet.
503
+ */
504
+ FILE_OR_CREATE = "FileOrCreate",
505
+ /**
506
+ * A file must exist at the given path.
507
+ */
508
+ FILE = "File",
509
+ /**
510
+ * A UNIX socket must exist at the given path.
511
+ */
512
+ SOCKET = "Socket",
513
+ /**
514
+ * A character device must exist at the given path.
515
+ */
516
+ CHAR_DEVICE = "CharDevice",
517
+ /**
518
+ * A block device must exist at the given path.
519
+ */
520
+ BLOCK_DEVICE = "BlockDevice"
521
+ }
522
+ /**
523
+ * Options for the NFS based volume.
524
+ */
525
+ export interface NfsVolumeOptions {
526
+ /**
527
+ * Server is the hostname or IP address of the NFS server.
528
+ */
529
+ readonly server: string;
530
+ /**
531
+ * If set to true, will force the NFS export to be mounted with read-only permissions.
532
+ *
533
+ * @default - false
534
+ */
535
+ readonly readOnly?: boolean;
536
+ /**
537
+ * Path that is exported by the NFS server
538
+ */
539
+ readonly path: string;
540
+ }
541
+ /**
542
+ * Options for the CSI driver based volume.
543
+ */
544
+ export interface CsiVolumeOptions {
545
+ /**
546
+ * The volume name.
547
+ *
548
+ * @default - auto-generated
549
+ */
550
+ readonly name?: string;
551
+ /**
552
+ * The filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided,
553
+ * the empty value is passed to the associated CSI driver, which will
554
+ * determine the default filesystem to apply.
555
+ *
556
+ * @default - driver-dependent
557
+ */
558
+ readonly fsType?: string;
559
+ /**
560
+ * Whether the mounted volume should be read-only or not.
561
+ *
562
+ * @default - false
563
+ */
564
+ readonly readOnly?: boolean;
565
+ /**
566
+ * Any driver-specific attributes to pass to the CSI volume builder.
567
+ *
568
+ * @default - undefined
569
+ */
570
+ readonly attributes?: {
571
+ [key: string]: string;
572
+ };
573
+ }