cdk8s-plus-34 0.0.1 → 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 (156) hide show
  1. package/.jsii +101649 -0
  2. package/CODE_OF_CONDUCT.md +3 -0
  3. package/CONTRIBUTING.md +185 -0
  4. package/DCO +34 -0
  5. package/LICENSE +202 -0
  6. package/NOTICE +1 -0
  7. package/OWNERS.md +5 -0
  8. package/README.md +21 -33
  9. package/SECURITY.md +5 -0
  10. package/cdk8s.yaml +11 -0
  11. package/docs/java.md +150009 -0
  12. package/docs/plus/config-map.md +98 -0
  13. package/docs/plus/container.md +133 -0
  14. package/docs/plus/cronjob.md +67 -0
  15. package/docs/plus/deployment.md +232 -0
  16. package/docs/plus/horizontal-pod-autoscaler.md +226 -0
  17. package/docs/plus/ingress.md +68 -0
  18. package/docs/plus/job.md +48 -0
  19. package/docs/plus/namespace.md +58 -0
  20. package/docs/plus/network-policy.md +341 -0
  21. package/docs/plus/pod.md +455 -0
  22. package/docs/plus/pv.md +82 -0
  23. package/docs/plus/pvc.md +77 -0
  24. package/docs/plus/rbac.md +104 -0
  25. package/docs/plus/secret.md +32 -0
  26. package/docs/plus/service-account.md +35 -0
  27. package/docs/plus/service.md +41 -0
  28. package/docs/plus/volume.md +84 -0
  29. package/docs/python.md +161196 -0
  30. package/docs/typescript.md +139649 -0
  31. package/git-hooks/README.md +9 -0
  32. package/git-hooks/prepare-commit-msg +18 -0
  33. package/git-hooks/setup.sh +10 -0
  34. package/lib/_action.d.ts +26 -0
  35. package/lib/_action.js +39 -0
  36. package/lib/api-resource.d.ts +298 -0
  37. package/lib/api-resource.js +430 -0
  38. package/lib/base.d.ts +79 -0
  39. package/lib/base.js +92 -0
  40. package/lib/config-map.d.ts +126 -0
  41. package/lib/config-map.js +159 -0
  42. package/lib/container.d.ts +1057 -0
  43. package/lib/container.js +845 -0
  44. package/lib/cron-job.d.ts +138 -0
  45. package/lib/cron-job.js +103 -0
  46. package/lib/daemon-set.d.ts +45 -0
  47. package/lib/daemon-set.js +55 -0
  48. package/lib/deployment.d.ts +235 -0
  49. package/lib/deployment.js +216 -0
  50. package/lib/handler.d.ts +62 -0
  51. package/lib/handler.js +54 -0
  52. package/lib/horizontal-pod-autoscaler.d.ts +500 -0
  53. package/lib/horizontal-pod-autoscaler.js +569 -0
  54. package/lib/imports/k8s.d.ts +25809 -0
  55. package/lib/imports/k8s.js +19238 -0
  56. package/lib/index.d.ts +26 -0
  57. package/lib/index.js +44 -0
  58. package/lib/ingress.d.ts +230 -0
  59. package/lib/ingress.js +246 -0
  60. package/lib/job.d.ts +64 -0
  61. package/lib/job.js +54 -0
  62. package/lib/namespace.d.ts +128 -0
  63. package/lib/namespace.js +109 -0
  64. package/lib/network-policy.d.ts +311 -0
  65. package/lib/network-policy.js +344 -0
  66. package/lib/pod.d.ts +1097 -0
  67. package/lib/pod.js +1147 -0
  68. package/lib/probe.d.ts +181 -0
  69. package/lib/probe.js +88 -0
  70. package/lib/pv.d.ts +375 -0
  71. package/lib/pv.js +273 -0
  72. package/lib/pvc.d.ts +163 -0
  73. package/lib/pvc.js +154 -0
  74. package/lib/role-binding.d.ts +138 -0
  75. package/lib/role-binding.js +165 -0
  76. package/lib/role.d.ts +268 -0
  77. package/lib/role.js +401 -0
  78. package/lib/secret.d.ts +195 -0
  79. package/lib/secret.js +185 -0
  80. package/lib/service-account.d.ts +83 -0
  81. package/lib/service-account.js +105 -0
  82. package/lib/service.d.ts +289 -0
  83. package/lib/service.js +182 -0
  84. package/lib/stateful-set.d.ts +206 -0
  85. package/lib/stateful-set.js +244 -0
  86. package/lib/utils.d.ts +4 -0
  87. package/lib/utils.js +33 -0
  88. package/lib/volume.d.ts +577 -0
  89. package/lib/volume.js +377 -0
  90. package/lib/workload.d.ts +121 -0
  91. package/lib/workload.js +122 -0
  92. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  93. package/node_modules/balanced-match/LICENSE.md +21 -0
  94. package/node_modules/balanced-match/README.md +97 -0
  95. package/node_modules/balanced-match/index.js +62 -0
  96. package/node_modules/balanced-match/package.json +48 -0
  97. package/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
  98. package/node_modules/brace-expansion/LICENSE +21 -0
  99. package/node_modules/brace-expansion/README.md +135 -0
  100. package/node_modules/brace-expansion/index.js +202 -0
  101. package/node_modules/brace-expansion/package.json +49 -0
  102. package/node_modules/minimatch/LICENSE +15 -0
  103. package/node_modules/minimatch/README.md +491 -0
  104. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  105. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  106. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  107. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  108. package/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
  109. package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  110. package/node_modules/minimatch/dist/commonjs/ast.js +747 -0
  111. package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  112. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  113. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  114. package/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  115. package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  116. package/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
  117. package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  118. package/node_modules/minimatch/dist/commonjs/escape.js +22 -0
  119. package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  120. package/node_modules/minimatch/dist/commonjs/index.d.ts +98 -0
  121. package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  122. package/node_modules/minimatch/dist/commonjs/index.js +1023 -0
  123. package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  124. package/node_modules/minimatch/dist/commonjs/package.json +3 -0
  125. package/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
  126. package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  127. package/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
  128. package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  129. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  130. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  131. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  132. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  133. package/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
  134. package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  135. package/node_modules/minimatch/dist/esm/ast.js +743 -0
  136. package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  137. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  138. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  139. package/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  140. package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  141. package/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
  142. package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  143. package/node_modules/minimatch/dist/esm/escape.js +18 -0
  144. package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  145. package/node_modules/minimatch/dist/esm/index.d.ts +98 -0
  146. package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  147. package/node_modules/minimatch/dist/esm/index.js +1007 -0
  148. package/node_modules/minimatch/dist/esm/index.js.map +1 -0
  149. package/node_modules/minimatch/dist/esm/package.json +3 -0
  150. package/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
  151. package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  152. package/node_modules/minimatch/dist/esm/unescape.js +20 -0
  153. package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  154. package/node_modules/minimatch/package.json +82 -0
  155. package/package.json +176 -6
  156. package/rotate.md +85 -0
@@ -0,0 +1,577 @@
1
+ import { Size } from 'cdk8s';
2
+ import { Construct, IConstruct } 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
+ * Create a volume with an arbitrary name and no configuration.
161
+ */
162
+ static fromName(scope: Construct, id: string, name: string): Volume;
163
+ /**
164
+ * @internal
165
+ */
166
+ private static renderItems;
167
+ private constructor();
168
+ asVolume(): Volume;
169
+ /**
170
+ * @internal
171
+ */
172
+ _toKube(): k8s.Volume;
173
+ }
174
+ /**
175
+ * Options of `Volume.fromGcePersistentDisk`.
176
+ */
177
+ export interface GCEPersistentDiskVolumeOptions {
178
+ /**
179
+ * The volume name.
180
+ *
181
+ * @default - auto-generated
182
+ */
183
+ readonly name?: string;
184
+ /**
185
+ * Filesystem type of the volume that you want to mount.
186
+ * Tip: Ensure that the filesystem type is supported by the host operating system.
187
+ *
188
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
189
+ * @default 'ext4'
190
+ */
191
+ readonly fsType?: string;
192
+ /**
193
+ * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name.
194
+ * Examples: For volume /dev/sda1, you specify the partition as "1".
195
+ * Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
196
+ *
197
+ * @default - No partition.
198
+ */
199
+ readonly partition?: number;
200
+ /**
201
+ * Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
202
+ *
203
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
204
+ * @default false
205
+ */
206
+ readonly readOnly?: boolean;
207
+ }
208
+ /**
209
+ * Options of `Volume.fromAzureDisk`.
210
+ */
211
+ export interface AzureDiskVolumeOptions {
212
+ /**
213
+ * The volume name.
214
+ *
215
+ * @default - auto-generated
216
+ */
217
+ readonly name?: string;
218
+ /**
219
+ * Host Caching mode.
220
+ *
221
+ * @default - AzureDiskPersistentVolumeCachingMode.NONE.
222
+ */
223
+ readonly cachingMode?: AzureDiskPersistentVolumeCachingMode;
224
+ /**
225
+ * Filesystem type to mount. Must be a filesystem type supported by the host operating system.
226
+ *
227
+ * @default 'ext4'
228
+ */
229
+ readonly fsType?: string;
230
+ /**
231
+ * Kind of disk.
232
+ *
233
+ * @default AzureDiskPersistentVolumeKind.SHARED
234
+ */
235
+ readonly kind?: AzureDiskPersistentVolumeKind;
236
+ /**
237
+ * Force the ReadOnly setting in VolumeMounts.
238
+ *
239
+ * @default false
240
+ */
241
+ readonly readOnly?: boolean;
242
+ }
243
+ /**
244
+ * Options of `Volume.fromAwsElasticBlockStore`.
245
+ */
246
+ export interface AwsElasticBlockStoreVolumeOptions {
247
+ /**
248
+ * The volume name.
249
+ *
250
+ * @default - auto-generated
251
+ */
252
+ readonly name?: string;
253
+ /**
254
+ * Filesystem type of the volume that you want to mount.
255
+ * Tip: Ensure that the filesystem type is supported by the host operating system.
256
+ *
257
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
258
+ * @default 'ext4'
259
+ */
260
+ readonly fsType?: string;
261
+ /**
262
+ * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name.
263
+ * Examples: For volume /dev/sda1, you specify the partition as "1".
264
+ * Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
265
+ *
266
+ * @default - No partition.
267
+ */
268
+ readonly partition?: number;
269
+ /**
270
+ * Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
271
+ *
272
+ * @see https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
273
+ * @default false
274
+ */
275
+ readonly readOnly?: boolean;
276
+ }
277
+ /**
278
+ * Options for the ConfigMap-based volume.
279
+ */
280
+ export interface ConfigMapVolumeOptions {
281
+ /**
282
+ * The volume name.
283
+ *
284
+ * @default - auto-generated
285
+ */
286
+ readonly name?: string;
287
+ /**
288
+ * Mode bits to use on created files by default. Must be a value between 0 and
289
+ * 0777. Defaults to 0644. Directories within the path are not affected by
290
+ * this setting. This might be in conflict with other options that affect the
291
+ * file mode, like fsGroup, and the result can be other mode bits set.
292
+ *
293
+ * @default 0644. Directories within the path are not affected by this
294
+ * setting. This might be in conflict with other options that affect the file
295
+ * mode, like fsGroup, and the result can be other mode bits set.
296
+ */
297
+ readonly defaultMode?: number;
298
+ /**
299
+ * Specify whether the ConfigMap or its keys must be defined.
300
+ * @default - undocumented
301
+ */
302
+ readonly optional?: boolean;
303
+ /**
304
+ * If unspecified, each key-value pair in the Data field of the referenced
305
+ * ConfigMap will be projected into the volume as a file whose name is the key
306
+ * and content is the value. If specified, the listed keys will be projected
307
+ * into the specified paths, and unlisted keys will not be present. If a key
308
+ * is specified which is not present in the ConfigMap, the volume setup will
309
+ * error unless it is marked optional. Paths must be relative and may not
310
+ * contain the '..' path or start with '..'.
311
+ *
312
+ * @default - no mapping
313
+ */
314
+ readonly items?: {
315
+ [key: string]: PathMapping;
316
+ };
317
+ }
318
+ /**
319
+ * Maps a string key to a path within a volume.
320
+ */
321
+ export interface PathMapping {
322
+ /**
323
+ * The relative path of the file to map the key to. May not be an absolute
324
+ * path. May not contain the path element '..'. May not start with the string
325
+ * '..'.
326
+ */
327
+ readonly path: string;
328
+ /**
329
+ * Optional: mode bits to use on this file, must be a value between 0 and
330
+ * 0777. If not specified, the volume defaultMode will be used. This might be
331
+ * in conflict with other options that affect the file mode, like fsGroup, and
332
+ * the result can be other mode bits set.
333
+ */
334
+ readonly mode?: number;
335
+ }
336
+ /**
337
+ * Options for volumes populated with an empty directory.
338
+ */
339
+ export interface EmptyDirVolumeOptions {
340
+ /**
341
+ * By default, emptyDir volumes are stored on whatever medium is backing the
342
+ * node - that might be disk or SSD or network storage, depending on your
343
+ * environment. However, you can set the emptyDir.medium field to
344
+ * `EmptyDirMedium.MEMORY` to tell Kubernetes to mount a tmpfs (RAM-backed
345
+ * filesystem) for you instead. While tmpfs is very fast, be aware that unlike
346
+ * disks, tmpfs is cleared on node reboot and any files you write will count
347
+ * against your Container's memory limit.
348
+ *
349
+ * @default EmptyDirMedium.DEFAULT
350
+ */
351
+ readonly medium?: EmptyDirMedium;
352
+ /**
353
+ * Total amount of local storage required for this EmptyDir volume. The size
354
+ * limit is also applicable for memory medium. The maximum usage on memory
355
+ * medium EmptyDir would be the minimum value between the SizeLimit specified
356
+ * here and the sum of memory limits of all containers in a pod.
357
+ *
358
+ * @default - limit is undefined
359
+ */
360
+ readonly sizeLimit?: Size;
361
+ }
362
+ /**
363
+ * The medium on which to store the volume.
364
+ */
365
+ export declare enum EmptyDirMedium {
366
+ /**
367
+ * The default volume of the backing node.
368
+ */
369
+ DEFAULT = "",
370
+ /**
371
+ * Mount a tmpfs (RAM-backed filesystem) for you instead. While tmpfs is very
372
+ * fast, be aware that unlike disks, tmpfs is cleared on node reboot and any
373
+ * files you write will count against your Container's memory limit.
374
+ */
375
+ MEMORY = "Memory"
376
+ }
377
+ /**
378
+ * Options for a PersistentVolumeClaim-based volume.
379
+ */
380
+ export interface PersistentVolumeClaimVolumeOptions {
381
+ /**
382
+ * The volume name.
383
+ *
384
+ * @default - Derived from the PVC name.
385
+ */
386
+ readonly name?: string;
387
+ /**
388
+ * Will force the ReadOnly setting in VolumeMounts.
389
+ *
390
+ * @default false
391
+ */
392
+ readonly readOnly?: boolean;
393
+ }
394
+ /**
395
+ * Options for the Secret-based volume.
396
+ */
397
+ export interface SecretVolumeOptions {
398
+ /**
399
+ * The volume name.
400
+ *
401
+ * @default - auto-generated
402
+ */
403
+ readonly name?: string;
404
+ /**
405
+ * Mode bits to use on created files by default. Must be a value between 0 and
406
+ * 0777. Defaults to 0644. Directories within the path are not affected by
407
+ * this setting. This might be in conflict with other options that affect the
408
+ * file mode, like fsGroup, and the result can be other mode bits set.
409
+ *
410
+ * @default 0644. Directories within the path are not affected by this
411
+ * setting. This might be in conflict with other options that affect the file
412
+ * mode, like fsGroup, and the result can be other mode bits set.
413
+ */
414
+ readonly defaultMode?: number;
415
+ /**
416
+ * Specify whether the secret or its keys must be defined.
417
+ * @default - undocumented
418
+ */
419
+ readonly optional?: boolean;
420
+ /**
421
+ * If unspecified, each key-value pair in the Data field of the referenced
422
+ * secret will be projected into the volume as a file whose name is the key
423
+ * and content is the value. If specified, the listed keys will be projected
424
+ * into the specified paths, and unlisted keys will not be present. If a key
425
+ * is specified which is not present in the secret, the volume setup will
426
+ * error unless it is marked optional. Paths must be relative and may not
427
+ * contain the '..' path or start with '..'.
428
+ *
429
+ * @default - no mapping
430
+ */
431
+ readonly items?: {
432
+ [key: string]: PathMapping;
433
+ };
434
+ }
435
+ /**
436
+ * Azure Disk kinds.
437
+ */
438
+ export declare enum AzureDiskPersistentVolumeKind {
439
+ /**
440
+ * Multiple blob disks per storage account.
441
+ */
442
+ SHARED = "Shared",
443
+ /**
444
+ * Single blob disk per storage account.
445
+ */
446
+ DEDICATED = "Dedicated",
447
+ /**
448
+ * Azure managed data disk.
449
+ */
450
+ MANAGED = "Managed"
451
+ }
452
+ /**
453
+ * Azure disk caching modes.
454
+ */
455
+ export declare enum AzureDiskPersistentVolumeCachingMode {
456
+ /**
457
+ * None.
458
+ */
459
+ NONE = "None",
460
+ /**
461
+ * ReadOnly.
462
+ */
463
+ READ_ONLY = "ReadOnly",
464
+ /**
465
+ * ReadWrite.
466
+ */
467
+ READ_WRITE = "ReadWrite"
468
+ }
469
+ /**
470
+ * Options for a HostPathVolume-based volume.
471
+ */
472
+ export interface HostPathVolumeOptions {
473
+ /**
474
+ * The path of the directory on the host.
475
+ */
476
+ readonly path: string;
477
+ /**
478
+ * The expected type of the path found on the host.
479
+ *
480
+ * @default HostPathVolumeType.DEFAULT
481
+ */
482
+ readonly type?: HostPathVolumeType;
483
+ }
484
+ /**
485
+ * Host path types.
486
+ */
487
+ export declare enum HostPathVolumeType {
488
+ /**
489
+ * Empty string (default) is for backward compatibility, which means that no
490
+ * checks will be performed before mounting the hostPath volume.
491
+ */
492
+ DEFAULT = "",
493
+ /**
494
+ * If nothing exists at the given path, an empty directory will be created
495
+ * there as needed with permission set to 0755, having the same group and
496
+ * ownership with Kubelet.
497
+ */
498
+ DIRECTORY_OR_CREATE = "DirectoryOrCreate",
499
+ /**
500
+ * A directory must exist at the given path.
501
+ */
502
+ DIRECTORY = "Directory",
503
+ /**
504
+ * If nothing exists at the given path, an empty file will be created there
505
+ * as needed with permission set to 0644, having the same group and ownership
506
+ * with Kubelet.
507
+ */
508
+ FILE_OR_CREATE = "FileOrCreate",
509
+ /**
510
+ * A file must exist at the given path.
511
+ */
512
+ FILE = "File",
513
+ /**
514
+ * A UNIX socket must exist at the given path.
515
+ */
516
+ SOCKET = "Socket",
517
+ /**
518
+ * A character device must exist at the given path.
519
+ */
520
+ CHAR_DEVICE = "CharDevice",
521
+ /**
522
+ * A block device must exist at the given path.
523
+ */
524
+ BLOCK_DEVICE = "BlockDevice"
525
+ }
526
+ /**
527
+ * Options for the NFS based volume.
528
+ */
529
+ export interface NfsVolumeOptions {
530
+ /**
531
+ * Server is the hostname or IP address of the NFS server.
532
+ */
533
+ readonly server: string;
534
+ /**
535
+ * If set to true, will force the NFS export to be mounted with read-only permissions.
536
+ *
537
+ * @default - false
538
+ */
539
+ readonly readOnly?: boolean;
540
+ /**
541
+ * Path that is exported by the NFS server
542
+ */
543
+ readonly path: string;
544
+ }
545
+ /**
546
+ * Options for the CSI driver based volume.
547
+ */
548
+ export interface CsiVolumeOptions {
549
+ /**
550
+ * The volume name.
551
+ *
552
+ * @default - auto-generated
553
+ */
554
+ readonly name?: string;
555
+ /**
556
+ * The filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided,
557
+ * the empty value is passed to the associated CSI driver, which will
558
+ * determine the default filesystem to apply.
559
+ *
560
+ * @default - driver-dependent
561
+ */
562
+ readonly fsType?: string;
563
+ /**
564
+ * Whether the mounted volume should be read-only or not.
565
+ *
566
+ * @default - false
567
+ */
568
+ readonly readOnly?: boolean;
569
+ /**
570
+ * Any driver-specific attributes to pass to the CSI volume builder.
571
+ *
572
+ * @default - undefined
573
+ */
574
+ readonly attributes?: {
575
+ [key: string]: string;
576
+ };
577
+ }