cdk8s 2.68.99 → 2.68.100
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/.jsii +2 -2
- package/docs/java.md +1831 -667
- package/docs/python.md +1873 -693
- package/docs/typescript.md +1707 -593
- package/lib/api-object.js +1 -1
- package/lib/app.js +1 -1
- package/lib/chart.js +1 -1
- package/lib/cron.js +1 -1
- package/lib/dependency.js +2 -2
- package/lib/duration.js +1 -1
- package/lib/helm.js +1 -1
- package/lib/include.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/lazy.js +1 -1
- package/lib/metadata.js +1 -1
- package/lib/names.js +1 -1
- package/lib/resolve.js +4 -4
- package/lib/size.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +6 -6
package/docs/typescript.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# API Reference <a name="API Reference"></a>
|
|
1
|
+
# API Reference <a name="API Reference" id="api-reference"></a>
|
|
2
2
|
|
|
3
|
-
## Constructs <a name="Constructs"></a>
|
|
3
|
+
## Constructs <a name="Constructs" id="Constructs"></a>
|
|
4
4
|
|
|
5
|
-
### ApiObject <a name="cdk8s.ApiObject"></a>
|
|
5
|
+
### ApiObject <a name="ApiObject" id="cdk8s.ApiObject"></a>
|
|
6
6
|
|
|
7
|
-
#### Initializers <a name="cdk8s.ApiObject.Initializer"></a>
|
|
7
|
+
#### Initializers <a name="Initializers" id="cdk8s.ApiObject.Initializer"></a>
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
10
|
import { ApiObject } from 'cdk8s'
|
|
@@ -12,69 +12,138 @@ import { ApiObject } from 'cdk8s'
|
|
|
12
12
|
new ApiObject(scope: Construct, id: string, props: ApiObjectProps)
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
| **Name** | **Type** | **Description** |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| <code><a href="#cdk8s.ApiObject.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | the construct scope. |
|
|
18
|
+
| <code><a href="#cdk8s.ApiObject.Initializer.parameter.id">id</a></code> | <code>string</code> | namespace. |
|
|
19
|
+
| <code><a href="#cdk8s.ApiObject.Initializer.parameter.props">props</a></code> | <code><a href="#cdk8s.ApiObjectProps">ApiObjectProps</a></code> | options. |
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="cdk8s.ApiObject.Initializer.parameter.scope"></a>
|
|
24
|
+
|
|
25
|
+
- *Type:* constructs.Construct
|
|
18
26
|
|
|
19
27
|
the construct scope.
|
|
20
28
|
|
|
21
29
|
---
|
|
22
30
|
|
|
23
|
-
##### `id`<sup>Required</sup> <a name="cdk8s.ApiObject.parameter.id"></a>
|
|
31
|
+
##### `id`<sup>Required</sup> <a name="id" id="cdk8s.ApiObject.Initializer.parameter.id"></a>
|
|
24
32
|
|
|
25
|
-
- *Type:*
|
|
33
|
+
- *Type:* string
|
|
26
34
|
|
|
27
35
|
namespace.
|
|
28
36
|
|
|
29
37
|
---
|
|
30
38
|
|
|
31
|
-
##### `props`<sup>Required</sup> <a name="cdk8s.ApiObject.parameter.props"></a>
|
|
39
|
+
##### `props`<sup>Required</sup> <a name="props" id="cdk8s.ApiObject.Initializer.parameter.props"></a>
|
|
32
40
|
|
|
33
|
-
- *Type:*
|
|
41
|
+
- *Type:* <a href="#cdk8s.ApiObjectProps">ApiObjectProps</a>
|
|
34
42
|
|
|
35
43
|
options.
|
|
36
44
|
|
|
37
45
|
---
|
|
38
46
|
|
|
39
|
-
#### Methods <a name="Methods"></a>
|
|
47
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
| **Name** | **Description** |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| <code><a href="#cdk8s.ApiObject.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
52
|
+
| <code><a href="#cdk8s.ApiObject.addDependency">addDependency</a></code> | Create a dependency between this ApiObject and other constructs. |
|
|
53
|
+
| <code><a href="#cdk8s.ApiObject.addJsonPatch">addJsonPatch</a></code> | Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
|
|
54
|
+
| <code><a href="#cdk8s.ApiObject.toJson">toJson</a></code> | Renders the object to Kubernetes JSON. |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
##### `toString` <a name="toString" id="cdk8s.ApiObject.toString"></a>
|
|
42
59
|
|
|
43
60
|
```typescript
|
|
44
|
-
public
|
|
61
|
+
public toString(): string
|
|
45
62
|
```
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
Returns a string representation of this construct.
|
|
65
|
+
|
|
66
|
+
##### `addDependency` <a name="addDependency" id="cdk8s.ApiObject.addDependency"></a>
|
|
48
67
|
|
|
49
|
-
|
|
68
|
+
```typescript
|
|
69
|
+
public addDependency(dependencies: IConstruct): void
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Create a dependency between this ApiObject and other constructs.
|
|
73
|
+
|
|
74
|
+
These can be other ApiObjects, Charts, or custom.
|
|
75
|
+
|
|
76
|
+
###### `dependencies`<sup>Required</sup> <a name="dependencies" id="cdk8s.ApiObject.addDependency.parameter.dependencies"></a>
|
|
77
|
+
|
|
78
|
+
- *Type:* constructs.IConstruct
|
|
50
79
|
|
|
51
80
|
the dependencies to add.
|
|
52
81
|
|
|
53
82
|
---
|
|
54
83
|
|
|
55
|
-
##### `addJsonPatch` <a name="cdk8s.ApiObject.addJsonPatch"></a>
|
|
84
|
+
##### `addJsonPatch` <a name="addJsonPatch" id="cdk8s.ApiObject.addJsonPatch"></a>
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
public addJsonPatch(ops: JsonPatch): void
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
|
|
91
|
+
|
|
92
|
+
*Example*
|
|
56
93
|
|
|
57
94
|
```typescript
|
|
58
|
-
|
|
95
|
+
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
|
|
59
96
|
```
|
|
60
97
|
|
|
61
|
-
###### `ops`<sup>Required</sup> <a name="cdk8s.ApiObject.parameter.ops"></a>
|
|
62
98
|
|
|
63
|
-
|
|
99
|
+
###### `ops`<sup>Required</sup> <a name="ops" id="cdk8s.ApiObject.addJsonPatch.parameter.ops"></a>
|
|
100
|
+
|
|
101
|
+
- *Type:* <a href="#cdk8s.JsonPatch">JsonPatch</a>
|
|
64
102
|
|
|
65
103
|
The JSON-Patch operations to apply.
|
|
66
104
|
|
|
67
105
|
---
|
|
68
106
|
|
|
69
|
-
##### `toJson` <a name="cdk8s.ApiObject.toJson"></a>
|
|
107
|
+
##### `toJson` <a name="toJson" id="cdk8s.ApiObject.toJson"></a>
|
|
70
108
|
|
|
71
109
|
```typescript
|
|
72
|
-
public toJson()
|
|
110
|
+
public toJson(): any
|
|
73
111
|
```
|
|
74
112
|
|
|
75
|
-
|
|
113
|
+
Renders the object to Kubernetes JSON.
|
|
114
|
+
|
|
115
|
+
To disable sorting of dictionary keys in output object set the
|
|
116
|
+
`CDK8S_DISABLE_SORT` environment variable to any non-empty value.
|
|
76
117
|
|
|
77
|
-
|
|
118
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
119
|
+
|
|
120
|
+
| **Name** | **Description** |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| <code><a href="#cdk8s.ApiObject.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
123
|
+
| <code><a href="#cdk8s.ApiObject.isApiObject">isApiObject</a></code> | Return whether the given object is an `ApiObject`. |
|
|
124
|
+
| <code><a href="#cdk8s.ApiObject.of">of</a></code> | Returns the `ApiObject` named `Resource` which is a child of the given construct. |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk8s.ApiObject.isConstruct"></a>
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
import { ApiObject } from 'cdk8s'
|
|
132
|
+
|
|
133
|
+
ApiObject.isConstruct(x: any)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Checks if `x` is a construct.
|
|
137
|
+
|
|
138
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk8s.ApiObject.isConstruct.parameter.x"></a>
|
|
139
|
+
|
|
140
|
+
- *Type:* any
|
|
141
|
+
|
|
142
|
+
Any object.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
##### `isApiObject` <a name="isApiObject" id="cdk8s.ApiObject.isApiObject"></a>
|
|
78
147
|
|
|
79
148
|
```typescript
|
|
80
149
|
import { ApiObject } from 'cdk8s'
|
|
@@ -82,15 +151,19 @@ import { ApiObject } from 'cdk8s'
|
|
|
82
151
|
ApiObject.isApiObject(o: any)
|
|
83
152
|
```
|
|
84
153
|
|
|
85
|
-
|
|
154
|
+
Return whether the given object is an `ApiObject`.
|
|
155
|
+
|
|
156
|
+
We do attribute detection since we can't reliably use 'instanceof'.
|
|
86
157
|
|
|
87
|
-
|
|
158
|
+
###### `o`<sup>Required</sup> <a name="o" id="cdk8s.ApiObject.isApiObject.parameter.o"></a>
|
|
159
|
+
|
|
160
|
+
- *Type:* any
|
|
88
161
|
|
|
89
162
|
The object to check.
|
|
90
163
|
|
|
91
164
|
---
|
|
92
165
|
|
|
93
|
-
##### `of` <a name="cdk8s.ApiObject.of"></a>
|
|
166
|
+
##### `of` <a name="of" id="cdk8s.ApiObject.of"></a>
|
|
94
167
|
|
|
95
168
|
```typescript
|
|
96
169
|
import { ApiObject } from 'cdk8s'
|
|
@@ -98,83 +171,113 @@ import { ApiObject } from 'cdk8s'
|
|
|
98
171
|
ApiObject.of(c: IConstruct)
|
|
99
172
|
```
|
|
100
173
|
|
|
101
|
-
|
|
174
|
+
Returns the `ApiObject` named `Resource` which is a child of the given construct.
|
|
175
|
+
|
|
176
|
+
If `c` is an `ApiObject`, it is returned directly. Throws an
|
|
177
|
+
exception if the construct does not have a child named `Default` _or_ if
|
|
178
|
+
this child is not an `ApiObject`.
|
|
102
179
|
|
|
103
|
-
|
|
180
|
+
###### `c`<sup>Required</sup> <a name="c" id="cdk8s.ApiObject.of.parameter.c"></a>
|
|
181
|
+
|
|
182
|
+
- *Type:* constructs.IConstruct
|
|
104
183
|
|
|
105
184
|
The higher-level construct.
|
|
106
185
|
|
|
107
186
|
---
|
|
108
187
|
|
|
109
|
-
#### Properties <a name="Properties"></a>
|
|
188
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
189
|
+
|
|
190
|
+
| **Name** | **Type** | **Description** |
|
|
191
|
+
| --- | --- | --- |
|
|
192
|
+
| <code><a href="#cdk8s.ApiObject.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
193
|
+
| <code><a href="#cdk8s.ApiObject.property.apiGroup">apiGroup</a></code> | <code>string</code> | The group portion of the API version (e.g. `authorization.k8s.io`). |
|
|
194
|
+
| <code><a href="#cdk8s.ApiObject.property.apiVersion">apiVersion</a></code> | <code>string</code> | The object's API version (e.g. `authorization.k8s.io/v1`). |
|
|
195
|
+
| <code><a href="#cdk8s.ApiObject.property.chart">chart</a></code> | <code><a href="#cdk8s.Chart">Chart</a></code> | The chart in which this object is defined. |
|
|
196
|
+
| <code><a href="#cdk8s.ApiObject.property.kind">kind</a></code> | <code>string</code> | The object kind. |
|
|
197
|
+
| <code><a href="#cdk8s.ApiObject.property.metadata">metadata</a></code> | <code><a href="#cdk8s.ApiObjectMetadataDefinition">ApiObjectMetadataDefinition</a></code> | Metadata associated with this API object. |
|
|
198
|
+
| <code><a href="#cdk8s.ApiObject.property.name">name</a></code> | <code>string</code> | The name of the API object. |
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk8s.ApiObject.property.node"></a>
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
public readonly node: Node;
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- *Type:* constructs.Node
|
|
209
|
+
|
|
210
|
+
The tree node.
|
|
211
|
+
|
|
212
|
+
---
|
|
110
213
|
|
|
111
|
-
##### `apiGroup`<sup>Required</sup> <a name="cdk8s.ApiObject.property.apiGroup"></a>
|
|
214
|
+
##### `apiGroup`<sup>Required</sup> <a name="apiGroup" id="cdk8s.ApiObject.property.apiGroup"></a>
|
|
112
215
|
|
|
113
216
|
```typescript
|
|
114
217
|
public readonly apiGroup: string;
|
|
115
218
|
```
|
|
116
219
|
|
|
117
|
-
- *Type:*
|
|
220
|
+
- *Type:* string
|
|
118
221
|
|
|
119
222
|
The group portion of the API version (e.g. `authorization.k8s.io`).
|
|
120
223
|
|
|
121
224
|
---
|
|
122
225
|
|
|
123
|
-
##### `apiVersion`<sup>Required</sup> <a name="cdk8s.ApiObject.property.apiVersion"></a>
|
|
226
|
+
##### `apiVersion`<sup>Required</sup> <a name="apiVersion" id="cdk8s.ApiObject.property.apiVersion"></a>
|
|
124
227
|
|
|
125
228
|
```typescript
|
|
126
229
|
public readonly apiVersion: string;
|
|
127
230
|
```
|
|
128
231
|
|
|
129
|
-
- *Type:*
|
|
232
|
+
- *Type:* string
|
|
130
233
|
|
|
131
234
|
The object's API version (e.g. `authorization.k8s.io/v1`).
|
|
132
235
|
|
|
133
236
|
---
|
|
134
237
|
|
|
135
|
-
##### `chart`<sup>Required</sup> <a name="cdk8s.ApiObject.property.chart"></a>
|
|
238
|
+
##### `chart`<sup>Required</sup> <a name="chart" id="cdk8s.ApiObject.property.chart"></a>
|
|
136
239
|
|
|
137
240
|
```typescript
|
|
138
241
|
public readonly chart: Chart;
|
|
139
242
|
```
|
|
140
243
|
|
|
141
|
-
- *Type:*
|
|
244
|
+
- *Type:* <a href="#cdk8s.Chart">Chart</a>
|
|
142
245
|
|
|
143
246
|
The chart in which this object is defined.
|
|
144
247
|
|
|
145
248
|
---
|
|
146
249
|
|
|
147
|
-
##### `kind`<sup>Required</sup> <a name="cdk8s.ApiObject.property.kind"></a>
|
|
250
|
+
##### `kind`<sup>Required</sup> <a name="kind" id="cdk8s.ApiObject.property.kind"></a>
|
|
148
251
|
|
|
149
252
|
```typescript
|
|
150
253
|
public readonly kind: string;
|
|
151
254
|
```
|
|
152
255
|
|
|
153
|
-
- *Type:*
|
|
256
|
+
- *Type:* string
|
|
154
257
|
|
|
155
258
|
The object kind.
|
|
156
259
|
|
|
157
260
|
---
|
|
158
261
|
|
|
159
|
-
##### `metadata`<sup>Required</sup> <a name="cdk8s.ApiObject.property.metadata"></a>
|
|
262
|
+
##### `metadata`<sup>Required</sup> <a name="metadata" id="cdk8s.ApiObject.property.metadata"></a>
|
|
160
263
|
|
|
161
264
|
```typescript
|
|
162
265
|
public readonly metadata: ApiObjectMetadataDefinition;
|
|
163
266
|
```
|
|
164
267
|
|
|
165
|
-
- *Type:*
|
|
268
|
+
- *Type:* <a href="#cdk8s.ApiObjectMetadataDefinition">ApiObjectMetadataDefinition</a>
|
|
166
269
|
|
|
167
270
|
Metadata associated with this API object.
|
|
168
271
|
|
|
169
272
|
---
|
|
170
273
|
|
|
171
|
-
##### `name`<sup>Required</sup> <a name="cdk8s.ApiObject.property.name"></a>
|
|
274
|
+
##### `name`<sup>Required</sup> <a name="name" id="cdk8s.ApiObject.property.name"></a>
|
|
172
275
|
|
|
173
276
|
```typescript
|
|
174
277
|
public readonly name: string;
|
|
175
278
|
```
|
|
176
279
|
|
|
177
|
-
- *Type:*
|
|
280
|
+
- *Type:* string
|
|
178
281
|
|
|
179
282
|
The name of the API object.
|
|
180
283
|
|
|
@@ -186,11 +289,11 @@ construct path to generate a DNS-compatible name for the resource.
|
|
|
186
289
|
---
|
|
187
290
|
|
|
188
291
|
|
|
189
|
-
### App <a name="cdk8s.App"></a>
|
|
292
|
+
### App <a name="App" id="cdk8s.App"></a>
|
|
190
293
|
|
|
191
294
|
Represents a cdk8s application.
|
|
192
295
|
|
|
193
|
-
#### Initializers <a name="cdk8s.App.Initializer"></a>
|
|
296
|
+
#### Initializers <a name="Initializers" id="cdk8s.App.Initializer"></a>
|
|
194
297
|
|
|
195
298
|
```typescript
|
|
196
299
|
import { App } from 'cdk8s'
|
|
@@ -198,31 +301,82 @@ import { App } from 'cdk8s'
|
|
|
198
301
|
new App(props?: AppProps)
|
|
199
302
|
```
|
|
200
303
|
|
|
201
|
-
|
|
304
|
+
| **Name** | **Type** | **Description** |
|
|
305
|
+
| --- | --- | --- |
|
|
306
|
+
| <code><a href="#cdk8s.App.Initializer.parameter.props">props</a></code> | <code><a href="#cdk8s.AppProps">AppProps</a></code> | configuration options. |
|
|
202
307
|
|
|
203
|
-
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
##### `props`<sup>Optional</sup> <a name="props" id="cdk8s.App.Initializer.parameter.props"></a>
|
|
311
|
+
|
|
312
|
+
- *Type:* <a href="#cdk8s.AppProps">AppProps</a>
|
|
204
313
|
|
|
205
314
|
configuration options.
|
|
206
315
|
|
|
207
316
|
---
|
|
208
317
|
|
|
209
|
-
#### Methods <a name="Methods"></a>
|
|
318
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
319
|
+
|
|
320
|
+
| **Name** | **Description** |
|
|
321
|
+
| --- | --- |
|
|
322
|
+
| <code><a href="#cdk8s.App.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
323
|
+
| <code><a href="#cdk8s.App.synth">synth</a></code> | Synthesizes all manifests to the output directory. |
|
|
324
|
+
| <code><a href="#cdk8s.App.synthYaml">synthYaml</a></code> | Synthesizes the app into a YAML string. |
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
##### `toString` <a name="toString" id="cdk8s.App.toString"></a>
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
public toString(): string
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Returns a string representation of this construct.
|
|
335
|
+
|
|
336
|
+
##### `synth` <a name="synth" id="cdk8s.App.synth"></a>
|
|
337
|
+
|
|
338
|
+
```typescript
|
|
339
|
+
public synth(): void
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Synthesizes all manifests to the output directory.
|
|
210
343
|
|
|
211
|
-
##### `
|
|
344
|
+
##### `synthYaml` <a name="synthYaml" id="cdk8s.App.synthYaml"></a>
|
|
212
345
|
|
|
213
346
|
```typescript
|
|
214
|
-
public
|
|
347
|
+
public synthYaml(): string
|
|
215
348
|
```
|
|
216
349
|
|
|
217
|
-
|
|
350
|
+
Synthesizes the app into a YAML string.
|
|
351
|
+
|
|
352
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
353
|
+
|
|
354
|
+
| **Name** | **Description** |
|
|
355
|
+
| --- | --- |
|
|
356
|
+
| <code><a href="#cdk8s.App.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
357
|
+
| <code><a href="#cdk8s.App.of">of</a></code> | *No description.* |
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk8s.App.isConstruct"></a>
|
|
218
362
|
|
|
219
363
|
```typescript
|
|
220
|
-
|
|
364
|
+
import { App } from 'cdk8s'
|
|
365
|
+
|
|
366
|
+
App.isConstruct(x: any)
|
|
221
367
|
```
|
|
222
368
|
|
|
223
|
-
|
|
369
|
+
Checks if `x` is a construct.
|
|
370
|
+
|
|
371
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk8s.App.isConstruct.parameter.x"></a>
|
|
372
|
+
|
|
373
|
+
- *Type:* any
|
|
224
374
|
|
|
225
|
-
|
|
375
|
+
Any object.
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
##### `of` <a name="of" id="cdk8s.App.of"></a>
|
|
226
380
|
|
|
227
381
|
```typescript
|
|
228
382
|
import { App } from 'cdk8s'
|
|
@@ -230,58 +384,81 @@ import { App } from 'cdk8s'
|
|
|
230
384
|
App.of(c: IConstruct)
|
|
231
385
|
```
|
|
232
386
|
|
|
233
|
-
###### `c`<sup>Required</sup> <a name="cdk8s.App.parameter.c"></a>
|
|
387
|
+
###### `c`<sup>Required</sup> <a name="c" id="cdk8s.App.of.parameter.c"></a>
|
|
388
|
+
|
|
389
|
+
- *Type:* constructs.IConstruct
|
|
234
390
|
|
|
235
|
-
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
394
|
+
|
|
395
|
+
| **Name** | **Type** | **Description** |
|
|
396
|
+
| --- | --- | --- |
|
|
397
|
+
| <code><a href="#cdk8s.App.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
398
|
+
| <code><a href="#cdk8s.App.property.charts">charts</a></code> | <code><a href="#cdk8s.Chart">Chart</a>[]</code> | Returns all the charts in this app, sorted topologically. |
|
|
399
|
+
| <code><a href="#cdk8s.App.property.outdir">outdir</a></code> | <code>string</code> | The output directory into which manifests will be synthesized. |
|
|
400
|
+
| <code><a href="#cdk8s.App.property.outputFileExtension">outputFileExtension</a></code> | <code>string</code> | The file extension to use for rendered YAML files. |
|
|
401
|
+
| <code><a href="#cdk8s.App.property.resolvers">resolvers</a></code> | <code><a href="#cdk8s.IResolver">IResolver</a>[]</code> | Resolvers used by this app. |
|
|
402
|
+
| <code><a href="#cdk8s.App.property.yamlOutputType">yamlOutputType</a></code> | <code><a href="#cdk8s.YamlOutputType">YamlOutputType</a></code> | How to divide the YAML output into files. |
|
|
236
403
|
|
|
237
404
|
---
|
|
238
405
|
|
|
239
|
-
|
|
406
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk8s.App.property.node"></a>
|
|
407
|
+
|
|
408
|
+
```typescript
|
|
409
|
+
public readonly node: Node;
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
- *Type:* constructs.Node
|
|
240
413
|
|
|
241
|
-
|
|
414
|
+
The tree node.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
##### `charts`<sup>Required</sup> <a name="charts" id="cdk8s.App.property.charts"></a>
|
|
242
419
|
|
|
243
420
|
```typescript
|
|
244
421
|
public readonly charts: Chart[];
|
|
245
422
|
```
|
|
246
423
|
|
|
247
|
-
- *Type:*
|
|
424
|
+
- *Type:* <a href="#cdk8s.Chart">Chart</a>[]
|
|
248
425
|
|
|
249
426
|
Returns all the charts in this app, sorted topologically.
|
|
250
427
|
|
|
251
428
|
---
|
|
252
429
|
|
|
253
|
-
##### `outdir`<sup>Required</sup> <a name="cdk8s.App.property.outdir"></a>
|
|
430
|
+
##### `outdir`<sup>Required</sup> <a name="outdir" id="cdk8s.App.property.outdir"></a>
|
|
254
431
|
|
|
255
432
|
```typescript
|
|
256
433
|
public readonly outdir: string;
|
|
257
434
|
```
|
|
258
435
|
|
|
259
|
-
- *Type:*
|
|
436
|
+
- *Type:* string
|
|
260
437
|
|
|
261
438
|
The output directory into which manifests will be synthesized.
|
|
262
439
|
|
|
263
440
|
---
|
|
264
441
|
|
|
265
|
-
##### `outputFileExtension`<sup>Required</sup> <a name="cdk8s.App.property.outputFileExtension"></a>
|
|
442
|
+
##### `outputFileExtension`<sup>Required</sup> <a name="outputFileExtension" id="cdk8s.App.property.outputFileExtension"></a>
|
|
266
443
|
|
|
267
444
|
```typescript
|
|
268
445
|
public readonly outputFileExtension: string;
|
|
269
446
|
```
|
|
270
447
|
|
|
271
|
-
- *Type:*
|
|
448
|
+
- *Type:* string
|
|
272
449
|
- *Default:* .k8s.yaml
|
|
273
450
|
|
|
274
451
|
The file extension to use for rendered YAML files.
|
|
275
452
|
|
|
276
453
|
---
|
|
277
454
|
|
|
278
|
-
##### `resolvers`<sup>Required</sup> <a name="cdk8s.App.property.resolvers"></a>
|
|
455
|
+
##### `resolvers`<sup>Required</sup> <a name="resolvers" id="cdk8s.App.property.resolvers"></a>
|
|
279
456
|
|
|
280
457
|
```typescript
|
|
281
458
|
public readonly resolvers: IResolver[];
|
|
282
459
|
```
|
|
283
460
|
|
|
284
|
-
- *Type:*
|
|
461
|
+
- *Type:* <a href="#cdk8s.IResolver">IResolver</a>[]
|
|
285
462
|
|
|
286
463
|
Resolvers used by this app.
|
|
287
464
|
|
|
@@ -290,13 +467,13 @@ passed by the `resolvers` property, as well as built-in resolvers.
|
|
|
290
467
|
|
|
291
468
|
---
|
|
292
469
|
|
|
293
|
-
##### `yamlOutputType`<sup>Required</sup> <a name="cdk8s.App.property.yamlOutputType"></a>
|
|
470
|
+
##### `yamlOutputType`<sup>Required</sup> <a name="yamlOutputType" id="cdk8s.App.property.yamlOutputType"></a>
|
|
294
471
|
|
|
295
472
|
```typescript
|
|
296
473
|
public readonly yamlOutputType: YamlOutputType;
|
|
297
474
|
```
|
|
298
475
|
|
|
299
|
-
- *Type:*
|
|
476
|
+
- *Type:* <a href="#cdk8s.YamlOutputType">YamlOutputType</a>
|
|
300
477
|
- *Default:* YamlOutputType.FILE_PER_CHART
|
|
301
478
|
|
|
302
479
|
How to divide the YAML output into files.
|
|
@@ -304,9 +481,9 @@ How to divide the YAML output into files.
|
|
|
304
481
|
---
|
|
305
482
|
|
|
306
483
|
|
|
307
|
-
### Chart <a name="cdk8s.Chart"></a>
|
|
484
|
+
### Chart <a name="Chart" id="cdk8s.Chart"></a>
|
|
308
485
|
|
|
309
|
-
#### Initializers <a name="cdk8s.Chart.Initializer"></a>
|
|
486
|
+
#### Initializers <a name="Initializers" id="cdk8s.Chart.Initializer"></a>
|
|
310
487
|
|
|
311
488
|
```typescript
|
|
312
489
|
import { Chart } from 'cdk8s'
|
|
@@ -314,63 +491,137 @@ import { Chart } from 'cdk8s'
|
|
|
314
491
|
new Chart(scope: Construct, id: string, props?: ChartProps)
|
|
315
492
|
```
|
|
316
493
|
|
|
317
|
-
|
|
494
|
+
| **Name** | **Type** | **Description** |
|
|
495
|
+
| --- | --- | --- |
|
|
496
|
+
| <code><a href="#cdk8s.Chart.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
497
|
+
| <code><a href="#cdk8s.Chart.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
498
|
+
| <code><a href="#cdk8s.Chart.Initializer.parameter.props">props</a></code> | <code><a href="#cdk8s.ChartProps">ChartProps</a></code> | *No description.* |
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="cdk8s.Chart.Initializer.parameter.scope"></a>
|
|
318
503
|
|
|
319
|
-
- *Type:*
|
|
504
|
+
- *Type:* constructs.Construct
|
|
320
505
|
|
|
321
506
|
---
|
|
322
507
|
|
|
323
|
-
##### `id`<sup>Required</sup> <a name="cdk8s.Chart.parameter.id"></a>
|
|
508
|
+
##### `id`<sup>Required</sup> <a name="id" id="cdk8s.Chart.Initializer.parameter.id"></a>
|
|
324
509
|
|
|
325
|
-
- *Type:*
|
|
510
|
+
- *Type:* string
|
|
326
511
|
|
|
327
512
|
---
|
|
328
513
|
|
|
329
|
-
##### `props`<sup>Optional</sup> <a name="cdk8s.Chart.parameter.props"></a>
|
|
514
|
+
##### `props`<sup>Optional</sup> <a name="props" id="cdk8s.Chart.Initializer.parameter.props"></a>
|
|
330
515
|
|
|
331
|
-
- *Type:*
|
|
516
|
+
- *Type:* <a href="#cdk8s.ChartProps">ChartProps</a>
|
|
332
517
|
|
|
333
518
|
---
|
|
334
519
|
|
|
335
|
-
#### Methods <a name="Methods"></a>
|
|
520
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
521
|
+
|
|
522
|
+
| **Name** | **Description** |
|
|
523
|
+
| --- | --- |
|
|
524
|
+
| <code><a href="#cdk8s.Chart.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
525
|
+
| <code><a href="#cdk8s.Chart.addDependency">addDependency</a></code> | Create a dependency between this Chart and other constructs. |
|
|
526
|
+
| <code><a href="#cdk8s.Chart.generateObjectName">generateObjectName</a></code> | Generates a app-unique name for an object given it's construct node path. |
|
|
527
|
+
| <code><a href="#cdk8s.Chart.toJson">toJson</a></code> | Renders this chart to a set of Kubernetes JSON resources. |
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
##### `toString` <a name="toString" id="cdk8s.Chart.toString"></a>
|
|
532
|
+
|
|
533
|
+
```typescript
|
|
534
|
+
public toString(): string
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Returns a string representation of this construct.
|
|
336
538
|
|
|
337
|
-
##### `addDependency` <a name="cdk8s.Chart.addDependency"></a>
|
|
539
|
+
##### `addDependency` <a name="addDependency" id="cdk8s.Chart.addDependency"></a>
|
|
338
540
|
|
|
339
541
|
```typescript
|
|
340
|
-
public addDependency(dependencies: IConstruct)
|
|
542
|
+
public addDependency(dependencies: IConstruct): void
|
|
341
543
|
```
|
|
342
544
|
|
|
343
|
-
|
|
545
|
+
Create a dependency between this Chart and other constructs.
|
|
344
546
|
|
|
345
|
-
|
|
547
|
+
These can be other ApiObjects, Charts, or custom.
|
|
548
|
+
|
|
549
|
+
###### `dependencies`<sup>Required</sup> <a name="dependencies" id="cdk8s.Chart.addDependency.parameter.dependencies"></a>
|
|
550
|
+
|
|
551
|
+
- *Type:* constructs.IConstruct
|
|
346
552
|
|
|
347
553
|
the dependencies to add.
|
|
348
554
|
|
|
349
555
|
---
|
|
350
556
|
|
|
351
|
-
##### `generateObjectName` <a name="cdk8s.Chart.generateObjectName"></a>
|
|
557
|
+
##### `generateObjectName` <a name="generateObjectName" id="cdk8s.Chart.generateObjectName"></a>
|
|
352
558
|
|
|
353
559
|
```typescript
|
|
354
|
-
public generateObjectName(apiObject: ApiObject)
|
|
560
|
+
public generateObjectName(apiObject: ApiObject): string
|
|
355
561
|
```
|
|
356
562
|
|
|
357
|
-
|
|
563
|
+
Generates a app-unique name for an object given it's construct node path.
|
|
564
|
+
|
|
565
|
+
Different resource types may have different constraints on names
|
|
566
|
+
(`metadata.name`). The previous version of the name generator was
|
|
567
|
+
compatible with DNS_SUBDOMAIN but not with DNS_LABEL.
|
|
568
|
+
|
|
569
|
+
For example, `Deployment` names must comply with DNS_SUBDOMAIN while
|
|
570
|
+
`Service` names must comply with DNS_LABEL.
|
|
571
|
+
|
|
572
|
+
Since there is no formal specification for this, the default name
|
|
573
|
+
generation scheme for kubernetes objects in cdk8s was changed to DNS_LABEL,
|
|
574
|
+
since it’s the common denominator for all kubernetes resources
|
|
575
|
+
(supposedly).
|
|
358
576
|
|
|
359
|
-
|
|
577
|
+
You can override this method if you wish to customize object names at the
|
|
578
|
+
chart level.
|
|
579
|
+
|
|
580
|
+
###### `apiObject`<sup>Required</sup> <a name="apiObject" id="cdk8s.Chart.generateObjectName.parameter.apiObject"></a>
|
|
581
|
+
|
|
582
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>
|
|
360
583
|
|
|
361
584
|
The API object to generate a name for.
|
|
362
585
|
|
|
363
586
|
---
|
|
364
587
|
|
|
365
|
-
##### `toJson` <a name="cdk8s.Chart.toJson"></a>
|
|
588
|
+
##### `toJson` <a name="toJson" id="cdk8s.Chart.toJson"></a>
|
|
366
589
|
|
|
367
590
|
```typescript
|
|
368
|
-
public toJson()
|
|
591
|
+
public toJson(): any[]
|
|
369
592
|
```
|
|
370
593
|
|
|
371
|
-
|
|
594
|
+
Renders this chart to a set of Kubernetes JSON resources.
|
|
372
595
|
|
|
373
|
-
|
|
596
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
597
|
+
|
|
598
|
+
| **Name** | **Description** |
|
|
599
|
+
| --- | --- |
|
|
600
|
+
| <code><a href="#cdk8s.Chart.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
601
|
+
| <code><a href="#cdk8s.Chart.isChart">isChart</a></code> | Return whether the given object is a Chart. |
|
|
602
|
+
| <code><a href="#cdk8s.Chart.of">of</a></code> | Finds the chart in which a node is defined. |
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk8s.Chart.isConstruct"></a>
|
|
607
|
+
|
|
608
|
+
```typescript
|
|
609
|
+
import { Chart } from 'cdk8s'
|
|
610
|
+
|
|
611
|
+
Chart.isConstruct(x: any)
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
Checks if `x` is a construct.
|
|
615
|
+
|
|
616
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk8s.Chart.isConstruct.parameter.x"></a>
|
|
617
|
+
|
|
618
|
+
- *Type:* any
|
|
619
|
+
|
|
620
|
+
Any object.
|
|
621
|
+
|
|
622
|
+
---
|
|
623
|
+
|
|
624
|
+
##### `isChart` <a name="isChart" id="cdk8s.Chart.isChart"></a>
|
|
374
625
|
|
|
375
626
|
```typescript
|
|
376
627
|
import { Chart } from 'cdk8s'
|
|
@@ -378,13 +629,17 @@ import { Chart } from 'cdk8s'
|
|
|
378
629
|
Chart.isChart(x: any)
|
|
379
630
|
```
|
|
380
631
|
|
|
381
|
-
|
|
632
|
+
Return whether the given object is a Chart.
|
|
633
|
+
|
|
634
|
+
We do attribute detection since we can't reliably use 'instanceof'.
|
|
635
|
+
|
|
636
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk8s.Chart.isChart.parameter.x"></a>
|
|
382
637
|
|
|
383
|
-
- *Type:*
|
|
638
|
+
- *Type:* any
|
|
384
639
|
|
|
385
640
|
---
|
|
386
641
|
|
|
387
|
-
##### `of` <a name="cdk8s.Chart.of"></a>
|
|
642
|
+
##### `of` <a name="of" id="cdk8s.Chart.of"></a>
|
|
388
643
|
|
|
389
644
|
```typescript
|
|
390
645
|
import { Chart } from 'cdk8s'
|
|
@@ -392,35 +647,58 @@ import { Chart } from 'cdk8s'
|
|
|
392
647
|
Chart.of(c: IConstruct)
|
|
393
648
|
```
|
|
394
649
|
|
|
395
|
-
|
|
650
|
+
Finds the chart in which a node is defined.
|
|
396
651
|
|
|
397
|
-
|
|
652
|
+
###### `c`<sup>Required</sup> <a name="c" id="cdk8s.Chart.of.parameter.c"></a>
|
|
653
|
+
|
|
654
|
+
- *Type:* constructs.IConstruct
|
|
398
655
|
|
|
399
656
|
a construct node.
|
|
400
657
|
|
|
401
658
|
---
|
|
402
659
|
|
|
403
|
-
#### Properties <a name="Properties"></a>
|
|
660
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
661
|
+
|
|
662
|
+
| **Name** | **Type** | **Description** |
|
|
663
|
+
| --- | --- | --- |
|
|
664
|
+
| <code><a href="#cdk8s.Chart.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
665
|
+
| <code><a href="#cdk8s.Chart.property.apiObjects">apiObjects</a></code> | <code><a href="#cdk8s.ApiObject">ApiObject</a>[]</code> | Returns all the included API objects. |
|
|
666
|
+
| <code><a href="#cdk8s.Chart.property.labels">labels</a></code> | <code>{[ key: string ]: string}</code> | Labels applied to all resources in this chart. |
|
|
667
|
+
| <code><a href="#cdk8s.Chart.property.namespace">namespace</a></code> | <code>string</code> | The default namespace for all objects in this chart. |
|
|
668
|
+
|
|
669
|
+
---
|
|
404
670
|
|
|
405
|
-
##### `
|
|
671
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk8s.Chart.property.node"></a>
|
|
672
|
+
|
|
673
|
+
```typescript
|
|
674
|
+
public readonly node: Node;
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
- *Type:* constructs.Node
|
|
678
|
+
|
|
679
|
+
The tree node.
|
|
680
|
+
|
|
681
|
+
---
|
|
682
|
+
|
|
683
|
+
##### `apiObjects`<sup>Required</sup> <a name="apiObjects" id="cdk8s.Chart.property.apiObjects"></a>
|
|
406
684
|
|
|
407
685
|
```typescript
|
|
408
686
|
public readonly apiObjects: ApiObject[];
|
|
409
687
|
```
|
|
410
688
|
|
|
411
|
-
- *Type:*
|
|
689
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>[]
|
|
412
690
|
|
|
413
691
|
Returns all the included API objects.
|
|
414
692
|
|
|
415
693
|
---
|
|
416
694
|
|
|
417
|
-
##### `labels`<sup>Required</sup> <a name="cdk8s.Chart.property.labels"></a>
|
|
695
|
+
##### `labels`<sup>Required</sup> <a name="labels" id="cdk8s.Chart.property.labels"></a>
|
|
418
696
|
|
|
419
697
|
```typescript
|
|
420
698
|
public readonly labels: {[ key: string ]: string};
|
|
421
699
|
```
|
|
422
700
|
|
|
423
|
-
- *Type:* {[ key: string ]:
|
|
701
|
+
- *Type:* {[ key: string ]: string}
|
|
424
702
|
|
|
425
703
|
Labels applied to all resources in this chart.
|
|
426
704
|
|
|
@@ -428,26 +706,26 @@ This is an immutable copy.
|
|
|
428
706
|
|
|
429
707
|
---
|
|
430
708
|
|
|
431
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.Chart.property.namespace"></a>
|
|
709
|
+
##### `namespace`<sup>Optional</sup> <a name="namespace" id="cdk8s.Chart.property.namespace"></a>
|
|
432
710
|
|
|
433
711
|
```typescript
|
|
434
712
|
public readonly namespace: string;
|
|
435
713
|
```
|
|
436
714
|
|
|
437
|
-
- *Type:*
|
|
715
|
+
- *Type:* string
|
|
438
716
|
|
|
439
717
|
The default namespace for all objects in this chart.
|
|
440
718
|
|
|
441
719
|
---
|
|
442
720
|
|
|
443
721
|
|
|
444
|
-
### Helm <a name="cdk8s.Helm"></a>
|
|
722
|
+
### Helm <a name="Helm" id="cdk8s.Helm"></a>
|
|
445
723
|
|
|
446
724
|
Represents a Helm deployment.
|
|
447
725
|
|
|
448
726
|
Use this construct to import an existing Helm chart and incorporate it into your constructs.
|
|
449
727
|
|
|
450
|
-
#### Initializers <a name="cdk8s.Helm.Initializer"></a>
|
|
728
|
+
#### Initializers <a name="Initializers" id="cdk8s.Helm.Initializer"></a>
|
|
451
729
|
|
|
452
730
|
```typescript
|
|
453
731
|
import { Helm } from 'cdk8s'
|
|
@@ -455,49 +733,129 @@ import { Helm } from 'cdk8s'
|
|
|
455
733
|
new Helm(scope: Construct, id: string, props: HelmProps)
|
|
456
734
|
```
|
|
457
735
|
|
|
458
|
-
|
|
736
|
+
| **Name** | **Type** | **Description** |
|
|
737
|
+
| --- | --- | --- |
|
|
738
|
+
| <code><a href="#cdk8s.Helm.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
739
|
+
| <code><a href="#cdk8s.Helm.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
740
|
+
| <code><a href="#cdk8s.Helm.Initializer.parameter.props">props</a></code> | <code><a href="#cdk8s.HelmProps">HelmProps</a></code> | *No description.* |
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="cdk8s.Helm.Initializer.parameter.scope"></a>
|
|
745
|
+
|
|
746
|
+
- *Type:* constructs.Construct
|
|
747
|
+
|
|
748
|
+
---
|
|
749
|
+
|
|
750
|
+
##### `id`<sup>Required</sup> <a name="id" id="cdk8s.Helm.Initializer.parameter.id"></a>
|
|
751
|
+
|
|
752
|
+
- *Type:* string
|
|
753
|
+
|
|
754
|
+
---
|
|
755
|
+
|
|
756
|
+
##### `props`<sup>Required</sup> <a name="props" id="cdk8s.Helm.Initializer.parameter.props"></a>
|
|
757
|
+
|
|
758
|
+
- *Type:* <a href="#cdk8s.HelmProps">HelmProps</a>
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
459
763
|
|
|
460
|
-
|
|
764
|
+
| **Name** | **Description** |
|
|
765
|
+
| --- | --- |
|
|
766
|
+
| <code><a href="#cdk8s.Helm.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
461
767
|
|
|
462
768
|
---
|
|
463
769
|
|
|
464
|
-
##### `
|
|
770
|
+
##### `toString` <a name="toString" id="cdk8s.Helm.toString"></a>
|
|
771
|
+
|
|
772
|
+
```typescript
|
|
773
|
+
public toString(): string
|
|
774
|
+
```
|
|
465
775
|
|
|
466
|
-
|
|
776
|
+
Returns a string representation of this construct.
|
|
777
|
+
|
|
778
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
779
|
+
|
|
780
|
+
| **Name** | **Description** |
|
|
781
|
+
| --- | --- |
|
|
782
|
+
| <code><a href="#cdk8s.Helm.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
467
783
|
|
|
468
784
|
---
|
|
469
785
|
|
|
470
|
-
#####
|
|
786
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk8s.Helm.isConstruct"></a>
|
|
471
787
|
|
|
472
|
-
|
|
788
|
+
```typescript
|
|
789
|
+
import { Helm } from 'cdk8s'
|
|
790
|
+
|
|
791
|
+
Helm.isConstruct(x: any)
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
Checks if `x` is a construct.
|
|
795
|
+
|
|
796
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk8s.Helm.isConstruct.parameter.x"></a>
|
|
797
|
+
|
|
798
|
+
- *Type:* any
|
|
799
|
+
|
|
800
|
+
Any object.
|
|
473
801
|
|
|
474
802
|
---
|
|
475
803
|
|
|
804
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
476
805
|
|
|
806
|
+
| **Name** | **Type** | **Description** |
|
|
807
|
+
| --- | --- | --- |
|
|
808
|
+
| <code><a href="#cdk8s.Helm.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
809
|
+
| <code><a href="#cdk8s.Helm.property.apiObjects">apiObjects</a></code> | <code><a href="#cdk8s.ApiObject">ApiObject</a>[]</code> | Returns all the included API objects. |
|
|
810
|
+
| <code><a href="#cdk8s.Helm.property.releaseName">releaseName</a></code> | <code>string</code> | The helm release name. |
|
|
477
811
|
|
|
478
|
-
|
|
812
|
+
---
|
|
479
813
|
|
|
480
|
-
##### `
|
|
814
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk8s.Helm.property.node"></a>
|
|
815
|
+
|
|
816
|
+
```typescript
|
|
817
|
+
public readonly node: Node;
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
- *Type:* constructs.Node
|
|
821
|
+
|
|
822
|
+
The tree node.
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
##### `apiObjects`<sup>Required</sup> <a name="apiObjects" id="cdk8s.Helm.property.apiObjects"></a>
|
|
827
|
+
|
|
828
|
+
```typescript
|
|
829
|
+
public readonly apiObjects: ApiObject[];
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>[]
|
|
833
|
+
|
|
834
|
+
Returns all the included API objects.
|
|
835
|
+
|
|
836
|
+
---
|
|
837
|
+
|
|
838
|
+
##### `releaseName`<sup>Required</sup> <a name="releaseName" id="cdk8s.Helm.property.releaseName"></a>
|
|
481
839
|
|
|
482
840
|
```typescript
|
|
483
841
|
public readonly releaseName: string;
|
|
484
842
|
```
|
|
485
843
|
|
|
486
|
-
- *Type:*
|
|
844
|
+
- *Type:* string
|
|
487
845
|
|
|
488
846
|
The helm release name.
|
|
489
847
|
|
|
490
848
|
---
|
|
491
849
|
|
|
492
850
|
|
|
493
|
-
### Include <a name="cdk8s.Include"></a>
|
|
851
|
+
### Include <a name="Include" id="cdk8s.Include"></a>
|
|
494
852
|
|
|
495
853
|
Reads a YAML manifest from a file or a URL and defines all resources as API objects within the defined scope.
|
|
496
854
|
|
|
497
855
|
The names (`metadata.name`) of imported resources will be preserved as-is
|
|
498
856
|
from the manifest.
|
|
499
857
|
|
|
500
|
-
#### Initializers <a name="cdk8s.Include.Initializer"></a>
|
|
858
|
+
#### Initializers <a name="Initializers" id="cdk8s.Include.Initializer"></a>
|
|
501
859
|
|
|
502
860
|
```typescript
|
|
503
861
|
import { Include } from 'cdk8s'
|
|
@@ -505,48 +863,115 @@ import { Include } from 'cdk8s'
|
|
|
505
863
|
new Include(scope: Construct, id: string, props: IncludeProps)
|
|
506
864
|
```
|
|
507
865
|
|
|
508
|
-
|
|
866
|
+
| **Name** | **Type** | **Description** |
|
|
867
|
+
| --- | --- | --- |
|
|
868
|
+
| <code><a href="#cdk8s.Include.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
869
|
+
| <code><a href="#cdk8s.Include.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
870
|
+
| <code><a href="#cdk8s.Include.Initializer.parameter.props">props</a></code> | <code><a href="#cdk8s.IncludeProps">IncludeProps</a></code> | *No description.* |
|
|
509
871
|
|
|
510
|
-
|
|
872
|
+
---
|
|
873
|
+
|
|
874
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="cdk8s.Include.Initializer.parameter.scope"></a>
|
|
875
|
+
|
|
876
|
+
- *Type:* constructs.Construct
|
|
877
|
+
|
|
878
|
+
---
|
|
879
|
+
|
|
880
|
+
##### `id`<sup>Required</sup> <a name="id" id="cdk8s.Include.Initializer.parameter.id"></a>
|
|
881
|
+
|
|
882
|
+
- *Type:* string
|
|
511
883
|
|
|
512
884
|
---
|
|
513
885
|
|
|
514
|
-
##### `
|
|
886
|
+
##### `props`<sup>Required</sup> <a name="props" id="cdk8s.Include.Initializer.parameter.props"></a>
|
|
515
887
|
|
|
516
|
-
- *Type:*
|
|
888
|
+
- *Type:* <a href="#cdk8s.IncludeProps">IncludeProps</a>
|
|
517
889
|
|
|
518
890
|
---
|
|
519
891
|
|
|
520
|
-
|
|
892
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
521
893
|
|
|
522
|
-
|
|
894
|
+
| **Name** | **Description** |
|
|
895
|
+
| --- | --- |
|
|
896
|
+
| <code><a href="#cdk8s.Include.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
523
897
|
|
|
524
898
|
---
|
|
525
899
|
|
|
900
|
+
##### `toString` <a name="toString" id="cdk8s.Include.toString"></a>
|
|
901
|
+
|
|
902
|
+
```typescript
|
|
903
|
+
public toString(): string
|
|
904
|
+
```
|
|
905
|
+
|
|
906
|
+
Returns a string representation of this construct.
|
|
907
|
+
|
|
908
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
526
909
|
|
|
910
|
+
| **Name** | **Description** |
|
|
911
|
+
| --- | --- |
|
|
912
|
+
| <code><a href="#cdk8s.Include.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
527
913
|
|
|
528
|
-
|
|
914
|
+
---
|
|
529
915
|
|
|
530
|
-
#####
|
|
916
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk8s.Include.isConstruct"></a>
|
|
917
|
+
|
|
918
|
+
```typescript
|
|
919
|
+
import { Include } from 'cdk8s'
|
|
920
|
+
|
|
921
|
+
Include.isConstruct(x: any)
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
Checks if `x` is a construct.
|
|
925
|
+
|
|
926
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk8s.Include.isConstruct.parameter.x"></a>
|
|
927
|
+
|
|
928
|
+
- *Type:* any
|
|
929
|
+
|
|
930
|
+
Any object.
|
|
931
|
+
|
|
932
|
+
---
|
|
933
|
+
|
|
934
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
935
|
+
|
|
936
|
+
| **Name** | **Type** | **Description** |
|
|
937
|
+
| --- | --- | --- |
|
|
938
|
+
| <code><a href="#cdk8s.Include.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
939
|
+
| <code><a href="#cdk8s.Include.property.apiObjects">apiObjects</a></code> | <code><a href="#cdk8s.ApiObject">ApiObject</a>[]</code> | Returns all the included API objects. |
|
|
940
|
+
|
|
941
|
+
---
|
|
942
|
+
|
|
943
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk8s.Include.property.node"></a>
|
|
944
|
+
|
|
945
|
+
```typescript
|
|
946
|
+
public readonly node: Node;
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
- *Type:* constructs.Node
|
|
950
|
+
|
|
951
|
+
The tree node.
|
|
952
|
+
|
|
953
|
+
---
|
|
954
|
+
|
|
955
|
+
##### `apiObjects`<sup>Required</sup> <a name="apiObjects" id="cdk8s.Include.property.apiObjects"></a>
|
|
531
956
|
|
|
532
957
|
```typescript
|
|
533
958
|
public readonly apiObjects: ApiObject[];
|
|
534
959
|
```
|
|
535
960
|
|
|
536
|
-
- *Type:*
|
|
961
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>[]
|
|
537
962
|
|
|
538
963
|
Returns all the included API objects.
|
|
539
964
|
|
|
540
965
|
---
|
|
541
966
|
|
|
542
967
|
|
|
543
|
-
## Structs <a name="Structs"></a>
|
|
968
|
+
## Structs <a name="Structs" id="Structs"></a>
|
|
544
969
|
|
|
545
|
-
### ApiObjectMetadata <a name="cdk8s.ApiObjectMetadata"></a>
|
|
970
|
+
### ApiObjectMetadata <a name="ApiObjectMetadata" id="cdk8s.ApiObjectMetadata"></a>
|
|
546
971
|
|
|
547
972
|
Metadata associated with this object.
|
|
548
973
|
|
|
549
|
-
#### Initializer <a name="
|
|
974
|
+
#### Initializer <a name="Initializer" id="cdk8s.ApiObjectMetadata.Initializer"></a>
|
|
550
975
|
|
|
551
976
|
```typescript
|
|
552
977
|
import { ApiObjectMetadata } from 'cdk8s'
|
|
@@ -554,13 +979,26 @@ import { ApiObjectMetadata } from 'cdk8s'
|
|
|
554
979
|
const apiObjectMetadata: ApiObjectMetadata = { ... }
|
|
555
980
|
```
|
|
556
981
|
|
|
557
|
-
|
|
982
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
983
|
+
|
|
984
|
+
| **Name** | **Type** | **Description** |
|
|
985
|
+
| --- | --- | --- |
|
|
986
|
+
| <code><a href="#cdk8s.ApiObjectMetadata.property.annotations">annotations</a></code> | <code>{[ key: string ]: string}</code> | Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. |
|
|
987
|
+
| <code><a href="#cdk8s.ApiObjectMetadata.property.finalizers">finalizers</a></code> | <code>string[]</code> | Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion. |
|
|
988
|
+
| <code><a href="#cdk8s.ApiObjectMetadata.property.labels">labels</a></code> | <code>{[ key: string ]: string}</code> | Map of string keys and values that can be used to organize and categorize (scope and select) objects. |
|
|
989
|
+
| <code><a href="#cdk8s.ApiObjectMetadata.property.name">name</a></code> | <code>string</code> | The unique, namespace-global, name of this object inside the Kubernetes cluster. |
|
|
990
|
+
| <code><a href="#cdk8s.ApiObjectMetadata.property.namespace">namespace</a></code> | <code>string</code> | Namespace defines the space within each name must be unique. |
|
|
991
|
+
| <code><a href="#cdk8s.ApiObjectMetadata.property.ownerReferences">ownerReferences</a></code> | <code><a href="#cdk8s.OwnerReference">OwnerReference</a>[]</code> | List of objects depended by this object. |
|
|
992
|
+
|
|
993
|
+
---
|
|
994
|
+
|
|
995
|
+
##### `annotations`<sup>Optional</sup> <a name="annotations" id="cdk8s.ApiObjectMetadata.property.annotations"></a>
|
|
558
996
|
|
|
559
997
|
```typescript
|
|
560
998
|
public readonly annotations: {[ key: string ]: string};
|
|
561
999
|
```
|
|
562
1000
|
|
|
563
|
-
- *Type:* {[ key: string ]:
|
|
1001
|
+
- *Type:* {[ key: string ]: string}
|
|
564
1002
|
- *Default:* No annotations.
|
|
565
1003
|
|
|
566
1004
|
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
|
|
@@ -568,17 +1006,17 @@ Annotations is an unstructured key value map stored with a resource that may be
|
|
|
568
1006
|
They are not queryable and should be
|
|
569
1007
|
preserved when modifying objects.
|
|
570
1008
|
|
|
571
|
-
> http://kubernetes.io/docs/user-guide/annotations
|
|
1009
|
+
> [http://kubernetes.io/docs/user-guide/annotations](http://kubernetes.io/docs/user-guide/annotations)
|
|
572
1010
|
|
|
573
1011
|
---
|
|
574
1012
|
|
|
575
|
-
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.finalizers"></a>
|
|
1013
|
+
##### `finalizers`<sup>Optional</sup> <a name="finalizers" id="cdk8s.ApiObjectMetadata.property.finalizers"></a>
|
|
576
1014
|
|
|
577
1015
|
```typescript
|
|
578
1016
|
public readonly finalizers: string[];
|
|
579
1017
|
```
|
|
580
1018
|
|
|
581
|
-
- *Type:*
|
|
1019
|
+
- *Type:* string[]
|
|
582
1020
|
- *Default:* No finalizers.
|
|
583
1021
|
|
|
584
1022
|
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
@@ -597,34 +1035,34 @@ in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
|
597
1035
|
are free to order amongst themselves and are not vulnerable to ordering
|
|
598
1036
|
changes in the list.
|
|
599
1037
|
|
|
600
|
-
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
1038
|
+
> [https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/)
|
|
601
1039
|
|
|
602
1040
|
---
|
|
603
1041
|
|
|
604
|
-
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.labels"></a>
|
|
1042
|
+
##### `labels`<sup>Optional</sup> <a name="labels" id="cdk8s.ApiObjectMetadata.property.labels"></a>
|
|
605
1043
|
|
|
606
1044
|
```typescript
|
|
607
1045
|
public readonly labels: {[ key: string ]: string};
|
|
608
1046
|
```
|
|
609
1047
|
|
|
610
|
-
- *Type:* {[ key: string ]:
|
|
1048
|
+
- *Type:* {[ key: string ]: string}
|
|
611
1049
|
- *Default:* No labels.
|
|
612
1050
|
|
|
613
1051
|
Map of string keys and values that can be used to organize and categorize (scope and select) objects.
|
|
614
1052
|
|
|
615
1053
|
May match selectors of replication controllers and services.
|
|
616
1054
|
|
|
617
|
-
> http://kubernetes.io/docs/user-guide/labels
|
|
1055
|
+
> [http://kubernetes.io/docs/user-guide/labels](http://kubernetes.io/docs/user-guide/labels)
|
|
618
1056
|
|
|
619
1057
|
---
|
|
620
1058
|
|
|
621
|
-
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.name"></a>
|
|
1059
|
+
##### `name`<sup>Optional</sup> <a name="name" id="cdk8s.ApiObjectMetadata.property.name"></a>
|
|
622
1060
|
|
|
623
1061
|
```typescript
|
|
624
1062
|
public readonly name: string;
|
|
625
1063
|
```
|
|
626
1064
|
|
|
627
|
-
- *Type:*
|
|
1065
|
+
- *Type:* string
|
|
628
1066
|
- *Default:* an app-unique name generated by the chart
|
|
629
1067
|
|
|
630
1068
|
The unique, namespace-global, name of this object inside the Kubernetes cluster.
|
|
@@ -644,13 +1082,13 @@ leave this unspecified.
|
|
|
644
1082
|
|
|
645
1083
|
---
|
|
646
1084
|
|
|
647
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.namespace"></a>
|
|
1085
|
+
##### `namespace`<sup>Optional</sup> <a name="namespace" id="cdk8s.ApiObjectMetadata.property.namespace"></a>
|
|
648
1086
|
|
|
649
1087
|
```typescript
|
|
650
1088
|
public readonly namespace: string;
|
|
651
1089
|
```
|
|
652
1090
|
|
|
653
|
-
- *Type:*
|
|
1091
|
+
- *Type:* string
|
|
654
1092
|
- *Default:* undefined (will be assigned to the 'default' namespace)
|
|
655
1093
|
|
|
656
1094
|
Namespace defines the space within each name must be unique.
|
|
@@ -660,13 +1098,13 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
660
1098
|
|
|
661
1099
|
---
|
|
662
1100
|
|
|
663
|
-
##### `ownerReferences`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.ownerReferences"></a>
|
|
1101
|
+
##### `ownerReferences`<sup>Optional</sup> <a name="ownerReferences" id="cdk8s.ApiObjectMetadata.property.ownerReferences"></a>
|
|
664
1102
|
|
|
665
1103
|
```typescript
|
|
666
1104
|
public readonly ownerReferences: OwnerReference[];
|
|
667
1105
|
```
|
|
668
1106
|
|
|
669
|
-
- *Type:*
|
|
1107
|
+
- *Type:* <a href="#cdk8s.OwnerReference">OwnerReference</a>[]
|
|
670
1108
|
- *Default:* automatically set by Kubernetes
|
|
671
1109
|
|
|
672
1110
|
List of objects depended by this object.
|
|
@@ -684,15 +1122,15 @@ relationships manually by changing the value of this field. However, you
|
|
|
684
1122
|
usually don't need to and can allow Kubernetes to automatically manage the
|
|
685
1123
|
relationships.
|
|
686
1124
|
|
|
687
|
-
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
1125
|
+
> [https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/](https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/)
|
|
688
1126
|
|
|
689
1127
|
---
|
|
690
1128
|
|
|
691
|
-
### ApiObjectMetadataDefinitionOptions <a name="cdk8s.ApiObjectMetadataDefinitionOptions"></a>
|
|
1129
|
+
### ApiObjectMetadataDefinitionOptions <a name="ApiObjectMetadataDefinitionOptions" id="cdk8s.ApiObjectMetadataDefinitionOptions"></a>
|
|
692
1130
|
|
|
693
1131
|
Options for `ApiObjectMetadataDefinition`.
|
|
694
1132
|
|
|
695
|
-
#### Initializer <a name="
|
|
1133
|
+
#### Initializer <a name="Initializer" id="cdk8s.ApiObjectMetadataDefinitionOptions.Initializer"></a>
|
|
696
1134
|
|
|
697
1135
|
```typescript
|
|
698
1136
|
import { ApiObjectMetadataDefinitionOptions } from 'cdk8s'
|
|
@@ -700,13 +1138,27 @@ import { ApiObjectMetadataDefinitionOptions } from 'cdk8s'
|
|
|
700
1138
|
const apiObjectMetadataDefinitionOptions: ApiObjectMetadataDefinitionOptions = { ... }
|
|
701
1139
|
```
|
|
702
1140
|
|
|
703
|
-
|
|
1141
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1142
|
+
|
|
1143
|
+
| **Name** | **Type** | **Description** |
|
|
1144
|
+
| --- | --- | --- |
|
|
1145
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.annotations">annotations</a></code> | <code>{[ key: string ]: string}</code> | Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. |
|
|
1146
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.finalizers">finalizers</a></code> | <code>string[]</code> | Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion. |
|
|
1147
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.labels">labels</a></code> | <code>{[ key: string ]: string}</code> | Map of string keys and values that can be used to organize and categorize (scope and select) objects. |
|
|
1148
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.name">name</a></code> | <code>string</code> | The unique, namespace-global, name of this object inside the Kubernetes cluster. |
|
|
1149
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.namespace">namespace</a></code> | <code>string</code> | Namespace defines the space within each name must be unique. |
|
|
1150
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.ownerReferences">ownerReferences</a></code> | <code><a href="#cdk8s.OwnerReference">OwnerReference</a>[]</code> | List of objects depended by this object. |
|
|
1151
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions.property.apiObject">apiObject</a></code> | <code><a href="#cdk8s.ApiObject">ApiObject</a></code> | Which ApiObject instance is the metadata attached to. |
|
|
1152
|
+
|
|
1153
|
+
---
|
|
1154
|
+
|
|
1155
|
+
##### `annotations`<sup>Optional</sup> <a name="annotations" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.annotations"></a>
|
|
704
1156
|
|
|
705
1157
|
```typescript
|
|
706
1158
|
public readonly annotations: {[ key: string ]: string};
|
|
707
1159
|
```
|
|
708
1160
|
|
|
709
|
-
- *Type:* {[ key: string ]:
|
|
1161
|
+
- *Type:* {[ key: string ]: string}
|
|
710
1162
|
- *Default:* No annotations.
|
|
711
1163
|
|
|
712
1164
|
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
|
|
@@ -714,17 +1166,17 @@ Annotations is an unstructured key value map stored with a resource that may be
|
|
|
714
1166
|
They are not queryable and should be
|
|
715
1167
|
preserved when modifying objects.
|
|
716
1168
|
|
|
717
|
-
> http://kubernetes.io/docs/user-guide/annotations
|
|
1169
|
+
> [http://kubernetes.io/docs/user-guide/annotations](http://kubernetes.io/docs/user-guide/annotations)
|
|
718
1170
|
|
|
719
1171
|
---
|
|
720
1172
|
|
|
721
|
-
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.finalizers"></a>
|
|
1173
|
+
##### `finalizers`<sup>Optional</sup> <a name="finalizers" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.finalizers"></a>
|
|
722
1174
|
|
|
723
1175
|
```typescript
|
|
724
1176
|
public readonly finalizers: string[];
|
|
725
1177
|
```
|
|
726
1178
|
|
|
727
|
-
- *Type:*
|
|
1179
|
+
- *Type:* string[]
|
|
728
1180
|
- *Default:* No finalizers.
|
|
729
1181
|
|
|
730
1182
|
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
@@ -743,34 +1195,34 @@ in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
|
743
1195
|
are free to order amongst themselves and are not vulnerable to ordering
|
|
744
1196
|
changes in the list.
|
|
745
1197
|
|
|
746
|
-
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
1198
|
+
> [https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/](https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/)
|
|
747
1199
|
|
|
748
1200
|
---
|
|
749
1201
|
|
|
750
|
-
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.labels"></a>
|
|
1202
|
+
##### `labels`<sup>Optional</sup> <a name="labels" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.labels"></a>
|
|
751
1203
|
|
|
752
1204
|
```typescript
|
|
753
1205
|
public readonly labels: {[ key: string ]: string};
|
|
754
1206
|
```
|
|
755
1207
|
|
|
756
|
-
- *Type:* {[ key: string ]:
|
|
1208
|
+
- *Type:* {[ key: string ]: string}
|
|
757
1209
|
- *Default:* No labels.
|
|
758
1210
|
|
|
759
1211
|
Map of string keys and values that can be used to organize and categorize (scope and select) objects.
|
|
760
1212
|
|
|
761
1213
|
May match selectors of replication controllers and services.
|
|
762
1214
|
|
|
763
|
-
> http://kubernetes.io/docs/user-guide/labels
|
|
1215
|
+
> [http://kubernetes.io/docs/user-guide/labels](http://kubernetes.io/docs/user-guide/labels)
|
|
764
1216
|
|
|
765
1217
|
---
|
|
766
1218
|
|
|
767
|
-
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.name"></a>
|
|
1219
|
+
##### `name`<sup>Optional</sup> <a name="name" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.name"></a>
|
|
768
1220
|
|
|
769
1221
|
```typescript
|
|
770
1222
|
public readonly name: string;
|
|
771
1223
|
```
|
|
772
1224
|
|
|
773
|
-
- *Type:*
|
|
1225
|
+
- *Type:* string
|
|
774
1226
|
- *Default:* an app-unique name generated by the chart
|
|
775
1227
|
|
|
776
1228
|
The unique, namespace-global, name of this object inside the Kubernetes cluster.
|
|
@@ -790,13 +1242,13 @@ leave this unspecified.
|
|
|
790
1242
|
|
|
791
1243
|
---
|
|
792
1244
|
|
|
793
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.namespace"></a>
|
|
1245
|
+
##### `namespace`<sup>Optional</sup> <a name="namespace" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.namespace"></a>
|
|
794
1246
|
|
|
795
1247
|
```typescript
|
|
796
1248
|
public readonly namespace: string;
|
|
797
1249
|
```
|
|
798
1250
|
|
|
799
|
-
- *Type:*
|
|
1251
|
+
- *Type:* string
|
|
800
1252
|
- *Default:* undefined (will be assigned to the 'default' namespace)
|
|
801
1253
|
|
|
802
1254
|
Namespace defines the space within each name must be unique.
|
|
@@ -806,13 +1258,13 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
806
1258
|
|
|
807
1259
|
---
|
|
808
1260
|
|
|
809
|
-
##### `ownerReferences`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.ownerReferences"></a>
|
|
1261
|
+
##### `ownerReferences`<sup>Optional</sup> <a name="ownerReferences" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.ownerReferences"></a>
|
|
810
1262
|
|
|
811
1263
|
```typescript
|
|
812
1264
|
public readonly ownerReferences: OwnerReference[];
|
|
813
1265
|
```
|
|
814
1266
|
|
|
815
|
-
- *Type:*
|
|
1267
|
+
- *Type:* <a href="#cdk8s.OwnerReference">OwnerReference</a>[]
|
|
816
1268
|
- *Default:* automatically set by Kubernetes
|
|
817
1269
|
|
|
818
1270
|
List of objects depended by this object.
|
|
@@ -830,27 +1282,27 @@ relationships manually by changing the value of this field. However, you
|
|
|
830
1282
|
usually don't need to and can allow Kubernetes to automatically manage the
|
|
831
1283
|
relationships.
|
|
832
1284
|
|
|
833
|
-
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
1285
|
+
> [https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/](https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/)
|
|
834
1286
|
|
|
835
1287
|
---
|
|
836
1288
|
|
|
837
|
-
##### `apiObject`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.apiObject"></a>
|
|
1289
|
+
##### `apiObject`<sup>Required</sup> <a name="apiObject" id="cdk8s.ApiObjectMetadataDefinitionOptions.property.apiObject"></a>
|
|
838
1290
|
|
|
839
1291
|
```typescript
|
|
840
1292
|
public readonly apiObject: ApiObject;
|
|
841
1293
|
```
|
|
842
1294
|
|
|
843
|
-
- *Type:*
|
|
1295
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>
|
|
844
1296
|
|
|
845
1297
|
Which ApiObject instance is the metadata attached to.
|
|
846
1298
|
|
|
847
1299
|
---
|
|
848
1300
|
|
|
849
|
-
### ApiObjectProps <a name="cdk8s.ApiObjectProps"></a>
|
|
1301
|
+
### ApiObjectProps <a name="ApiObjectProps" id="cdk8s.ApiObjectProps"></a>
|
|
850
1302
|
|
|
851
1303
|
Options for defining API objects.
|
|
852
1304
|
|
|
853
|
-
#### Initializer <a name="
|
|
1305
|
+
#### Initializer <a name="Initializer" id="cdk8s.ApiObjectProps.Initializer"></a>
|
|
854
1306
|
|
|
855
1307
|
```typescript
|
|
856
1308
|
import { ApiObjectProps } from 'cdk8s'
|
|
@@ -858,37 +1310,47 @@ import { ApiObjectProps } from 'cdk8s'
|
|
|
858
1310
|
const apiObjectProps: ApiObjectProps = { ... }
|
|
859
1311
|
```
|
|
860
1312
|
|
|
861
|
-
|
|
1313
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1314
|
+
|
|
1315
|
+
| **Name** | **Type** | **Description** |
|
|
1316
|
+
| --- | --- | --- |
|
|
1317
|
+
| <code><a href="#cdk8s.ApiObjectProps.property.apiVersion">apiVersion</a></code> | <code>string</code> | API version. |
|
|
1318
|
+
| <code><a href="#cdk8s.ApiObjectProps.property.kind">kind</a></code> | <code>string</code> | Resource kind. |
|
|
1319
|
+
| <code><a href="#cdk8s.ApiObjectProps.property.metadata">metadata</a></code> | <code><a href="#cdk8s.ApiObjectMetadata">ApiObjectMetadata</a></code> | Object metadata. |
|
|
1320
|
+
|
|
1321
|
+
---
|
|
1322
|
+
|
|
1323
|
+
##### `apiVersion`<sup>Required</sup> <a name="apiVersion" id="cdk8s.ApiObjectProps.property.apiVersion"></a>
|
|
862
1324
|
|
|
863
1325
|
```typescript
|
|
864
1326
|
public readonly apiVersion: string;
|
|
865
1327
|
```
|
|
866
1328
|
|
|
867
|
-
- *Type:*
|
|
1329
|
+
- *Type:* string
|
|
868
1330
|
|
|
869
1331
|
API version.
|
|
870
1332
|
|
|
871
1333
|
---
|
|
872
1334
|
|
|
873
|
-
##### `kind`<sup>Required</sup> <a name="cdk8s.ApiObjectProps.property.kind"></a>
|
|
1335
|
+
##### `kind`<sup>Required</sup> <a name="kind" id="cdk8s.ApiObjectProps.property.kind"></a>
|
|
874
1336
|
|
|
875
1337
|
```typescript
|
|
876
1338
|
public readonly kind: string;
|
|
877
1339
|
```
|
|
878
1340
|
|
|
879
|
-
- *Type:*
|
|
1341
|
+
- *Type:* string
|
|
880
1342
|
|
|
881
1343
|
Resource kind.
|
|
882
1344
|
|
|
883
1345
|
---
|
|
884
1346
|
|
|
885
|
-
##### `metadata`<sup>Optional</sup> <a name="cdk8s.ApiObjectProps.property.metadata"></a>
|
|
1347
|
+
##### `metadata`<sup>Optional</sup> <a name="metadata" id="cdk8s.ApiObjectProps.property.metadata"></a>
|
|
886
1348
|
|
|
887
1349
|
```typescript
|
|
888
1350
|
public readonly metadata: ApiObjectMetadata;
|
|
889
1351
|
```
|
|
890
1352
|
|
|
891
|
-
- *Type:*
|
|
1353
|
+
- *Type:* <a href="#cdk8s.ApiObjectMetadata">ApiObjectMetadata</a>
|
|
892
1354
|
|
|
893
1355
|
Object metadata.
|
|
894
1356
|
|
|
@@ -897,9 +1359,9 @@ framework based on the path of the construct within thes construct tree.
|
|
|
897
1359
|
|
|
898
1360
|
---
|
|
899
1361
|
|
|
900
|
-
### AppProps <a name="cdk8s.AppProps"></a>
|
|
1362
|
+
### AppProps <a name="AppProps" id="cdk8s.AppProps"></a>
|
|
901
1363
|
|
|
902
|
-
#### Initializer <a name="
|
|
1364
|
+
#### Initializer <a name="Initializer" id="cdk8s.AppProps.Initializer"></a>
|
|
903
1365
|
|
|
904
1366
|
```typescript
|
|
905
1367
|
import { AppProps } from 'cdk8s'
|
|
@@ -907,13 +1369,25 @@ import { AppProps } from 'cdk8s'
|
|
|
907
1369
|
const appProps: AppProps = { ... }
|
|
908
1370
|
```
|
|
909
1371
|
|
|
910
|
-
|
|
1372
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1373
|
+
|
|
1374
|
+
| **Name** | **Type** | **Description** |
|
|
1375
|
+
| --- | --- | --- |
|
|
1376
|
+
| <code><a href="#cdk8s.AppProps.property.outdir">outdir</a></code> | <code>string</code> | The directory to output Kubernetes manifests. |
|
|
1377
|
+
| <code><a href="#cdk8s.AppProps.property.outputFileExtension">outputFileExtension</a></code> | <code>string</code> | The file extension to use for rendered YAML files. |
|
|
1378
|
+
| <code><a href="#cdk8s.AppProps.property.recordConstructMetadata">recordConstructMetadata</a></code> | <code>boolean</code> | When set to true, the output directory will contain a `construct-metadata.json` file that holds construct related metadata on every resource in the app. |
|
|
1379
|
+
| <code><a href="#cdk8s.AppProps.property.resolvers">resolvers</a></code> | <code><a href="#cdk8s.IResolver">IResolver</a>[]</code> | A list of resolvers that can be used to replace property values before they are written to the manifest file. |
|
|
1380
|
+
| <code><a href="#cdk8s.AppProps.property.yamlOutputType">yamlOutputType</a></code> | <code><a href="#cdk8s.YamlOutputType">YamlOutputType</a></code> | How to divide the YAML output into files. |
|
|
1381
|
+
|
|
1382
|
+
---
|
|
1383
|
+
|
|
1384
|
+
##### `outdir`<sup>Optional</sup> <a name="outdir" id="cdk8s.AppProps.property.outdir"></a>
|
|
911
1385
|
|
|
912
1386
|
```typescript
|
|
913
1387
|
public readonly outdir: string;
|
|
914
1388
|
```
|
|
915
1389
|
|
|
916
|
-
- *Type:*
|
|
1390
|
+
- *Type:* string
|
|
917
1391
|
- *Default:* CDK8S_OUTDIR if defined, otherwise "dist"
|
|
918
1392
|
|
|
919
1393
|
The directory to output Kubernetes manifests.
|
|
@@ -928,39 +1402,39 @@ This property is intended for internal and testing use.
|
|
|
928
1402
|
|
|
929
1403
|
---
|
|
930
1404
|
|
|
931
|
-
##### `outputFileExtension`<sup>Optional</sup> <a name="cdk8s.AppProps.property.outputFileExtension"></a>
|
|
1405
|
+
##### `outputFileExtension`<sup>Optional</sup> <a name="outputFileExtension" id="cdk8s.AppProps.property.outputFileExtension"></a>
|
|
932
1406
|
|
|
933
1407
|
```typescript
|
|
934
1408
|
public readonly outputFileExtension: string;
|
|
935
1409
|
```
|
|
936
1410
|
|
|
937
|
-
- *Type:*
|
|
1411
|
+
- *Type:* string
|
|
938
1412
|
- *Default:* .k8s.yaml
|
|
939
1413
|
|
|
940
1414
|
The file extension to use for rendered YAML files.
|
|
941
1415
|
|
|
942
1416
|
---
|
|
943
1417
|
|
|
944
|
-
##### `recordConstructMetadata`<sup>Optional</sup> <a name="cdk8s.AppProps.property.recordConstructMetadata"></a>
|
|
1418
|
+
##### `recordConstructMetadata`<sup>Optional</sup> <a name="recordConstructMetadata" id="cdk8s.AppProps.property.recordConstructMetadata"></a>
|
|
945
1419
|
|
|
946
1420
|
```typescript
|
|
947
1421
|
public readonly recordConstructMetadata: boolean;
|
|
948
1422
|
```
|
|
949
1423
|
|
|
950
|
-
- *Type:*
|
|
1424
|
+
- *Type:* boolean
|
|
951
1425
|
- *Default:* false
|
|
952
1426
|
|
|
953
1427
|
When set to true, the output directory will contain a `construct-metadata.json` file that holds construct related metadata on every resource in the app.
|
|
954
1428
|
|
|
955
1429
|
---
|
|
956
1430
|
|
|
957
|
-
##### `resolvers`<sup>Optional</sup> <a name="cdk8s.AppProps.property.resolvers"></a>
|
|
1431
|
+
##### `resolvers`<sup>Optional</sup> <a name="resolvers" id="cdk8s.AppProps.property.resolvers"></a>
|
|
958
1432
|
|
|
959
1433
|
```typescript
|
|
960
1434
|
public readonly resolvers: IResolver[];
|
|
961
1435
|
```
|
|
962
1436
|
|
|
963
|
-
- *Type:*
|
|
1437
|
+
- *Type:* <a href="#cdk8s.IResolver">IResolver</a>[]
|
|
964
1438
|
- *Default:* no resolvers.
|
|
965
1439
|
|
|
966
1440
|
A list of resolvers that can be used to replace property values before they are written to the manifest file.
|
|
@@ -969,26 +1443,26 @@ When multiple resolvers are passed,
|
|
|
969
1443
|
they are invoked by order in the list, and only the first one that applies
|
|
970
1444
|
(e.g calls `context.replaceValue`) is invoked.
|
|
971
1445
|
|
|
972
|
-
> https://cdk8s.io/docs/latest/basics/app/#resolvers
|
|
1446
|
+
> [https://cdk8s.io/docs/latest/basics/app/#resolvers](https://cdk8s.io/docs/latest/basics/app/#resolvers)
|
|
973
1447
|
|
|
974
1448
|
---
|
|
975
1449
|
|
|
976
|
-
##### `yamlOutputType`<sup>Optional</sup> <a name="cdk8s.AppProps.property.yamlOutputType"></a>
|
|
1450
|
+
##### `yamlOutputType`<sup>Optional</sup> <a name="yamlOutputType" id="cdk8s.AppProps.property.yamlOutputType"></a>
|
|
977
1451
|
|
|
978
1452
|
```typescript
|
|
979
1453
|
public readonly yamlOutputType: YamlOutputType;
|
|
980
1454
|
```
|
|
981
1455
|
|
|
982
|
-
- *Type:*
|
|
1456
|
+
- *Type:* <a href="#cdk8s.YamlOutputType">YamlOutputType</a>
|
|
983
1457
|
- *Default:* YamlOutputType.FILE_PER_CHART
|
|
984
1458
|
|
|
985
1459
|
How to divide the YAML output into files.
|
|
986
1460
|
|
|
987
1461
|
---
|
|
988
1462
|
|
|
989
|
-
### ChartProps <a name="cdk8s.ChartProps"></a>
|
|
1463
|
+
### ChartProps <a name="ChartProps" id="cdk8s.ChartProps"></a>
|
|
990
1464
|
|
|
991
|
-
#### Initializer <a name="
|
|
1465
|
+
#### Initializer <a name="Initializer" id="cdk8s.ChartProps.Initializer"></a>
|
|
992
1466
|
|
|
993
1467
|
```typescript
|
|
994
1468
|
import { ChartProps } from 'cdk8s'
|
|
@@ -996,13 +1470,23 @@ import { ChartProps } from 'cdk8s'
|
|
|
996
1470
|
const chartProps: ChartProps = { ... }
|
|
997
1471
|
```
|
|
998
1472
|
|
|
999
|
-
|
|
1473
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1474
|
+
|
|
1475
|
+
| **Name** | **Type** | **Description** |
|
|
1476
|
+
| --- | --- | --- |
|
|
1477
|
+
| <code><a href="#cdk8s.ChartProps.property.disableResourceNameHashes">disableResourceNameHashes</a></code> | <code>boolean</code> | The autogenerated resource name by default is suffixed with a stable hash of the construct path. |
|
|
1478
|
+
| <code><a href="#cdk8s.ChartProps.property.labels">labels</a></code> | <code>{[ key: string ]: string}</code> | Labels to apply to all resources in this chart. |
|
|
1479
|
+
| <code><a href="#cdk8s.ChartProps.property.namespace">namespace</a></code> | <code>string</code> | The default namespace for all objects defined in this chart (directly or indirectly). |
|
|
1480
|
+
|
|
1481
|
+
---
|
|
1482
|
+
|
|
1483
|
+
##### `disableResourceNameHashes`<sup>Optional</sup> <a name="disableResourceNameHashes" id="cdk8s.ChartProps.property.disableResourceNameHashes"></a>
|
|
1000
1484
|
|
|
1001
1485
|
```typescript
|
|
1002
1486
|
public readonly disableResourceNameHashes: boolean;
|
|
1003
1487
|
```
|
|
1004
1488
|
|
|
1005
|
-
- *Type:*
|
|
1489
|
+
- *Type:* boolean
|
|
1006
1490
|
- *Default:* false
|
|
1007
1491
|
|
|
1008
1492
|
The autogenerated resource name by default is suffixed with a stable hash of the construct path.
|
|
@@ -1011,26 +1495,26 @@ Setting this property to true drops the hash suffix.
|
|
|
1011
1495
|
|
|
1012
1496
|
---
|
|
1013
1497
|
|
|
1014
|
-
##### `labels`<sup>Optional</sup> <a name="cdk8s.ChartProps.property.labels"></a>
|
|
1498
|
+
##### `labels`<sup>Optional</sup> <a name="labels" id="cdk8s.ChartProps.property.labels"></a>
|
|
1015
1499
|
|
|
1016
1500
|
```typescript
|
|
1017
1501
|
public readonly labels: {[ key: string ]: string};
|
|
1018
1502
|
```
|
|
1019
1503
|
|
|
1020
|
-
- *Type:* {[ key: string ]:
|
|
1504
|
+
- *Type:* {[ key: string ]: string}
|
|
1021
1505
|
- *Default:* no common labels
|
|
1022
1506
|
|
|
1023
1507
|
Labels to apply to all resources in this chart.
|
|
1024
1508
|
|
|
1025
1509
|
---
|
|
1026
1510
|
|
|
1027
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ChartProps.property.namespace"></a>
|
|
1511
|
+
##### `namespace`<sup>Optional</sup> <a name="namespace" id="cdk8s.ChartProps.property.namespace"></a>
|
|
1028
1512
|
|
|
1029
1513
|
```typescript
|
|
1030
1514
|
public readonly namespace: string;
|
|
1031
1515
|
```
|
|
1032
1516
|
|
|
1033
|
-
- *Type:*
|
|
1517
|
+
- *Type:* string
|
|
1034
1518
|
- *Default:* no namespace is synthesized (usually this implies "default")
|
|
1035
1519
|
|
|
1036
1520
|
The default namespace for all objects defined in this chart (directly or indirectly).
|
|
@@ -1040,14 +1524,14 @@ This namespace will only apply to objects that don't have a
|
|
|
1040
1524
|
|
|
1041
1525
|
---
|
|
1042
1526
|
|
|
1043
|
-
### CronOptions <a name="cdk8s.CronOptions"></a>
|
|
1527
|
+
### CronOptions <a name="CronOptions" id="cdk8s.CronOptions"></a>
|
|
1044
1528
|
|
|
1045
1529
|
Options to configure a cron expression.
|
|
1046
1530
|
|
|
1047
1531
|
All fields are strings so you can use complex expressions. Absence of
|
|
1048
1532
|
a field implies '*'
|
|
1049
1533
|
|
|
1050
|
-
#### Initializer <a name="
|
|
1534
|
+
#### Initializer <a name="Initializer" id="cdk8s.CronOptions.Initializer"></a>
|
|
1051
1535
|
|
|
1052
1536
|
```typescript
|
|
1053
1537
|
import { CronOptions } from 'cdk8s'
|
|
@@ -1055,74 +1539,86 @@ import { CronOptions } from 'cdk8s'
|
|
|
1055
1539
|
const cronOptions: CronOptions = { ... }
|
|
1056
1540
|
```
|
|
1057
1541
|
|
|
1058
|
-
|
|
1542
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1543
|
+
|
|
1544
|
+
| **Name** | **Type** | **Description** |
|
|
1545
|
+
| --- | --- | --- |
|
|
1546
|
+
| <code><a href="#cdk8s.CronOptions.property.day">day</a></code> | <code>string</code> | The day of the month to run this rule at. |
|
|
1547
|
+
| <code><a href="#cdk8s.CronOptions.property.hour">hour</a></code> | <code>string</code> | The hour to run this rule at. |
|
|
1548
|
+
| <code><a href="#cdk8s.CronOptions.property.minute">minute</a></code> | <code>string</code> | The minute to run this rule at. |
|
|
1549
|
+
| <code><a href="#cdk8s.CronOptions.property.month">month</a></code> | <code>string</code> | The month to run this rule at. |
|
|
1550
|
+
| <code><a href="#cdk8s.CronOptions.property.weekDay">weekDay</a></code> | <code>string</code> | The day of the week to run this rule at. |
|
|
1551
|
+
|
|
1552
|
+
---
|
|
1553
|
+
|
|
1554
|
+
##### `day`<sup>Optional</sup> <a name="day" id="cdk8s.CronOptions.property.day"></a>
|
|
1059
1555
|
|
|
1060
1556
|
```typescript
|
|
1061
1557
|
public readonly day: string;
|
|
1062
1558
|
```
|
|
1063
1559
|
|
|
1064
|
-
- *Type:*
|
|
1560
|
+
- *Type:* string
|
|
1065
1561
|
- *Default:* Every day of the month
|
|
1066
1562
|
|
|
1067
1563
|
The day of the month to run this rule at.
|
|
1068
1564
|
|
|
1069
1565
|
---
|
|
1070
1566
|
|
|
1071
|
-
##### `hour`<sup>Optional</sup> <a name="cdk8s.CronOptions.property.hour"></a>
|
|
1567
|
+
##### `hour`<sup>Optional</sup> <a name="hour" id="cdk8s.CronOptions.property.hour"></a>
|
|
1072
1568
|
|
|
1073
1569
|
```typescript
|
|
1074
1570
|
public readonly hour: string;
|
|
1075
1571
|
```
|
|
1076
1572
|
|
|
1077
|
-
- *Type:*
|
|
1573
|
+
- *Type:* string
|
|
1078
1574
|
- *Default:* Every hour
|
|
1079
1575
|
|
|
1080
1576
|
The hour to run this rule at.
|
|
1081
1577
|
|
|
1082
1578
|
---
|
|
1083
1579
|
|
|
1084
|
-
##### `minute`<sup>Optional</sup> <a name="cdk8s.CronOptions.property.minute"></a>
|
|
1580
|
+
##### `minute`<sup>Optional</sup> <a name="minute" id="cdk8s.CronOptions.property.minute"></a>
|
|
1085
1581
|
|
|
1086
1582
|
```typescript
|
|
1087
1583
|
public readonly minute: string;
|
|
1088
1584
|
```
|
|
1089
1585
|
|
|
1090
|
-
- *Type:*
|
|
1586
|
+
- *Type:* string
|
|
1091
1587
|
- *Default:* Every minute
|
|
1092
1588
|
|
|
1093
1589
|
The minute to run this rule at.
|
|
1094
1590
|
|
|
1095
1591
|
---
|
|
1096
1592
|
|
|
1097
|
-
##### `month`<sup>Optional</sup> <a name="cdk8s.CronOptions.property.month"></a>
|
|
1593
|
+
##### `month`<sup>Optional</sup> <a name="month" id="cdk8s.CronOptions.property.month"></a>
|
|
1098
1594
|
|
|
1099
1595
|
```typescript
|
|
1100
1596
|
public readonly month: string;
|
|
1101
1597
|
```
|
|
1102
1598
|
|
|
1103
|
-
- *Type:*
|
|
1599
|
+
- *Type:* string
|
|
1104
1600
|
- *Default:* Every month
|
|
1105
1601
|
|
|
1106
1602
|
The month to run this rule at.
|
|
1107
1603
|
|
|
1108
1604
|
---
|
|
1109
1605
|
|
|
1110
|
-
##### `weekDay`<sup>Optional</sup> <a name="cdk8s.CronOptions.property.weekDay"></a>
|
|
1606
|
+
##### `weekDay`<sup>Optional</sup> <a name="weekDay" id="cdk8s.CronOptions.property.weekDay"></a>
|
|
1111
1607
|
|
|
1112
1608
|
```typescript
|
|
1113
1609
|
public readonly weekDay: string;
|
|
1114
1610
|
```
|
|
1115
1611
|
|
|
1116
|
-
- *Type:*
|
|
1612
|
+
- *Type:* string
|
|
1117
1613
|
- *Default:* Any day of the week
|
|
1118
1614
|
|
|
1119
1615
|
The day of the week to run this rule at.
|
|
1120
1616
|
|
|
1121
1617
|
---
|
|
1122
1618
|
|
|
1123
|
-
### GroupVersionKind <a name="cdk8s.GroupVersionKind"></a>
|
|
1619
|
+
### GroupVersionKind <a name="GroupVersionKind" id="cdk8s.GroupVersionKind"></a>
|
|
1124
1620
|
|
|
1125
|
-
#### Initializer <a name="
|
|
1621
|
+
#### Initializer <a name="Initializer" id="cdk8s.GroupVersionKind.Initializer"></a>
|
|
1126
1622
|
|
|
1127
1623
|
```typescript
|
|
1128
1624
|
import { GroupVersionKind } from 'cdk8s'
|
|
@@ -1130,35 +1626,44 @@ import { GroupVersionKind } from 'cdk8s'
|
|
|
1130
1626
|
const groupVersionKind: GroupVersionKind = { ... }
|
|
1131
1627
|
```
|
|
1132
1628
|
|
|
1133
|
-
|
|
1629
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1630
|
+
|
|
1631
|
+
| **Name** | **Type** | **Description** |
|
|
1632
|
+
| --- | --- | --- |
|
|
1633
|
+
| <code><a href="#cdk8s.GroupVersionKind.property.apiVersion">apiVersion</a></code> | <code>string</code> | The object's API version (e.g. `authorization.k8s.io/v1`). |
|
|
1634
|
+
| <code><a href="#cdk8s.GroupVersionKind.property.kind">kind</a></code> | <code>string</code> | The object kind. |
|
|
1635
|
+
|
|
1636
|
+
---
|
|
1637
|
+
|
|
1638
|
+
##### `apiVersion`<sup>Required</sup> <a name="apiVersion" id="cdk8s.GroupVersionKind.property.apiVersion"></a>
|
|
1134
1639
|
|
|
1135
1640
|
```typescript
|
|
1136
1641
|
public readonly apiVersion: string;
|
|
1137
1642
|
```
|
|
1138
1643
|
|
|
1139
|
-
- *Type:*
|
|
1644
|
+
- *Type:* string
|
|
1140
1645
|
|
|
1141
1646
|
The object's API version (e.g. `authorization.k8s.io/v1`).
|
|
1142
1647
|
|
|
1143
1648
|
---
|
|
1144
1649
|
|
|
1145
|
-
##### `kind`<sup>Required</sup> <a name="cdk8s.GroupVersionKind.property.kind"></a>
|
|
1650
|
+
##### `kind`<sup>Required</sup> <a name="kind" id="cdk8s.GroupVersionKind.property.kind"></a>
|
|
1146
1651
|
|
|
1147
1652
|
```typescript
|
|
1148
1653
|
public readonly kind: string;
|
|
1149
1654
|
```
|
|
1150
1655
|
|
|
1151
|
-
- *Type:*
|
|
1656
|
+
- *Type:* string
|
|
1152
1657
|
|
|
1153
1658
|
The object kind.
|
|
1154
1659
|
|
|
1155
1660
|
---
|
|
1156
1661
|
|
|
1157
|
-
### HelmProps <a name="cdk8s.HelmProps"></a>
|
|
1662
|
+
### HelmProps <a name="HelmProps" id="cdk8s.HelmProps"></a>
|
|
1158
1663
|
|
|
1159
1664
|
Options for `Helm`.
|
|
1160
1665
|
|
|
1161
|
-
#### Initializer <a name="
|
|
1666
|
+
#### Initializer <a name="Initializer" id="cdk8s.HelmProps.Initializer"></a>
|
|
1162
1667
|
|
|
1163
1668
|
```typescript
|
|
1164
1669
|
import { HelmProps } from 'cdk8s'
|
|
@@ -1166,13 +1671,28 @@ import { HelmProps } from 'cdk8s'
|
|
|
1166
1671
|
const helmProps: HelmProps = { ... }
|
|
1167
1672
|
```
|
|
1168
1673
|
|
|
1169
|
-
|
|
1674
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1675
|
+
|
|
1676
|
+
| **Name** | **Type** | **Description** |
|
|
1677
|
+
| --- | --- | --- |
|
|
1678
|
+
| <code><a href="#cdk8s.HelmProps.property.chart">chart</a></code> | <code>string</code> | The chart name to use. It can be a chart from a helm repository or a local directory. |
|
|
1679
|
+
| <code><a href="#cdk8s.HelmProps.property.helmExecutable">helmExecutable</a></code> | <code>string</code> | The local helm executable to use in order to create the manifest the chart. |
|
|
1680
|
+
| <code><a href="#cdk8s.HelmProps.property.helmFlags">helmFlags</a></code> | <code>string[]</code> | Additional flags to add to the `helm` execution. |
|
|
1681
|
+
| <code><a href="#cdk8s.HelmProps.property.namespace">namespace</a></code> | <code>string</code> | Scope all resources in to a given namespace. |
|
|
1682
|
+
| <code><a href="#cdk8s.HelmProps.property.releaseName">releaseName</a></code> | <code>string</code> | The release name. |
|
|
1683
|
+
| <code><a href="#cdk8s.HelmProps.property.repo">repo</a></code> | <code>string</code> | Chart repository url where to locate the requested chart. |
|
|
1684
|
+
| <code><a href="#cdk8s.HelmProps.property.values">values</a></code> | <code>{[ key: string ]: any}</code> | Values to pass to the chart. |
|
|
1685
|
+
| <code><a href="#cdk8s.HelmProps.property.version">version</a></code> | <code>string</code> | Version constraint for the chart version to use. |
|
|
1686
|
+
|
|
1687
|
+
---
|
|
1688
|
+
|
|
1689
|
+
##### `chart`<sup>Required</sup> <a name="chart" id="cdk8s.HelmProps.property.chart"></a>
|
|
1170
1690
|
|
|
1171
1691
|
```typescript
|
|
1172
1692
|
public readonly chart: string;
|
|
1173
1693
|
```
|
|
1174
1694
|
|
|
1175
|
-
- *Type:*
|
|
1695
|
+
- *Type:* string
|
|
1176
1696
|
|
|
1177
1697
|
The chart name to use. It can be a chart from a helm repository or a local directory.
|
|
1178
1698
|
|
|
@@ -1180,91 +1700,98 @@ This name is passed to `helm template` and has all the relevant semantics.
|
|
|
1180
1700
|
|
|
1181
1701
|
---
|
|
1182
1702
|
|
|
1183
|
-
|
|
1703
|
+
*Example*
|
|
1704
|
+
|
|
1705
|
+
```typescript
|
|
1706
|
+
"bitnami/redis"
|
|
1707
|
+
```
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
##### `helmExecutable`<sup>Optional</sup> <a name="helmExecutable" id="cdk8s.HelmProps.property.helmExecutable"></a>
|
|
1184
1711
|
|
|
1185
1712
|
```typescript
|
|
1186
1713
|
public readonly helmExecutable: string;
|
|
1187
1714
|
```
|
|
1188
1715
|
|
|
1189
|
-
- *Type:*
|
|
1716
|
+
- *Type:* string
|
|
1190
1717
|
- *Default:* "helm"
|
|
1191
1718
|
|
|
1192
1719
|
The local helm executable to use in order to create the manifest the chart.
|
|
1193
1720
|
|
|
1194
1721
|
---
|
|
1195
1722
|
|
|
1196
|
-
##### `helmFlags`<sup>Optional</sup> <a name="cdk8s.HelmProps.property.helmFlags"></a>
|
|
1723
|
+
##### `helmFlags`<sup>Optional</sup> <a name="helmFlags" id="cdk8s.HelmProps.property.helmFlags"></a>
|
|
1197
1724
|
|
|
1198
1725
|
```typescript
|
|
1199
1726
|
public readonly helmFlags: string[];
|
|
1200
1727
|
```
|
|
1201
1728
|
|
|
1202
|
-
- *Type:*
|
|
1729
|
+
- *Type:* string[]
|
|
1203
1730
|
- *Default:* []
|
|
1204
1731
|
|
|
1205
1732
|
Additional flags to add to the `helm` execution.
|
|
1206
1733
|
|
|
1207
1734
|
---
|
|
1208
1735
|
|
|
1209
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.HelmProps.property.namespace"></a>
|
|
1736
|
+
##### `namespace`<sup>Optional</sup> <a name="namespace" id="cdk8s.HelmProps.property.namespace"></a>
|
|
1210
1737
|
|
|
1211
1738
|
```typescript
|
|
1212
1739
|
public readonly namespace: string;
|
|
1213
1740
|
```
|
|
1214
1741
|
|
|
1215
|
-
- *Type:*
|
|
1742
|
+
- *Type:* string
|
|
1216
1743
|
|
|
1217
1744
|
Scope all resources in to a given namespace.
|
|
1218
1745
|
|
|
1219
1746
|
---
|
|
1220
1747
|
|
|
1221
|
-
##### `releaseName`<sup>Optional</sup> <a name="cdk8s.HelmProps.property.releaseName"></a>
|
|
1748
|
+
##### `releaseName`<sup>Optional</sup> <a name="releaseName" id="cdk8s.HelmProps.property.releaseName"></a>
|
|
1222
1749
|
|
|
1223
1750
|
```typescript
|
|
1224
1751
|
public readonly releaseName: string;
|
|
1225
1752
|
```
|
|
1226
1753
|
|
|
1227
|
-
- *Type:*
|
|
1754
|
+
- *Type:* string
|
|
1228
1755
|
- *Default:* if unspecified, a name will be allocated based on the construct path
|
|
1229
1756
|
|
|
1230
1757
|
The release name.
|
|
1231
1758
|
|
|
1232
|
-
> https://helm.sh/docs/intro/using_helm/#three-big-concepts
|
|
1759
|
+
> [https://helm.sh/docs/intro/using_helm/#three-big-concepts](https://helm.sh/docs/intro/using_helm/#three-big-concepts)
|
|
1233
1760
|
|
|
1234
1761
|
---
|
|
1235
1762
|
|
|
1236
|
-
##### `repo`<sup>Optional</sup> <a name="cdk8s.HelmProps.property.repo"></a>
|
|
1763
|
+
##### `repo`<sup>Optional</sup> <a name="repo" id="cdk8s.HelmProps.property.repo"></a>
|
|
1237
1764
|
|
|
1238
1765
|
```typescript
|
|
1239
1766
|
public readonly repo: string;
|
|
1240
1767
|
```
|
|
1241
1768
|
|
|
1242
|
-
- *Type:*
|
|
1769
|
+
- *Type:* string
|
|
1243
1770
|
|
|
1244
1771
|
Chart repository url where to locate the requested chart.
|
|
1245
1772
|
|
|
1246
1773
|
---
|
|
1247
1774
|
|
|
1248
|
-
##### `values`<sup>Optional</sup> <a name="cdk8s.HelmProps.property.values"></a>
|
|
1775
|
+
##### `values`<sup>Optional</sup> <a name="values" id="cdk8s.HelmProps.property.values"></a>
|
|
1249
1776
|
|
|
1250
1777
|
```typescript
|
|
1251
1778
|
public readonly values: {[ key: string ]: any};
|
|
1252
1779
|
```
|
|
1253
1780
|
|
|
1254
|
-
- *Type:* {[ key: string ]:
|
|
1781
|
+
- *Type:* {[ key: string ]: any}
|
|
1255
1782
|
- *Default:* If no values are specified, chart will use the defaults.
|
|
1256
1783
|
|
|
1257
1784
|
Values to pass to the chart.
|
|
1258
1785
|
|
|
1259
1786
|
---
|
|
1260
1787
|
|
|
1261
|
-
##### `version`<sup>Optional</sup> <a name="cdk8s.HelmProps.property.version"></a>
|
|
1788
|
+
##### `version`<sup>Optional</sup> <a name="version" id="cdk8s.HelmProps.property.version"></a>
|
|
1262
1789
|
|
|
1263
1790
|
```typescript
|
|
1264
1791
|
public readonly version: string;
|
|
1265
1792
|
```
|
|
1266
1793
|
|
|
1267
|
-
- *Type:*
|
|
1794
|
+
- *Type:* string
|
|
1268
1795
|
|
|
1269
1796
|
Version constraint for the chart version to use.
|
|
1270
1797
|
|
|
@@ -1276,9 +1803,16 @@ This name is passed to `helm template --version` and has all the relevant semant
|
|
|
1276
1803
|
|
|
1277
1804
|
---
|
|
1278
1805
|
|
|
1279
|
-
|
|
1806
|
+
*Example*
|
|
1280
1807
|
|
|
1281
|
-
|
|
1808
|
+
```typescript
|
|
1809
|
+
"^2.0.0"
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
### IncludeProps <a name="IncludeProps" id="cdk8s.IncludeProps"></a>
|
|
1814
|
+
|
|
1815
|
+
#### Initializer <a name="Initializer" id="cdk8s.IncludeProps.Initializer"></a>
|
|
1282
1816
|
|
|
1283
1817
|
```typescript
|
|
1284
1818
|
import { IncludeProps } from 'cdk8s'
|
|
@@ -1286,23 +1820,38 @@ import { IncludeProps } from 'cdk8s'
|
|
|
1286
1820
|
const includeProps: IncludeProps = { ... }
|
|
1287
1821
|
```
|
|
1288
1822
|
|
|
1289
|
-
|
|
1823
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1824
|
+
|
|
1825
|
+
| **Name** | **Type** | **Description** |
|
|
1826
|
+
| --- | --- | --- |
|
|
1827
|
+
| <code><a href="#cdk8s.IncludeProps.property.url">url</a></code> | <code>string</code> | Local file path or URL which includes a Kubernetes YAML manifest. |
|
|
1828
|
+
|
|
1829
|
+
---
|
|
1830
|
+
|
|
1831
|
+
##### `url`<sup>Required</sup> <a name="url" id="cdk8s.IncludeProps.property.url"></a>
|
|
1290
1832
|
|
|
1291
1833
|
```typescript
|
|
1292
1834
|
public readonly url: string;
|
|
1293
1835
|
```
|
|
1294
1836
|
|
|
1295
|
-
- *Type:*
|
|
1837
|
+
- *Type:* string
|
|
1296
1838
|
|
|
1297
1839
|
Local file path or URL which includes a Kubernetes YAML manifest.
|
|
1298
1840
|
|
|
1299
1841
|
---
|
|
1300
1842
|
|
|
1301
|
-
|
|
1843
|
+
*Example*
|
|
1844
|
+
|
|
1845
|
+
```typescript
|
|
1846
|
+
mymanifest.yaml
|
|
1847
|
+
```
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
### NameOptions <a name="NameOptions" id="cdk8s.NameOptions"></a>
|
|
1302
1851
|
|
|
1303
1852
|
Options for name generation.
|
|
1304
1853
|
|
|
1305
|
-
#### Initializer <a name="
|
|
1854
|
+
#### Initializer <a name="Initializer" id="cdk8s.NameOptions.Initializer"></a>
|
|
1306
1855
|
|
|
1307
1856
|
```typescript
|
|
1308
1857
|
import { NameOptions } from 'cdk8s'
|
|
@@ -1310,66 +1859,77 @@ import { NameOptions } from 'cdk8s'
|
|
|
1310
1859
|
const nameOptions: NameOptions = { ... }
|
|
1311
1860
|
```
|
|
1312
1861
|
|
|
1313
|
-
|
|
1862
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1863
|
+
|
|
1864
|
+
| **Name** | **Type** | **Description** |
|
|
1865
|
+
| --- | --- | --- |
|
|
1866
|
+
| <code><a href="#cdk8s.NameOptions.property.delimiter">delimiter</a></code> | <code>string</code> | Delimiter to use between components. |
|
|
1867
|
+
| <code><a href="#cdk8s.NameOptions.property.extra">extra</a></code> | <code>string[]</code> | Extra components to include in the name. |
|
|
1868
|
+
| <code><a href="#cdk8s.NameOptions.property.includeHash">includeHash</a></code> | <code>boolean</code> | Include a short hash as last part of the name. |
|
|
1869
|
+
| <code><a href="#cdk8s.NameOptions.property.maxLen">maxLen</a></code> | <code>number</code> | Maximum allowed length for the name. |
|
|
1870
|
+
|
|
1871
|
+
---
|
|
1872
|
+
|
|
1873
|
+
##### `delimiter`<sup>Optional</sup> <a name="delimiter" id="cdk8s.NameOptions.property.delimiter"></a>
|
|
1314
1874
|
|
|
1315
1875
|
```typescript
|
|
1316
1876
|
public readonly delimiter: string;
|
|
1317
1877
|
```
|
|
1318
1878
|
|
|
1319
|
-
- *Type:*
|
|
1879
|
+
- *Type:* string
|
|
1320
1880
|
- *Default:* "-"
|
|
1321
1881
|
|
|
1322
1882
|
Delimiter to use between components.
|
|
1323
1883
|
|
|
1324
1884
|
---
|
|
1325
1885
|
|
|
1326
|
-
##### `extra`<sup>Optional</sup> <a name="cdk8s.NameOptions.property.extra"></a>
|
|
1886
|
+
##### `extra`<sup>Optional</sup> <a name="extra" id="cdk8s.NameOptions.property.extra"></a>
|
|
1327
1887
|
|
|
1328
1888
|
```typescript
|
|
1329
1889
|
public readonly extra: string[];
|
|
1330
1890
|
```
|
|
1331
1891
|
|
|
1332
|
-
- *Type:*
|
|
1892
|
+
- *Type:* string[]
|
|
1333
1893
|
- *Default:* [] use the construct path components
|
|
1334
1894
|
|
|
1335
1895
|
Extra components to include in the name.
|
|
1336
1896
|
|
|
1337
1897
|
---
|
|
1338
1898
|
|
|
1339
|
-
##### `includeHash`<sup>Optional</sup> <a name="cdk8s.NameOptions.property.includeHash"></a>
|
|
1899
|
+
##### `includeHash`<sup>Optional</sup> <a name="includeHash" id="cdk8s.NameOptions.property.includeHash"></a>
|
|
1340
1900
|
|
|
1341
1901
|
```typescript
|
|
1342
1902
|
public readonly includeHash: boolean;
|
|
1343
1903
|
```
|
|
1344
1904
|
|
|
1345
|
-
- *Type:*
|
|
1905
|
+
- *Type:* boolean
|
|
1346
1906
|
- *Default:* true
|
|
1347
1907
|
|
|
1348
1908
|
Include a short hash as last part of the name.
|
|
1349
1909
|
|
|
1350
1910
|
---
|
|
1351
1911
|
|
|
1352
|
-
##### `maxLen`<sup>Optional</sup> <a name="cdk8s.NameOptions.property.maxLen"></a>
|
|
1912
|
+
##### `maxLen`<sup>Optional</sup> <a name="maxLen" id="cdk8s.NameOptions.property.maxLen"></a>
|
|
1353
1913
|
|
|
1354
1914
|
```typescript
|
|
1355
1915
|
public readonly maxLen: number;
|
|
1356
1916
|
```
|
|
1357
1917
|
|
|
1358
|
-
- *Type:*
|
|
1918
|
+
- *Type:* number
|
|
1359
1919
|
- *Default:* 63
|
|
1360
1920
|
|
|
1361
1921
|
Maximum allowed length for the name.
|
|
1362
1922
|
|
|
1363
1923
|
---
|
|
1364
1924
|
|
|
1365
|
-
### OwnerReference <a name="cdk8s.OwnerReference"></a>
|
|
1925
|
+
### OwnerReference <a name="OwnerReference" id="cdk8s.OwnerReference"></a>
|
|
1366
1926
|
|
|
1367
1927
|
OwnerReference contains enough information to let you identify an owning object.
|
|
1368
1928
|
|
|
1369
1929
|
An owning object must be in the same namespace as the dependent, or
|
|
1370
1930
|
be cluster-scoped, so there is no namespace field.
|
|
1371
1931
|
|
|
1372
|
-
#### Initializer <a name="
|
|
1932
|
+
#### Initializer <a name="Initializer" id="cdk8s.OwnerReference.Initializer"></a>
|
|
1373
1933
|
|
|
1374
1934
|
```typescript
|
|
1375
1935
|
import { OwnerReference } from 'cdk8s'
|
|
@@ -1377,69 +1937,81 @@ import { OwnerReference } from 'cdk8s'
|
|
|
1377
1937
|
const ownerReference: OwnerReference = { ... }
|
|
1378
1938
|
```
|
|
1379
1939
|
|
|
1380
|
-
|
|
1940
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1941
|
+
|
|
1942
|
+
| **Name** | **Type** | **Description** |
|
|
1943
|
+
| --- | --- | --- |
|
|
1944
|
+
| <code><a href="#cdk8s.OwnerReference.property.apiVersion">apiVersion</a></code> | <code>string</code> | API version of the referent. |
|
|
1945
|
+
| <code><a href="#cdk8s.OwnerReference.property.kind">kind</a></code> | <code>string</code> | Kind of the referent. |
|
|
1946
|
+
| <code><a href="#cdk8s.OwnerReference.property.name">name</a></code> | <code>string</code> | Name of the referent. |
|
|
1947
|
+
| <code><a href="#cdk8s.OwnerReference.property.uid">uid</a></code> | <code>string</code> | UID of the referent. |
|
|
1948
|
+
| <code><a href="#cdk8s.OwnerReference.property.blockOwnerDeletion">blockOwnerDeletion</a></code> | <code>boolean</code> | If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. |
|
|
1949
|
+
| <code><a href="#cdk8s.OwnerReference.property.controller">controller</a></code> | <code>boolean</code> | If true, this reference points to the managing controller. |
|
|
1950
|
+
|
|
1951
|
+
---
|
|
1952
|
+
|
|
1953
|
+
##### `apiVersion`<sup>Required</sup> <a name="apiVersion" id="cdk8s.OwnerReference.property.apiVersion"></a>
|
|
1381
1954
|
|
|
1382
1955
|
```typescript
|
|
1383
1956
|
public readonly apiVersion: string;
|
|
1384
1957
|
```
|
|
1385
1958
|
|
|
1386
|
-
- *Type:*
|
|
1959
|
+
- *Type:* string
|
|
1387
1960
|
|
|
1388
1961
|
API version of the referent.
|
|
1389
1962
|
|
|
1390
1963
|
---
|
|
1391
1964
|
|
|
1392
|
-
##### `kind`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.kind"></a>
|
|
1965
|
+
##### `kind`<sup>Required</sup> <a name="kind" id="cdk8s.OwnerReference.property.kind"></a>
|
|
1393
1966
|
|
|
1394
1967
|
```typescript
|
|
1395
1968
|
public readonly kind: string;
|
|
1396
1969
|
```
|
|
1397
1970
|
|
|
1398
|
-
- *Type:*
|
|
1971
|
+
- *Type:* string
|
|
1399
1972
|
|
|
1400
1973
|
Kind of the referent.
|
|
1401
1974
|
|
|
1402
|
-
> https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
1975
|
+
> [https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds)
|
|
1403
1976
|
|
|
1404
1977
|
---
|
|
1405
1978
|
|
|
1406
|
-
##### `name`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.name"></a>
|
|
1979
|
+
##### `name`<sup>Required</sup> <a name="name" id="cdk8s.OwnerReference.property.name"></a>
|
|
1407
1980
|
|
|
1408
1981
|
```typescript
|
|
1409
1982
|
public readonly name: string;
|
|
1410
1983
|
```
|
|
1411
1984
|
|
|
1412
|
-
- *Type:*
|
|
1985
|
+
- *Type:* string
|
|
1413
1986
|
|
|
1414
1987
|
Name of the referent.
|
|
1415
1988
|
|
|
1416
|
-
> http://kubernetes.io/docs/user-guide/identifiers#names
|
|
1989
|
+
> [http://kubernetes.io/docs/user-guide/identifiers#names](http://kubernetes.io/docs/user-guide/identifiers#names)
|
|
1417
1990
|
|
|
1418
1991
|
---
|
|
1419
1992
|
|
|
1420
|
-
##### `uid`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.uid"></a>
|
|
1993
|
+
##### `uid`<sup>Required</sup> <a name="uid" id="cdk8s.OwnerReference.property.uid"></a>
|
|
1421
1994
|
|
|
1422
1995
|
```typescript
|
|
1423
1996
|
public readonly uid: string;
|
|
1424
1997
|
```
|
|
1425
1998
|
|
|
1426
|
-
- *Type:*
|
|
1999
|
+
- *Type:* string
|
|
1427
2000
|
|
|
1428
2001
|
UID of the referent.
|
|
1429
2002
|
|
|
1430
|
-
> http://kubernetes.io/docs/user-guide/identifiers#uids
|
|
2003
|
+
> [http://kubernetes.io/docs/user-guide/identifiers#uids](http://kubernetes.io/docs/user-guide/identifiers#uids)
|
|
1431
2004
|
|
|
1432
2005
|
---
|
|
1433
2006
|
|
|
1434
|
-
##### `blockOwnerDeletion`<sup>Optional</sup> <a name="cdk8s.OwnerReference.property.blockOwnerDeletion"></a>
|
|
2007
|
+
##### `blockOwnerDeletion`<sup>Optional</sup> <a name="blockOwnerDeletion" id="cdk8s.OwnerReference.property.blockOwnerDeletion"></a>
|
|
1435
2008
|
|
|
1436
2009
|
```typescript
|
|
1437
2010
|
public readonly blockOwnerDeletion: boolean;
|
|
1438
2011
|
```
|
|
1439
2012
|
|
|
1440
|
-
- *Type:*
|
|
1441
|
-
- *Default:* false. To set this field, a user needs "delete" permission of the
|
|
1442
|
-
owner, otherwise 422 (Unprocessable Entity) will be returned.
|
|
2013
|
+
- *Type:* boolean
|
|
2014
|
+
- *Default:* false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
|
|
1443
2015
|
|
|
1444
2016
|
If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed.
|
|
1445
2017
|
|
|
@@ -1449,23 +2021,23 @@ returned.
|
|
|
1449
2021
|
|
|
1450
2022
|
---
|
|
1451
2023
|
|
|
1452
|
-
##### `controller`<sup>Optional</sup> <a name="cdk8s.OwnerReference.property.controller"></a>
|
|
2024
|
+
##### `controller`<sup>Optional</sup> <a name="controller" id="cdk8s.OwnerReference.property.controller"></a>
|
|
1453
2025
|
|
|
1454
2026
|
```typescript
|
|
1455
2027
|
public readonly controller: boolean;
|
|
1456
2028
|
```
|
|
1457
2029
|
|
|
1458
|
-
- *Type:*
|
|
2030
|
+
- *Type:* boolean
|
|
1459
2031
|
|
|
1460
2032
|
If true, this reference points to the managing controller.
|
|
1461
2033
|
|
|
1462
2034
|
---
|
|
1463
2035
|
|
|
1464
|
-
### SizeConversionOptions <a name="cdk8s.SizeConversionOptions"></a>
|
|
2036
|
+
### SizeConversionOptions <a name="SizeConversionOptions" id="cdk8s.SizeConversionOptions"></a>
|
|
1465
2037
|
|
|
1466
2038
|
Options for how to convert time to a different unit.
|
|
1467
2039
|
|
|
1468
|
-
#### Initializer <a name="
|
|
2040
|
+
#### Initializer <a name="Initializer" id="cdk8s.SizeConversionOptions.Initializer"></a>
|
|
1469
2041
|
|
|
1470
2042
|
```typescript
|
|
1471
2043
|
import { SizeConversionOptions } from 'cdk8s'
|
|
@@ -1473,24 +2045,32 @@ import { SizeConversionOptions } from 'cdk8s'
|
|
|
1473
2045
|
const sizeConversionOptions: SizeConversionOptions = { ... }
|
|
1474
2046
|
```
|
|
1475
2047
|
|
|
1476
|
-
|
|
2048
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2049
|
+
|
|
2050
|
+
| **Name** | **Type** | **Description** |
|
|
2051
|
+
| --- | --- | --- |
|
|
2052
|
+
| <code><a href="#cdk8s.SizeConversionOptions.property.rounding">rounding</a></code> | <code><a href="#cdk8s.SizeRoundingBehavior">SizeRoundingBehavior</a></code> | How conversions should behave when it encounters a non-integer result. |
|
|
2053
|
+
|
|
2054
|
+
---
|
|
2055
|
+
|
|
2056
|
+
##### `rounding`<sup>Optional</sup> <a name="rounding" id="cdk8s.SizeConversionOptions.property.rounding"></a>
|
|
1477
2057
|
|
|
1478
2058
|
```typescript
|
|
1479
2059
|
public readonly rounding: SizeRoundingBehavior;
|
|
1480
2060
|
```
|
|
1481
2061
|
|
|
1482
|
-
- *Type:*
|
|
2062
|
+
- *Type:* <a href="#cdk8s.SizeRoundingBehavior">SizeRoundingBehavior</a>
|
|
1483
2063
|
- *Default:* SizeRoundingBehavior.FAIL
|
|
1484
2064
|
|
|
1485
2065
|
How conversions should behave when it encounters a non-integer result.
|
|
1486
2066
|
|
|
1487
2067
|
---
|
|
1488
2068
|
|
|
1489
|
-
### TimeConversionOptions <a name="cdk8s.TimeConversionOptions"></a>
|
|
2069
|
+
### TimeConversionOptions <a name="TimeConversionOptions" id="cdk8s.TimeConversionOptions"></a>
|
|
1490
2070
|
|
|
1491
2071
|
Options for how to convert time to a different unit.
|
|
1492
2072
|
|
|
1493
|
-
#### Initializer <a name="
|
|
2073
|
+
#### Initializer <a name="Initializer" id="cdk8s.TimeConversionOptions.Initializer"></a>
|
|
1494
2074
|
|
|
1495
2075
|
```typescript
|
|
1496
2076
|
import { TimeConversionOptions } from 'cdk8s'
|
|
@@ -1498,26 +2078,34 @@ import { TimeConversionOptions } from 'cdk8s'
|
|
|
1498
2078
|
const timeConversionOptions: TimeConversionOptions = { ... }
|
|
1499
2079
|
```
|
|
1500
2080
|
|
|
1501
|
-
|
|
2081
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2082
|
+
|
|
2083
|
+
| **Name** | **Type** | **Description** |
|
|
2084
|
+
| --- | --- | --- |
|
|
2085
|
+
| <code><a href="#cdk8s.TimeConversionOptions.property.integral">integral</a></code> | <code>boolean</code> | If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an integer. |
|
|
2086
|
+
|
|
2087
|
+
---
|
|
2088
|
+
|
|
2089
|
+
##### `integral`<sup>Optional</sup> <a name="integral" id="cdk8s.TimeConversionOptions.property.integral"></a>
|
|
1502
2090
|
|
|
1503
2091
|
```typescript
|
|
1504
2092
|
public readonly integral: boolean;
|
|
1505
2093
|
```
|
|
1506
2094
|
|
|
1507
|
-
- *Type:*
|
|
2095
|
+
- *Type:* boolean
|
|
1508
2096
|
- *Default:* true
|
|
1509
2097
|
|
|
1510
2098
|
If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an integer.
|
|
1511
2099
|
|
|
1512
2100
|
---
|
|
1513
2101
|
|
|
1514
|
-
## Classes <a name="Classes"></a>
|
|
2102
|
+
## Classes <a name="Classes" id="Classes"></a>
|
|
1515
2103
|
|
|
1516
|
-
### ApiObjectMetadataDefinition <a name="cdk8s.ApiObjectMetadataDefinition"></a>
|
|
2104
|
+
### ApiObjectMetadataDefinition <a name="ApiObjectMetadataDefinition" id="cdk8s.ApiObjectMetadataDefinition"></a>
|
|
1517
2105
|
|
|
1518
2106
|
Object metadata.
|
|
1519
2107
|
|
|
1520
|
-
#### Initializers <a name="cdk8s.ApiObjectMetadataDefinition.Initializer"></a>
|
|
2108
|
+
#### Initializers <a name="Initializers" id="cdk8s.ApiObjectMetadataDefinition.Initializer"></a>
|
|
1521
2109
|
|
|
1522
2110
|
```typescript
|
|
1523
2111
|
import { ApiObjectMetadataDefinition } from 'cdk8s'
|
|
@@ -1525,138 +2113,175 @@ import { ApiObjectMetadataDefinition } from 'cdk8s'
|
|
|
1525
2113
|
new ApiObjectMetadataDefinition(options: ApiObjectMetadataDefinitionOptions)
|
|
1526
2114
|
```
|
|
1527
2115
|
|
|
1528
|
-
|
|
2116
|
+
| **Name** | **Type** | **Description** |
|
|
2117
|
+
| --- | --- | --- |
|
|
2118
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.Initializer.parameter.options">options</a></code> | <code><a href="#cdk8s.ApiObjectMetadataDefinitionOptions">ApiObjectMetadataDefinitionOptions</a></code> | *No description.* |
|
|
2119
|
+
|
|
2120
|
+
---
|
|
2121
|
+
|
|
2122
|
+
##### `options`<sup>Required</sup> <a name="options" id="cdk8s.ApiObjectMetadataDefinition.Initializer.parameter.options"></a>
|
|
1529
2123
|
|
|
1530
|
-
- *Type:*
|
|
2124
|
+
- *Type:* <a href="#cdk8s.ApiObjectMetadataDefinitionOptions">ApiObjectMetadataDefinitionOptions</a>
|
|
1531
2125
|
|
|
1532
2126
|
---
|
|
1533
2127
|
|
|
1534
|
-
#### Methods <a name="Methods"></a>
|
|
2128
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2129
|
+
|
|
2130
|
+
| **Name** | **Description** |
|
|
2131
|
+
| --- | --- |
|
|
2132
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.add">add</a></code> | Adds an arbitrary key/value to the object metadata. |
|
|
2133
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.addAnnotation">addAnnotation</a></code> | Add an annotation. |
|
|
2134
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.addFinalizers">addFinalizers</a></code> | Add one or more finalizers. |
|
|
2135
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.addLabel">addLabel</a></code> | Add a label. |
|
|
2136
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.addOwnerReference">addOwnerReference</a></code> | Add an owner. |
|
|
2137
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.getLabel">getLabel</a></code> | *No description.* |
|
|
2138
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.toJson">toJson</a></code> | Synthesizes a k8s ObjectMeta for this metadata set. |
|
|
2139
|
+
|
|
2140
|
+
---
|
|
1535
2141
|
|
|
1536
|
-
##### `add` <a name="cdk8s.ApiObjectMetadataDefinition.add"></a>
|
|
2142
|
+
##### `add` <a name="add" id="cdk8s.ApiObjectMetadataDefinition.add"></a>
|
|
1537
2143
|
|
|
1538
2144
|
```typescript
|
|
1539
|
-
public add(key: string, value: any)
|
|
2145
|
+
public add(key: string, value: any): void
|
|
1540
2146
|
```
|
|
1541
2147
|
|
|
1542
|
-
|
|
2148
|
+
Adds an arbitrary key/value to the object metadata.
|
|
1543
2149
|
|
|
1544
|
-
|
|
2150
|
+
###### `key`<sup>Required</sup> <a name="key" id="cdk8s.ApiObjectMetadataDefinition.add.parameter.key"></a>
|
|
2151
|
+
|
|
2152
|
+
- *Type:* string
|
|
1545
2153
|
|
|
1546
2154
|
Metadata key.
|
|
1547
2155
|
|
|
1548
2156
|
---
|
|
1549
2157
|
|
|
1550
|
-
###### `value`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinition.parameter.value"></a>
|
|
2158
|
+
###### `value`<sup>Required</sup> <a name="value" id="cdk8s.ApiObjectMetadataDefinition.add.parameter.value"></a>
|
|
1551
2159
|
|
|
1552
|
-
- *Type:*
|
|
2160
|
+
- *Type:* any
|
|
1553
2161
|
|
|
1554
2162
|
Metadata value.
|
|
1555
2163
|
|
|
1556
2164
|
---
|
|
1557
2165
|
|
|
1558
|
-
##### `addAnnotation` <a name="cdk8s.ApiObjectMetadataDefinition.addAnnotation"></a>
|
|
2166
|
+
##### `addAnnotation` <a name="addAnnotation" id="cdk8s.ApiObjectMetadataDefinition.addAnnotation"></a>
|
|
1559
2167
|
|
|
1560
2168
|
```typescript
|
|
1561
|
-
public addAnnotation(key: string, value: string)
|
|
2169
|
+
public addAnnotation(key: string, value: string): void
|
|
1562
2170
|
```
|
|
1563
2171
|
|
|
1564
|
-
|
|
2172
|
+
Add an annotation.
|
|
2173
|
+
|
|
2174
|
+
###### `key`<sup>Required</sup> <a name="key" id="cdk8s.ApiObjectMetadataDefinition.addAnnotation.parameter.key"></a>
|
|
1565
2175
|
|
|
1566
|
-
- *Type:*
|
|
2176
|
+
- *Type:* string
|
|
1567
2177
|
|
|
1568
2178
|
The key.
|
|
1569
2179
|
|
|
1570
2180
|
---
|
|
1571
2181
|
|
|
1572
|
-
###### `value`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinition.parameter.value"></a>
|
|
2182
|
+
###### `value`<sup>Required</sup> <a name="value" id="cdk8s.ApiObjectMetadataDefinition.addAnnotation.parameter.value"></a>
|
|
1573
2183
|
|
|
1574
|
-
- *Type:*
|
|
2184
|
+
- *Type:* string
|
|
1575
2185
|
|
|
1576
2186
|
The value.
|
|
1577
2187
|
|
|
1578
2188
|
---
|
|
1579
2189
|
|
|
1580
|
-
##### `addFinalizers` <a name="cdk8s.ApiObjectMetadataDefinition.addFinalizers"></a>
|
|
2190
|
+
##### `addFinalizers` <a name="addFinalizers" id="cdk8s.ApiObjectMetadataDefinition.addFinalizers"></a>
|
|
1581
2191
|
|
|
1582
2192
|
```typescript
|
|
1583
|
-
public addFinalizers(finalizers: string)
|
|
2193
|
+
public addFinalizers(finalizers: string): void
|
|
1584
2194
|
```
|
|
1585
2195
|
|
|
1586
|
-
|
|
2196
|
+
Add one or more finalizers.
|
|
1587
2197
|
|
|
1588
|
-
|
|
2198
|
+
###### `finalizers`<sup>Required</sup> <a name="finalizers" id="cdk8s.ApiObjectMetadataDefinition.addFinalizers.parameter.finalizers"></a>
|
|
2199
|
+
|
|
2200
|
+
- *Type:* string
|
|
1589
2201
|
|
|
1590
2202
|
the finalizers.
|
|
1591
2203
|
|
|
1592
2204
|
---
|
|
1593
2205
|
|
|
1594
|
-
##### `addLabel` <a name="cdk8s.ApiObjectMetadataDefinition.addLabel"></a>
|
|
2206
|
+
##### `addLabel` <a name="addLabel" id="cdk8s.ApiObjectMetadataDefinition.addLabel"></a>
|
|
1595
2207
|
|
|
1596
2208
|
```typescript
|
|
1597
|
-
public addLabel(key: string, value: string)
|
|
2209
|
+
public addLabel(key: string, value: string): void
|
|
1598
2210
|
```
|
|
1599
2211
|
|
|
1600
|
-
|
|
2212
|
+
Add a label.
|
|
2213
|
+
|
|
2214
|
+
###### `key`<sup>Required</sup> <a name="key" id="cdk8s.ApiObjectMetadataDefinition.addLabel.parameter.key"></a>
|
|
1601
2215
|
|
|
1602
|
-
- *Type:*
|
|
2216
|
+
- *Type:* string
|
|
1603
2217
|
|
|
1604
2218
|
The key.
|
|
1605
2219
|
|
|
1606
2220
|
---
|
|
1607
2221
|
|
|
1608
|
-
###### `value`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinition.parameter.value"></a>
|
|
2222
|
+
###### `value`<sup>Required</sup> <a name="value" id="cdk8s.ApiObjectMetadataDefinition.addLabel.parameter.value"></a>
|
|
1609
2223
|
|
|
1610
|
-
- *Type:*
|
|
2224
|
+
- *Type:* string
|
|
1611
2225
|
|
|
1612
2226
|
The value.
|
|
1613
2227
|
|
|
1614
2228
|
---
|
|
1615
2229
|
|
|
1616
|
-
##### `addOwnerReference` <a name="cdk8s.ApiObjectMetadataDefinition.addOwnerReference"></a>
|
|
2230
|
+
##### `addOwnerReference` <a name="addOwnerReference" id="cdk8s.ApiObjectMetadataDefinition.addOwnerReference"></a>
|
|
1617
2231
|
|
|
1618
2232
|
```typescript
|
|
1619
|
-
public addOwnerReference(owner: OwnerReference)
|
|
2233
|
+
public addOwnerReference(owner: OwnerReference): void
|
|
1620
2234
|
```
|
|
1621
2235
|
|
|
1622
|
-
|
|
2236
|
+
Add an owner.
|
|
1623
2237
|
|
|
1624
|
-
|
|
2238
|
+
###### `owner`<sup>Required</sup> <a name="owner" id="cdk8s.ApiObjectMetadataDefinition.addOwnerReference.parameter.owner"></a>
|
|
2239
|
+
|
|
2240
|
+
- *Type:* <a href="#cdk8s.OwnerReference">OwnerReference</a>
|
|
1625
2241
|
|
|
1626
2242
|
the owner.
|
|
1627
2243
|
|
|
1628
2244
|
---
|
|
1629
2245
|
|
|
1630
|
-
##### `getLabel` <a name="cdk8s.ApiObjectMetadataDefinition.getLabel"></a>
|
|
2246
|
+
##### `getLabel` <a name="getLabel" id="cdk8s.ApiObjectMetadataDefinition.getLabel"></a>
|
|
1631
2247
|
|
|
1632
2248
|
```typescript
|
|
1633
|
-
public getLabel(key: string)
|
|
2249
|
+
public getLabel(key: string): string
|
|
1634
2250
|
```
|
|
1635
2251
|
|
|
1636
|
-
###### `key`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinition.parameter.key"></a>
|
|
2252
|
+
###### `key`<sup>Required</sup> <a name="key" id="cdk8s.ApiObjectMetadataDefinition.getLabel.parameter.key"></a>
|
|
1637
2253
|
|
|
1638
|
-
- *Type:*
|
|
2254
|
+
- *Type:* string
|
|
1639
2255
|
|
|
1640
2256
|
the label.
|
|
1641
2257
|
|
|
1642
2258
|
---
|
|
1643
2259
|
|
|
1644
|
-
##### `toJson` <a name="cdk8s.ApiObjectMetadataDefinition.toJson"></a>
|
|
2260
|
+
##### `toJson` <a name="toJson" id="cdk8s.ApiObjectMetadataDefinition.toJson"></a>
|
|
1645
2261
|
|
|
1646
2262
|
```typescript
|
|
1647
|
-
public toJson()
|
|
2263
|
+
public toJson(): any
|
|
1648
2264
|
```
|
|
1649
2265
|
|
|
2266
|
+
Synthesizes a k8s ObjectMeta for this metadata set.
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2270
|
+
|
|
2271
|
+
| **Name** | **Type** | **Description** |
|
|
2272
|
+
| --- | --- | --- |
|
|
2273
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.property.name">name</a></code> | <code>string</code> | The name of the API object. |
|
|
2274
|
+
| <code><a href="#cdk8s.ApiObjectMetadataDefinition.property.namespace">namespace</a></code> | <code>string</code> | The object's namespace. |
|
|
1650
2275
|
|
|
1651
|
-
|
|
2276
|
+
---
|
|
1652
2277
|
|
|
1653
|
-
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinition.property.name"></a>
|
|
2278
|
+
##### `name`<sup>Optional</sup> <a name="name" id="cdk8s.ApiObjectMetadataDefinition.property.name"></a>
|
|
1654
2279
|
|
|
1655
2280
|
```typescript
|
|
1656
2281
|
public readonly name: string;
|
|
1657
2282
|
```
|
|
1658
2283
|
|
|
1659
|
-
- *Type:*
|
|
2284
|
+
- *Type:* string
|
|
1660
2285
|
|
|
1661
2286
|
The name of the API object.
|
|
1662
2287
|
|
|
@@ -1667,24 +2292,24 @@ construct path to generate a DNS-compatible name for the resource.
|
|
|
1667
2292
|
|
|
1668
2293
|
---
|
|
1669
2294
|
|
|
1670
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinition.property.namespace"></a>
|
|
2295
|
+
##### `namespace`<sup>Optional</sup> <a name="namespace" id="cdk8s.ApiObjectMetadataDefinition.property.namespace"></a>
|
|
1671
2296
|
|
|
1672
2297
|
```typescript
|
|
1673
2298
|
public readonly namespace: string;
|
|
1674
2299
|
```
|
|
1675
2300
|
|
|
1676
|
-
- *Type:*
|
|
2301
|
+
- *Type:* string
|
|
1677
2302
|
|
|
1678
2303
|
The object's namespace.
|
|
1679
2304
|
|
|
1680
2305
|
---
|
|
1681
2306
|
|
|
1682
2307
|
|
|
1683
|
-
### Cron <a name="cdk8s.Cron"></a>
|
|
2308
|
+
### Cron <a name="Cron" id="cdk8s.Cron"></a>
|
|
1684
2309
|
|
|
1685
2310
|
Represents a cron schedule.
|
|
1686
2311
|
|
|
1687
|
-
#### Initializers <a name="cdk8s.Cron.Initializer"></a>
|
|
2312
|
+
#### Initializers <a name="Initializers" id="cdk8s.Cron.Initializer"></a>
|
|
1688
2313
|
|
|
1689
2314
|
```typescript
|
|
1690
2315
|
import { Cron } from 'cdk8s'
|
|
@@ -1692,16 +2317,34 @@ import { Cron } from 'cdk8s'
|
|
|
1692
2317
|
new Cron(cronOptions?: CronOptions)
|
|
1693
2318
|
```
|
|
1694
2319
|
|
|
1695
|
-
|
|
2320
|
+
| **Name** | **Type** | **Description** |
|
|
2321
|
+
| --- | --- | --- |
|
|
2322
|
+
| <code><a href="#cdk8s.Cron.Initializer.parameter.cronOptions">cronOptions</a></code> | <code><a href="#cdk8s.CronOptions">CronOptions</a></code> | *No description.* |
|
|
2323
|
+
|
|
2324
|
+
---
|
|
2325
|
+
|
|
2326
|
+
##### `cronOptions`<sup>Optional</sup> <a name="cronOptions" id="cdk8s.Cron.Initializer.parameter.cronOptions"></a>
|
|
1696
2327
|
|
|
1697
|
-
- *Type:*
|
|
2328
|
+
- *Type:* <a href="#cdk8s.CronOptions">CronOptions</a>
|
|
1698
2329
|
|
|
1699
2330
|
---
|
|
1700
2331
|
|
|
1701
2332
|
|
|
1702
|
-
#### Static Functions <a name="Static Functions"></a>
|
|
2333
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
1703
2334
|
|
|
1704
|
-
|
|
2335
|
+
| **Name** | **Description** |
|
|
2336
|
+
| --- | --- |
|
|
2337
|
+
| <code><a href="#cdk8s.Cron.annually">annually</a></code> | Create a cron schedule which runs first day of January every year. |
|
|
2338
|
+
| <code><a href="#cdk8s.Cron.daily">daily</a></code> | Create a cron schedule which runs every day at midnight. |
|
|
2339
|
+
| <code><a href="#cdk8s.Cron.everyMinute">everyMinute</a></code> | Create a cron schedule which runs every minute. |
|
|
2340
|
+
| <code><a href="#cdk8s.Cron.hourly">hourly</a></code> | Create a cron schedule which runs every hour. |
|
|
2341
|
+
| <code><a href="#cdk8s.Cron.monthly">monthly</a></code> | Create a cron schedule which runs first day of every month. |
|
|
2342
|
+
| <code><a href="#cdk8s.Cron.schedule">schedule</a></code> | Create a custom cron schedule from a set of cron fields. |
|
|
2343
|
+
| <code><a href="#cdk8s.Cron.weekly">weekly</a></code> | Create a cron schedule which runs every week on Sunday. |
|
|
2344
|
+
|
|
2345
|
+
---
|
|
2346
|
+
|
|
2347
|
+
##### `annually` <a name="annually" id="cdk8s.Cron.annually"></a>
|
|
1705
2348
|
|
|
1706
2349
|
```typescript
|
|
1707
2350
|
import { Cron } from 'cdk8s'
|
|
@@ -1709,7 +2352,9 @@ import { Cron } from 'cdk8s'
|
|
|
1709
2352
|
Cron.annually()
|
|
1710
2353
|
```
|
|
1711
2354
|
|
|
1712
|
-
|
|
2355
|
+
Create a cron schedule which runs first day of January every year.
|
|
2356
|
+
|
|
2357
|
+
##### `daily` <a name="daily" id="cdk8s.Cron.daily"></a>
|
|
1713
2358
|
|
|
1714
2359
|
```typescript
|
|
1715
2360
|
import { Cron } from 'cdk8s'
|
|
@@ -1717,7 +2362,9 @@ import { Cron } from 'cdk8s'
|
|
|
1717
2362
|
Cron.daily()
|
|
1718
2363
|
```
|
|
1719
2364
|
|
|
1720
|
-
|
|
2365
|
+
Create a cron schedule which runs every day at midnight.
|
|
2366
|
+
|
|
2367
|
+
##### `everyMinute` <a name="everyMinute" id="cdk8s.Cron.everyMinute"></a>
|
|
1721
2368
|
|
|
1722
2369
|
```typescript
|
|
1723
2370
|
import { Cron } from 'cdk8s'
|
|
@@ -1725,7 +2372,9 @@ import { Cron } from 'cdk8s'
|
|
|
1725
2372
|
Cron.everyMinute()
|
|
1726
2373
|
```
|
|
1727
2374
|
|
|
1728
|
-
|
|
2375
|
+
Create a cron schedule which runs every minute.
|
|
2376
|
+
|
|
2377
|
+
##### `hourly` <a name="hourly" id="cdk8s.Cron.hourly"></a>
|
|
1729
2378
|
|
|
1730
2379
|
```typescript
|
|
1731
2380
|
import { Cron } from 'cdk8s'
|
|
@@ -1733,7 +2382,9 @@ import { Cron } from 'cdk8s'
|
|
|
1733
2382
|
Cron.hourly()
|
|
1734
2383
|
```
|
|
1735
2384
|
|
|
1736
|
-
|
|
2385
|
+
Create a cron schedule which runs every hour.
|
|
2386
|
+
|
|
2387
|
+
##### `monthly` <a name="monthly" id="cdk8s.Cron.monthly"></a>
|
|
1737
2388
|
|
|
1738
2389
|
```typescript
|
|
1739
2390
|
import { Cron } from 'cdk8s'
|
|
@@ -1741,7 +2392,9 @@ import { Cron } from 'cdk8s'
|
|
|
1741
2392
|
Cron.monthly()
|
|
1742
2393
|
```
|
|
1743
2394
|
|
|
1744
|
-
|
|
2395
|
+
Create a cron schedule which runs first day of every month.
|
|
2396
|
+
|
|
2397
|
+
##### `schedule` <a name="schedule" id="cdk8s.Cron.schedule"></a>
|
|
1745
2398
|
|
|
1746
2399
|
```typescript
|
|
1747
2400
|
import { Cron } from 'cdk8s'
|
|
@@ -1749,13 +2402,15 @@ import { Cron } from 'cdk8s'
|
|
|
1749
2402
|
Cron.schedule(options: CronOptions)
|
|
1750
2403
|
```
|
|
1751
2404
|
|
|
1752
|
-
|
|
2405
|
+
Create a custom cron schedule from a set of cron fields.
|
|
1753
2406
|
|
|
1754
|
-
|
|
2407
|
+
###### `options`<sup>Required</sup> <a name="options" id="cdk8s.Cron.schedule.parameter.options"></a>
|
|
2408
|
+
|
|
2409
|
+
- *Type:* <a href="#cdk8s.CronOptions">CronOptions</a>
|
|
1755
2410
|
|
|
1756
2411
|
---
|
|
1757
2412
|
|
|
1758
|
-
##### `weekly` <a name="cdk8s.Cron.weekly"></a>
|
|
2413
|
+
##### `weekly` <a name="weekly" id="cdk8s.Cron.weekly"></a>
|
|
1759
2414
|
|
|
1760
2415
|
```typescript
|
|
1761
2416
|
import { Cron } from 'cdk8s'
|
|
@@ -1763,22 +2418,30 @@ import { Cron } from 'cdk8s'
|
|
|
1763
2418
|
Cron.weekly()
|
|
1764
2419
|
```
|
|
1765
2420
|
|
|
1766
|
-
|
|
2421
|
+
Create a cron schedule which runs every week on Sunday.
|
|
2422
|
+
|
|
2423
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2424
|
+
|
|
2425
|
+
| **Name** | **Type** | **Description** |
|
|
2426
|
+
| --- | --- | --- |
|
|
2427
|
+
| <code><a href="#cdk8s.Cron.property.expressionString">expressionString</a></code> | <code>string</code> | Retrieve the expression for this schedule. |
|
|
2428
|
+
|
|
2429
|
+
---
|
|
1767
2430
|
|
|
1768
|
-
##### `expressionString`<sup>Required</sup> <a name="cdk8s.Cron.property.expressionString"></a>
|
|
2431
|
+
##### `expressionString`<sup>Required</sup> <a name="expressionString" id="cdk8s.Cron.property.expressionString"></a>
|
|
1769
2432
|
|
|
1770
2433
|
```typescript
|
|
1771
2434
|
public readonly expressionString: string;
|
|
1772
2435
|
```
|
|
1773
2436
|
|
|
1774
|
-
- *Type:*
|
|
2437
|
+
- *Type:* string
|
|
1775
2438
|
|
|
1776
2439
|
Retrieve the expression for this schedule.
|
|
1777
2440
|
|
|
1778
2441
|
---
|
|
1779
2442
|
|
|
1780
2443
|
|
|
1781
|
-
### DependencyGraph <a name="cdk8s.DependencyGraph"></a>
|
|
2444
|
+
### DependencyGraph <a name="DependencyGraph" id="cdk8s.DependencyGraph"></a>
|
|
1782
2445
|
|
|
1783
2446
|
Represents the dependency graph for a given Node.
|
|
1784
2447
|
|
|
@@ -1791,7 +2454,7 @@ childless children of the root node of the graph.
|
|
|
1791
2454
|
The graph does not include cross-scope dependencies. That is, if a child on the current scope depends on a node
|
|
1792
2455
|
from a different scope, that relationship is not represented in this graph.
|
|
1793
2456
|
|
|
1794
|
-
#### Initializers <a name="cdk8s.DependencyGraph.Initializer"></a>
|
|
2457
|
+
#### Initializers <a name="Initializers" id="cdk8s.DependencyGraph.Initializer"></a>
|
|
1795
2458
|
|
|
1796
2459
|
```typescript
|
|
1797
2460
|
import { DependencyGraph } from 'cdk8s'
|
|
@@ -1799,30 +2462,50 @@ import { DependencyGraph } from 'cdk8s'
|
|
|
1799
2462
|
new DependencyGraph(node: Node)
|
|
1800
2463
|
```
|
|
1801
2464
|
|
|
1802
|
-
|
|
2465
|
+
| **Name** | **Type** | **Description** |
|
|
2466
|
+
| --- | --- | --- |
|
|
2467
|
+
| <code><a href="#cdk8s.DependencyGraph.Initializer.parameter.node">node</a></code> | <code>constructs.Node</code> | *No description.* |
|
|
2468
|
+
|
|
2469
|
+
---
|
|
2470
|
+
|
|
2471
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk8s.DependencyGraph.Initializer.parameter.node"></a>
|
|
1803
2472
|
|
|
1804
|
-
- *Type:*
|
|
2473
|
+
- *Type:* constructs.Node
|
|
1805
2474
|
|
|
1806
2475
|
---
|
|
1807
2476
|
|
|
1808
|
-
#### Methods <a name="Methods"></a>
|
|
2477
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
1809
2478
|
|
|
1810
|
-
|
|
2479
|
+
| **Name** | **Description** |
|
|
2480
|
+
| --- | --- |
|
|
2481
|
+
| <code><a href="#cdk8s.DependencyGraph.topology">topology</a></code> | *No description.* |
|
|
2482
|
+
|
|
2483
|
+
---
|
|
2484
|
+
|
|
2485
|
+
##### `topology` <a name="topology" id="cdk8s.DependencyGraph.topology"></a>
|
|
1811
2486
|
|
|
1812
2487
|
```typescript
|
|
1813
|
-
public topology()
|
|
2488
|
+
public topology(): IConstruct[]
|
|
1814
2489
|
```
|
|
1815
2490
|
|
|
2491
|
+
> [Vertex.topology ()](Vertex.topology ())
|
|
2492
|
+
|
|
1816
2493
|
|
|
1817
|
-
#### Properties <a name="Properties"></a>
|
|
2494
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1818
2495
|
|
|
1819
|
-
|
|
2496
|
+
| **Name** | **Type** | **Description** |
|
|
2497
|
+
| --- | --- | --- |
|
|
2498
|
+
| <code><a href="#cdk8s.DependencyGraph.property.root">root</a></code> | <code><a href="#cdk8s.DependencyVertex">DependencyVertex</a></code> | Returns the root of the graph. |
|
|
2499
|
+
|
|
2500
|
+
---
|
|
2501
|
+
|
|
2502
|
+
##### `root`<sup>Required</sup> <a name="root" id="cdk8s.DependencyGraph.property.root"></a>
|
|
1820
2503
|
|
|
1821
2504
|
```typescript
|
|
1822
2505
|
public readonly root: DependencyVertex;
|
|
1823
2506
|
```
|
|
1824
2507
|
|
|
1825
|
-
- *Type:*
|
|
2508
|
+
- *Type:* <a href="#cdk8s.DependencyVertex">DependencyVertex</a>
|
|
1826
2509
|
|
|
1827
2510
|
Returns the root of the graph.
|
|
1828
2511
|
|
|
@@ -1832,13 +2515,13 @@ that binds all the connected spaces of the graph.
|
|
|
1832
2515
|
---
|
|
1833
2516
|
|
|
1834
2517
|
|
|
1835
|
-
### DependencyVertex <a name="cdk8s.DependencyVertex"></a>
|
|
2518
|
+
### DependencyVertex <a name="DependencyVertex" id="cdk8s.DependencyVertex"></a>
|
|
1836
2519
|
|
|
1837
2520
|
Represents a vertex in the graph.
|
|
1838
2521
|
|
|
1839
2522
|
The value of each vertex is an `IConstruct` that is accessible via the `.value` getter.
|
|
1840
2523
|
|
|
1841
|
-
#### Initializers <a name="cdk8s.DependencyVertex.Initializer"></a>
|
|
2524
|
+
#### Initializers <a name="Initializers" id="cdk8s.DependencyVertex.Initializer"></a>
|
|
1842
2525
|
|
|
1843
2526
|
```typescript
|
|
1844
2527
|
import { DependencyVertex } from 'cdk8s'
|
|
@@ -1846,68 +2529,97 @@ import { DependencyVertex } from 'cdk8s'
|
|
|
1846
2529
|
new DependencyVertex(value?: IConstruct)
|
|
1847
2530
|
```
|
|
1848
2531
|
|
|
1849
|
-
|
|
2532
|
+
| **Name** | **Type** | **Description** |
|
|
2533
|
+
| --- | --- | --- |
|
|
2534
|
+
| <code><a href="#cdk8s.DependencyVertex.Initializer.parameter.value">value</a></code> | <code>constructs.IConstruct</code> | *No description.* |
|
|
2535
|
+
|
|
2536
|
+
---
|
|
2537
|
+
|
|
2538
|
+
##### `value`<sup>Optional</sup> <a name="value" id="cdk8s.DependencyVertex.Initializer.parameter.value"></a>
|
|
1850
2539
|
|
|
1851
|
-
- *Type:*
|
|
2540
|
+
- *Type:* constructs.IConstruct
|
|
1852
2541
|
|
|
1853
2542
|
---
|
|
1854
2543
|
|
|
1855
|
-
#### Methods <a name="Methods"></a>
|
|
2544
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2545
|
+
|
|
2546
|
+
| **Name** | **Description** |
|
|
2547
|
+
| --- | --- |
|
|
2548
|
+
| <code><a href="#cdk8s.DependencyVertex.addChild">addChild</a></code> | Adds a vertex as a dependency of the current node. |
|
|
2549
|
+
| <code><a href="#cdk8s.DependencyVertex.topology">topology</a></code> | Returns a topologically sorted array of the constructs in the sub-graph. |
|
|
2550
|
+
|
|
2551
|
+
---
|
|
1856
2552
|
|
|
1857
|
-
##### `addChild` <a name="cdk8s.DependencyVertex.addChild"></a>
|
|
2553
|
+
##### `addChild` <a name="addChild" id="cdk8s.DependencyVertex.addChild"></a>
|
|
1858
2554
|
|
|
1859
2555
|
```typescript
|
|
1860
|
-
public addChild(dep: DependencyVertex)
|
|
2556
|
+
public addChild(dep: DependencyVertex): void
|
|
1861
2557
|
```
|
|
1862
2558
|
|
|
1863
|
-
|
|
2559
|
+
Adds a vertex as a dependency of the current node.
|
|
2560
|
+
|
|
2561
|
+
Also updates the parents of `dep`, so that it contains this node as a parent.
|
|
2562
|
+
|
|
2563
|
+
This operation will fail in case it creates a cycle in the graph.
|
|
2564
|
+
|
|
2565
|
+
###### `dep`<sup>Required</sup> <a name="dep" id="cdk8s.DependencyVertex.addChild.parameter.dep"></a>
|
|
1864
2566
|
|
|
1865
|
-
- *Type:*
|
|
2567
|
+
- *Type:* <a href="#cdk8s.DependencyVertex">DependencyVertex</a>
|
|
1866
2568
|
|
|
1867
2569
|
The dependency.
|
|
1868
2570
|
|
|
1869
2571
|
---
|
|
1870
2572
|
|
|
1871
|
-
##### `topology` <a name="cdk8s.DependencyVertex.topology"></a>
|
|
2573
|
+
##### `topology` <a name="topology" id="cdk8s.DependencyVertex.topology"></a>
|
|
1872
2574
|
|
|
1873
2575
|
```typescript
|
|
1874
|
-
public topology()
|
|
2576
|
+
public topology(): IConstruct[]
|
|
1875
2577
|
```
|
|
1876
2578
|
|
|
2579
|
+
Returns a topologically sorted array of the constructs in the sub-graph.
|
|
1877
2580
|
|
|
1878
|
-
#### Properties <a name="Properties"></a>
|
|
1879
2581
|
|
|
1880
|
-
|
|
2582
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2583
|
+
|
|
2584
|
+
| **Name** | **Type** | **Description** |
|
|
2585
|
+
| --- | --- | --- |
|
|
2586
|
+
| <code><a href="#cdk8s.DependencyVertex.property.inbound">inbound</a></code> | <code><a href="#cdk8s.DependencyVertex">DependencyVertex</a>[]</code> | Returns the parents of the vertex (i.e dependants). |
|
|
2587
|
+
| <code><a href="#cdk8s.DependencyVertex.property.outbound">outbound</a></code> | <code><a href="#cdk8s.DependencyVertex">DependencyVertex</a>[]</code> | Returns the children of the vertex (i.e dependencies). |
|
|
2588
|
+
| <code><a href="#cdk8s.DependencyVertex.property.value">value</a></code> | <code>constructs.IConstruct</code> | Returns the IConstruct this graph vertex represents. |
|
|
2589
|
+
|
|
2590
|
+
---
|
|
2591
|
+
|
|
2592
|
+
##### `inbound`<sup>Required</sup> <a name="inbound" id="cdk8s.DependencyVertex.property.inbound"></a>
|
|
1881
2593
|
|
|
1882
2594
|
```typescript
|
|
1883
2595
|
public readonly inbound: DependencyVertex[];
|
|
1884
2596
|
```
|
|
1885
2597
|
|
|
1886
|
-
- *Type:*
|
|
2598
|
+
- *Type:* <a href="#cdk8s.DependencyVertex">DependencyVertex</a>[]
|
|
1887
2599
|
|
|
1888
2600
|
Returns the parents of the vertex (i.e dependants).
|
|
1889
2601
|
|
|
1890
2602
|
---
|
|
1891
2603
|
|
|
1892
|
-
##### `outbound`<sup>Required</sup> <a name="cdk8s.DependencyVertex.property.outbound"></a>
|
|
2604
|
+
##### `outbound`<sup>Required</sup> <a name="outbound" id="cdk8s.DependencyVertex.property.outbound"></a>
|
|
1893
2605
|
|
|
1894
2606
|
```typescript
|
|
1895
2607
|
public readonly outbound: DependencyVertex[];
|
|
1896
2608
|
```
|
|
1897
2609
|
|
|
1898
|
-
- *Type:*
|
|
2610
|
+
- *Type:* <a href="#cdk8s.DependencyVertex">DependencyVertex</a>[]
|
|
1899
2611
|
|
|
1900
2612
|
Returns the children of the vertex (i.e dependencies).
|
|
1901
2613
|
|
|
1902
2614
|
---
|
|
1903
2615
|
|
|
1904
|
-
##### `value`<sup>Optional</sup> <a name="cdk8s.DependencyVertex.property.value"></a>
|
|
2616
|
+
##### `value`<sup>Optional</sup> <a name="value" id="cdk8s.DependencyVertex.property.value"></a>
|
|
1905
2617
|
|
|
1906
2618
|
```typescript
|
|
1907
2619
|
public readonly value: IConstruct;
|
|
1908
2620
|
```
|
|
1909
2621
|
|
|
1910
|
-
- *Type:*
|
|
2622
|
+
- *Type:* constructs.IConstruct
|
|
1911
2623
|
|
|
1912
2624
|
Returns the IConstruct this graph vertex represents.
|
|
1913
2625
|
|
|
@@ -1916,96 +2628,138 @@ Returns the IConstruct this graph vertex represents.
|
|
|
1916
2628
|
---
|
|
1917
2629
|
|
|
1918
2630
|
|
|
1919
|
-
### Duration <a name="cdk8s.Duration"></a>
|
|
2631
|
+
### Duration <a name="Duration" id="cdk8s.Duration"></a>
|
|
1920
2632
|
|
|
1921
2633
|
Represents a length of time.
|
|
1922
2634
|
|
|
1923
2635
|
The amount can be specified either as a literal value (e.g: `10`) which
|
|
1924
2636
|
cannot be negative.
|
|
1925
2637
|
|
|
1926
|
-
#### Methods <a name="Methods"></a>
|
|
2638
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
1927
2639
|
|
|
1928
|
-
|
|
2640
|
+
| **Name** | **Description** |
|
|
2641
|
+
| --- | --- |
|
|
2642
|
+
| <code><a href="#cdk8s.Duration.toDays">toDays</a></code> | Return the total number of days in this Duration. |
|
|
2643
|
+
| <code><a href="#cdk8s.Duration.toHours">toHours</a></code> | Return the total number of hours in this Duration. |
|
|
2644
|
+
| <code><a href="#cdk8s.Duration.toHumanString">toHumanString</a></code> | Turn this duration into a human-readable string. |
|
|
2645
|
+
| <code><a href="#cdk8s.Duration.toIsoString">toIsoString</a></code> | Return an ISO 8601 representation of this period. |
|
|
2646
|
+
| <code><a href="#cdk8s.Duration.toMilliseconds">toMilliseconds</a></code> | Return the total number of milliseconds in this Duration. |
|
|
2647
|
+
| <code><a href="#cdk8s.Duration.toMinutes">toMinutes</a></code> | Return the total number of minutes in this Duration. |
|
|
2648
|
+
| <code><a href="#cdk8s.Duration.toSeconds">toSeconds</a></code> | Return the total number of seconds in this Duration. |
|
|
2649
|
+
| <code><a href="#cdk8s.Duration.unitLabel">unitLabel</a></code> | Return unit of Duration. |
|
|
2650
|
+
|
|
2651
|
+
---
|
|
2652
|
+
|
|
2653
|
+
##### `toDays` <a name="toDays" id="cdk8s.Duration.toDays"></a>
|
|
1929
2654
|
|
|
1930
2655
|
```typescript
|
|
1931
|
-
public toDays(opts?: TimeConversionOptions)
|
|
2656
|
+
public toDays(opts?: TimeConversionOptions): number
|
|
1932
2657
|
```
|
|
1933
2658
|
|
|
1934
|
-
|
|
2659
|
+
Return the total number of days in this Duration.
|
|
2660
|
+
|
|
2661
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Duration.toDays.parameter.opts"></a>
|
|
1935
2662
|
|
|
1936
|
-
- *Type:*
|
|
2663
|
+
- *Type:* <a href="#cdk8s.TimeConversionOptions">TimeConversionOptions</a>
|
|
1937
2664
|
|
|
1938
2665
|
---
|
|
1939
2666
|
|
|
1940
|
-
##### `toHours` <a name="cdk8s.Duration.toHours"></a>
|
|
2667
|
+
##### `toHours` <a name="toHours" id="cdk8s.Duration.toHours"></a>
|
|
1941
2668
|
|
|
1942
2669
|
```typescript
|
|
1943
|
-
public toHours(opts?: TimeConversionOptions)
|
|
2670
|
+
public toHours(opts?: TimeConversionOptions): number
|
|
1944
2671
|
```
|
|
1945
2672
|
|
|
1946
|
-
|
|
2673
|
+
Return the total number of hours in this Duration.
|
|
1947
2674
|
|
|
1948
|
-
|
|
2675
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Duration.toHours.parameter.opts"></a>
|
|
2676
|
+
|
|
2677
|
+
- *Type:* <a href="#cdk8s.TimeConversionOptions">TimeConversionOptions</a>
|
|
1949
2678
|
|
|
1950
2679
|
---
|
|
1951
2680
|
|
|
1952
|
-
##### `toHumanString` <a name="cdk8s.Duration.toHumanString"></a>
|
|
2681
|
+
##### `toHumanString` <a name="toHumanString" id="cdk8s.Duration.toHumanString"></a>
|
|
1953
2682
|
|
|
1954
2683
|
```typescript
|
|
1955
|
-
public toHumanString()
|
|
2684
|
+
public toHumanString(): string
|
|
1956
2685
|
```
|
|
1957
2686
|
|
|
1958
|
-
|
|
2687
|
+
Turn this duration into a human-readable string.
|
|
2688
|
+
|
|
2689
|
+
##### `toIsoString` <a name="toIsoString" id="cdk8s.Duration.toIsoString"></a>
|
|
1959
2690
|
|
|
1960
2691
|
```typescript
|
|
1961
|
-
public toIsoString()
|
|
2692
|
+
public toIsoString(): string
|
|
1962
2693
|
```
|
|
1963
2694
|
|
|
1964
|
-
|
|
2695
|
+
Return an ISO 8601 representation of this period.
|
|
2696
|
+
|
|
2697
|
+
> [https://www.iso.org/fr/standard/70907.html](https://www.iso.org/fr/standard/70907.html)
|
|
2698
|
+
|
|
2699
|
+
##### `toMilliseconds` <a name="toMilliseconds" id="cdk8s.Duration.toMilliseconds"></a>
|
|
1965
2700
|
|
|
1966
2701
|
```typescript
|
|
1967
|
-
public toMilliseconds(opts?: TimeConversionOptions)
|
|
2702
|
+
public toMilliseconds(opts?: TimeConversionOptions): number
|
|
1968
2703
|
```
|
|
1969
2704
|
|
|
1970
|
-
|
|
2705
|
+
Return the total number of milliseconds in this Duration.
|
|
1971
2706
|
|
|
1972
|
-
|
|
2707
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Duration.toMilliseconds.parameter.opts"></a>
|
|
2708
|
+
|
|
2709
|
+
- *Type:* <a href="#cdk8s.TimeConversionOptions">TimeConversionOptions</a>
|
|
1973
2710
|
|
|
1974
2711
|
---
|
|
1975
2712
|
|
|
1976
|
-
##### `toMinutes` <a name="cdk8s.Duration.toMinutes"></a>
|
|
2713
|
+
##### `toMinutes` <a name="toMinutes" id="cdk8s.Duration.toMinutes"></a>
|
|
1977
2714
|
|
|
1978
2715
|
```typescript
|
|
1979
|
-
public toMinutes(opts?: TimeConversionOptions)
|
|
2716
|
+
public toMinutes(opts?: TimeConversionOptions): number
|
|
1980
2717
|
```
|
|
1981
2718
|
|
|
1982
|
-
|
|
2719
|
+
Return the total number of minutes in this Duration.
|
|
2720
|
+
|
|
2721
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Duration.toMinutes.parameter.opts"></a>
|
|
1983
2722
|
|
|
1984
|
-
- *Type:*
|
|
2723
|
+
- *Type:* <a href="#cdk8s.TimeConversionOptions">TimeConversionOptions</a>
|
|
1985
2724
|
|
|
1986
2725
|
---
|
|
1987
2726
|
|
|
1988
|
-
##### `toSeconds` <a name="cdk8s.Duration.toSeconds"></a>
|
|
2727
|
+
##### `toSeconds` <a name="toSeconds" id="cdk8s.Duration.toSeconds"></a>
|
|
1989
2728
|
|
|
1990
2729
|
```typescript
|
|
1991
|
-
public toSeconds(opts?: TimeConversionOptions)
|
|
2730
|
+
public toSeconds(opts?: TimeConversionOptions): number
|
|
1992
2731
|
```
|
|
1993
2732
|
|
|
1994
|
-
|
|
2733
|
+
Return the total number of seconds in this Duration.
|
|
1995
2734
|
|
|
1996
|
-
|
|
2735
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Duration.toSeconds.parameter.opts"></a>
|
|
2736
|
+
|
|
2737
|
+
- *Type:* <a href="#cdk8s.TimeConversionOptions">TimeConversionOptions</a>
|
|
1997
2738
|
|
|
1998
2739
|
---
|
|
1999
2740
|
|
|
2000
|
-
##### `unitLabel` <a name="cdk8s.Duration.unitLabel"></a>
|
|
2741
|
+
##### `unitLabel` <a name="unitLabel" id="cdk8s.Duration.unitLabel"></a>
|
|
2001
2742
|
|
|
2002
2743
|
```typescript
|
|
2003
|
-
public unitLabel()
|
|
2744
|
+
public unitLabel(): string
|
|
2004
2745
|
```
|
|
2005
2746
|
|
|
2006
|
-
|
|
2747
|
+
Return unit of Duration.
|
|
2748
|
+
|
|
2749
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
2007
2750
|
|
|
2008
|
-
|
|
2751
|
+
| **Name** | **Description** |
|
|
2752
|
+
| --- | --- |
|
|
2753
|
+
| <code><a href="#cdk8s.Duration.days">days</a></code> | Create a Duration representing an amount of days. |
|
|
2754
|
+
| <code><a href="#cdk8s.Duration.hours">hours</a></code> | Create a Duration representing an amount of hours. |
|
|
2755
|
+
| <code><a href="#cdk8s.Duration.millis">millis</a></code> | Create a Duration representing an amount of milliseconds. |
|
|
2756
|
+
| <code><a href="#cdk8s.Duration.minutes">minutes</a></code> | Create a Duration representing an amount of minutes. |
|
|
2757
|
+
| <code><a href="#cdk8s.Duration.parse">parse</a></code> | Parse a period formatted according to the ISO 8601 standard. |
|
|
2758
|
+
| <code><a href="#cdk8s.Duration.seconds">seconds</a></code> | Create a Duration representing an amount of seconds. |
|
|
2759
|
+
|
|
2760
|
+
---
|
|
2761
|
+
|
|
2762
|
+
##### `days` <a name="days" id="cdk8s.Duration.days"></a>
|
|
2009
2763
|
|
|
2010
2764
|
```typescript
|
|
2011
2765
|
import { Duration } from 'cdk8s'
|
|
@@ -2013,15 +2767,17 @@ import { Duration } from 'cdk8s'
|
|
|
2013
2767
|
Duration.days(amount: number)
|
|
2014
2768
|
```
|
|
2015
2769
|
|
|
2016
|
-
|
|
2770
|
+
Create a Duration representing an amount of days.
|
|
2771
|
+
|
|
2772
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Duration.days.parameter.amount"></a>
|
|
2017
2773
|
|
|
2018
|
-
- *Type:*
|
|
2774
|
+
- *Type:* number
|
|
2019
2775
|
|
|
2020
2776
|
the amount of Days the `Duration` will represent.
|
|
2021
2777
|
|
|
2022
2778
|
---
|
|
2023
2779
|
|
|
2024
|
-
##### `hours` <a name="cdk8s.Duration.hours"></a>
|
|
2780
|
+
##### `hours` <a name="hours" id="cdk8s.Duration.hours"></a>
|
|
2025
2781
|
|
|
2026
2782
|
```typescript
|
|
2027
2783
|
import { Duration } from 'cdk8s'
|
|
@@ -2029,15 +2785,17 @@ import { Duration } from 'cdk8s'
|
|
|
2029
2785
|
Duration.hours(amount: number)
|
|
2030
2786
|
```
|
|
2031
2787
|
|
|
2032
|
-
|
|
2788
|
+
Create a Duration representing an amount of hours.
|
|
2033
2789
|
|
|
2034
|
-
|
|
2790
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Duration.hours.parameter.amount"></a>
|
|
2791
|
+
|
|
2792
|
+
- *Type:* number
|
|
2035
2793
|
|
|
2036
2794
|
the amount of Hours the `Duration` will represent.
|
|
2037
2795
|
|
|
2038
2796
|
---
|
|
2039
2797
|
|
|
2040
|
-
##### `millis` <a name="cdk8s.Duration.millis"></a>
|
|
2798
|
+
##### `millis` <a name="millis" id="cdk8s.Duration.millis"></a>
|
|
2041
2799
|
|
|
2042
2800
|
```typescript
|
|
2043
2801
|
import { Duration } from 'cdk8s'
|
|
@@ -2045,15 +2803,17 @@ import { Duration } from 'cdk8s'
|
|
|
2045
2803
|
Duration.millis(amount: number)
|
|
2046
2804
|
```
|
|
2047
2805
|
|
|
2048
|
-
|
|
2806
|
+
Create a Duration representing an amount of milliseconds.
|
|
2807
|
+
|
|
2808
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Duration.millis.parameter.amount"></a>
|
|
2049
2809
|
|
|
2050
|
-
- *Type:*
|
|
2810
|
+
- *Type:* number
|
|
2051
2811
|
|
|
2052
2812
|
the amount of Milliseconds the `Duration` will represent.
|
|
2053
2813
|
|
|
2054
2814
|
---
|
|
2055
2815
|
|
|
2056
|
-
##### `minutes` <a name="cdk8s.Duration.minutes"></a>
|
|
2816
|
+
##### `minutes` <a name="minutes" id="cdk8s.Duration.minutes"></a>
|
|
2057
2817
|
|
|
2058
2818
|
```typescript
|
|
2059
2819
|
import { Duration } from 'cdk8s'
|
|
@@ -2061,15 +2821,17 @@ import { Duration } from 'cdk8s'
|
|
|
2061
2821
|
Duration.minutes(amount: number)
|
|
2062
2822
|
```
|
|
2063
2823
|
|
|
2064
|
-
|
|
2824
|
+
Create a Duration representing an amount of minutes.
|
|
2065
2825
|
|
|
2066
|
-
|
|
2826
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Duration.minutes.parameter.amount"></a>
|
|
2827
|
+
|
|
2828
|
+
- *Type:* number
|
|
2067
2829
|
|
|
2068
2830
|
the amount of Minutes the `Duration` will represent.
|
|
2069
2831
|
|
|
2070
2832
|
---
|
|
2071
2833
|
|
|
2072
|
-
##### `parse` <a name="cdk8s.Duration.parse"></a>
|
|
2834
|
+
##### `parse` <a name="parse" id="cdk8s.Duration.parse"></a>
|
|
2073
2835
|
|
|
2074
2836
|
```typescript
|
|
2075
2837
|
import { Duration } from 'cdk8s'
|
|
@@ -2077,15 +2839,19 @@ import { Duration } from 'cdk8s'
|
|
|
2077
2839
|
Duration.parse(duration: string)
|
|
2078
2840
|
```
|
|
2079
2841
|
|
|
2080
|
-
|
|
2842
|
+
Parse a period formatted according to the ISO 8601 standard.
|
|
2843
|
+
|
|
2844
|
+
> [https://www.iso.org/fr/standard/70907.html](https://www.iso.org/fr/standard/70907.html)
|
|
2081
2845
|
|
|
2082
|
-
|
|
2846
|
+
###### `duration`<sup>Required</sup> <a name="duration" id="cdk8s.Duration.parse.parameter.duration"></a>
|
|
2847
|
+
|
|
2848
|
+
- *Type:* string
|
|
2083
2849
|
|
|
2084
2850
|
an ISO-formtted duration to be parsed.
|
|
2085
2851
|
|
|
2086
2852
|
---
|
|
2087
2853
|
|
|
2088
|
-
##### `seconds` <a name="cdk8s.Duration.seconds"></a>
|
|
2854
|
+
##### `seconds` <a name="seconds" id="cdk8s.Duration.seconds"></a>
|
|
2089
2855
|
|
|
2090
2856
|
```typescript
|
|
2091
2857
|
import { Duration } from 'cdk8s'
|
|
@@ -2093,9 +2859,11 @@ import { Duration } from 'cdk8s'
|
|
|
2093
2859
|
Duration.seconds(amount: number)
|
|
2094
2860
|
```
|
|
2095
2861
|
|
|
2096
|
-
|
|
2862
|
+
Create a Duration representing an amount of seconds.
|
|
2863
|
+
|
|
2864
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Duration.seconds.parameter.amount"></a>
|
|
2097
2865
|
|
|
2098
|
-
- *Type:*
|
|
2866
|
+
- *Type:* number
|
|
2099
2867
|
|
|
2100
2868
|
the amount of Seconds the `Duration` will represent.
|
|
2101
2869
|
|
|
@@ -2103,13 +2871,13 @@ the amount of Seconds the `Duration` will represent.
|
|
|
2103
2871
|
|
|
2104
2872
|
|
|
2105
2873
|
|
|
2106
|
-
### ImplicitTokenResolver <a name="cdk8s.ImplicitTokenResolver"></a>
|
|
2874
|
+
### ImplicitTokenResolver <a name="ImplicitTokenResolver" id="cdk8s.ImplicitTokenResolver"></a>
|
|
2107
2875
|
|
|
2108
|
-
- *Implements:*
|
|
2876
|
+
- *Implements:* <a href="#cdk8s.IResolver">IResolver</a>
|
|
2109
2877
|
|
|
2110
2878
|
Resolves implicit tokens.
|
|
2111
2879
|
|
|
2112
|
-
#### Initializers <a name="cdk8s.ImplicitTokenResolver.Initializer"></a>
|
|
2880
|
+
#### Initializers <a name="Initializers" id="cdk8s.ImplicitTokenResolver.Initializer"></a>
|
|
2113
2881
|
|
|
2114
2882
|
```typescript
|
|
2115
2883
|
import { ImplicitTokenResolver } from 'cdk8s'
|
|
@@ -2117,24 +2885,39 @@ import { ImplicitTokenResolver } from 'cdk8s'
|
|
|
2117
2885
|
new ImplicitTokenResolver()
|
|
2118
2886
|
```
|
|
2119
2887
|
|
|
2120
|
-
|
|
2888
|
+
| **Name** | **Type** | **Description** |
|
|
2889
|
+
| --- | --- | --- |
|
|
2890
|
+
|
|
2891
|
+
---
|
|
2892
|
+
|
|
2893
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2894
|
+
|
|
2895
|
+
| **Name** | **Description** |
|
|
2896
|
+
| --- | --- |
|
|
2897
|
+
| <code><a href="#cdk8s.ImplicitTokenResolver.resolve">resolve</a></code> | This function is invoked on every property during cdk8s synthesis. |
|
|
2898
|
+
|
|
2899
|
+
---
|
|
2121
2900
|
|
|
2122
|
-
##### `resolve` <a name="cdk8s.ImplicitTokenResolver.resolve"></a>
|
|
2901
|
+
##### `resolve` <a name="resolve" id="cdk8s.ImplicitTokenResolver.resolve"></a>
|
|
2123
2902
|
|
|
2124
2903
|
```typescript
|
|
2125
|
-
public resolve(context: ResolutionContext)
|
|
2904
|
+
public resolve(context: ResolutionContext): void
|
|
2126
2905
|
```
|
|
2127
2906
|
|
|
2128
|
-
|
|
2907
|
+
This function is invoked on every property during cdk8s synthesis.
|
|
2129
2908
|
|
|
2130
|
-
|
|
2909
|
+
To replace a value, implementations must invoke `context.replaceValue`.
|
|
2910
|
+
|
|
2911
|
+
###### `context`<sup>Required</sup> <a name="context" id="cdk8s.ImplicitTokenResolver.resolve.parameter.context"></a>
|
|
2912
|
+
|
|
2913
|
+
- *Type:* <a href="#cdk8s.ResolutionContext">ResolutionContext</a>
|
|
2131
2914
|
|
|
2132
2915
|
---
|
|
2133
2916
|
|
|
2134
2917
|
|
|
2135
2918
|
|
|
2136
2919
|
|
|
2137
|
-
### JsonPatch <a name="cdk8s.JsonPatch"></a>
|
|
2920
|
+
### JsonPatch <a name="JsonPatch" id="cdk8s.JsonPatch"></a>
|
|
2138
2921
|
|
|
2139
2922
|
Utility for applying RFC-6902 JSON-Patch to a document.
|
|
2140
2923
|
|
|
@@ -2144,10 +2927,32 @@ operations to a JSON document and return the result.
|
|
|
2144
2927
|
Operations can be created using the factory methods `JsonPatch.add()`,
|
|
2145
2928
|
`JsonPatch.remove()`, etc.
|
|
2146
2929
|
|
|
2930
|
+
*Example*
|
|
2931
|
+
|
|
2932
|
+
```typescript
|
|
2933
|
+
const output = JsonPatch.apply(input,
|
|
2934
|
+
JsonPatch.replace('/world/hi/there', 'goodbye'),
|
|
2935
|
+
JsonPatch.add('/world/foo/', 'boom'),
|
|
2936
|
+
JsonPatch.remove('/hello'));
|
|
2937
|
+
```
|
|
2938
|
+
|
|
2939
|
+
|
|
2940
|
+
|
|
2941
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
2147
2942
|
|
|
2148
|
-
|
|
2943
|
+
| **Name** | **Description** |
|
|
2944
|
+
| --- | --- |
|
|
2945
|
+
| <code><a href="#cdk8s.JsonPatch.add">add</a></code> | Adds a value to an object or inserts it into an array. |
|
|
2946
|
+
| <code><a href="#cdk8s.JsonPatch.apply">apply</a></code> | Applies a set of JSON-Patch (RFC-6902) operations to `document` and returns the result. |
|
|
2947
|
+
| <code><a href="#cdk8s.JsonPatch.copy">copy</a></code> | Copies a value from one location to another within the JSON document. |
|
|
2948
|
+
| <code><a href="#cdk8s.JsonPatch.move">move</a></code> | Moves a value from one location to the other. |
|
|
2949
|
+
| <code><a href="#cdk8s.JsonPatch.remove">remove</a></code> | Removes a value from an object or array. |
|
|
2950
|
+
| <code><a href="#cdk8s.JsonPatch.replace">replace</a></code> | Replaces a value. |
|
|
2951
|
+
| <code><a href="#cdk8s.JsonPatch.test">test</a></code> | Tests that the specified value is set in the document. |
|
|
2149
2952
|
|
|
2150
|
-
|
|
2953
|
+
---
|
|
2954
|
+
|
|
2955
|
+
##### `add` <a name="add" id="cdk8s.JsonPatch.add"></a>
|
|
2151
2956
|
|
|
2152
2957
|
```typescript
|
|
2153
2958
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2155,19 +2960,32 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2155
2960
|
JsonPatch.add(path: string, value: any)
|
|
2156
2961
|
```
|
|
2157
2962
|
|
|
2158
|
-
|
|
2963
|
+
Adds a value to an object or inserts it into an array.
|
|
2964
|
+
|
|
2965
|
+
In the case of an
|
|
2966
|
+
array, the value is inserted before the given index. The - character can be
|
|
2967
|
+
used instead of an index to insert at the end of an array.
|
|
2968
|
+
|
|
2969
|
+
*Example*
|
|
2970
|
+
|
|
2971
|
+
```typescript
|
|
2972
|
+
JsonPatch.add('/biscuits/1', { "name": "Ginger Nut" })
|
|
2973
|
+
```
|
|
2974
|
+
|
|
2159
2975
|
|
|
2160
|
-
|
|
2976
|
+
###### `path`<sup>Required</sup> <a name="path" id="cdk8s.JsonPatch.add.parameter.path"></a>
|
|
2977
|
+
|
|
2978
|
+
- *Type:* string
|
|
2161
2979
|
|
|
2162
2980
|
---
|
|
2163
2981
|
|
|
2164
|
-
###### `value`<sup>Required</sup> <a name="cdk8s.JsonPatch.parameter.value"></a>
|
|
2982
|
+
###### `value`<sup>Required</sup> <a name="value" id="cdk8s.JsonPatch.add.parameter.value"></a>
|
|
2165
2983
|
|
|
2166
|
-
- *Type:*
|
|
2984
|
+
- *Type:* any
|
|
2167
2985
|
|
|
2168
2986
|
---
|
|
2169
2987
|
|
|
2170
|
-
##### `apply` <a name="cdk8s.JsonPatch.apply"></a>
|
|
2988
|
+
##### `apply` <a name="apply" id="cdk8s.JsonPatch.apply"></a>
|
|
2171
2989
|
|
|
2172
2990
|
```typescript
|
|
2173
2991
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2175,23 +2993,25 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2175
2993
|
JsonPatch.apply(document: any, ops: JsonPatch)
|
|
2176
2994
|
```
|
|
2177
2995
|
|
|
2178
|
-
|
|
2996
|
+
Applies a set of JSON-Patch (RFC-6902) operations to `document` and returns the result.
|
|
2997
|
+
|
|
2998
|
+
###### `document`<sup>Required</sup> <a name="document" id="cdk8s.JsonPatch.apply.parameter.document"></a>
|
|
2179
2999
|
|
|
2180
|
-
- *Type:*
|
|
3000
|
+
- *Type:* any
|
|
2181
3001
|
|
|
2182
3002
|
The document to patch.
|
|
2183
3003
|
|
|
2184
3004
|
---
|
|
2185
3005
|
|
|
2186
|
-
###### `ops`<sup>Required</sup> <a name="cdk8s.JsonPatch.parameter.ops"></a>
|
|
3006
|
+
###### `ops`<sup>Required</sup> <a name="ops" id="cdk8s.JsonPatch.apply.parameter.ops"></a>
|
|
2187
3007
|
|
|
2188
|
-
- *Type:*
|
|
3008
|
+
- *Type:* <a href="#cdk8s.JsonPatch">JsonPatch</a>
|
|
2189
3009
|
|
|
2190
3010
|
The operations to apply.
|
|
2191
3011
|
|
|
2192
3012
|
---
|
|
2193
3013
|
|
|
2194
|
-
##### `copy` <a name="cdk8s.JsonPatch.copy"></a>
|
|
3014
|
+
##### `copy` <a name="copy" id="cdk8s.JsonPatch.copy"></a>
|
|
2195
3015
|
|
|
2196
3016
|
```typescript
|
|
2197
3017
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2199,19 +3019,31 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2199
3019
|
JsonPatch.copy(from: string, path: string)
|
|
2200
3020
|
```
|
|
2201
3021
|
|
|
2202
|
-
|
|
3022
|
+
Copies a value from one location to another within the JSON document.
|
|
3023
|
+
|
|
3024
|
+
Both
|
|
3025
|
+
from and path are JSON Pointers.
|
|
3026
|
+
|
|
3027
|
+
*Example*
|
|
3028
|
+
|
|
3029
|
+
```typescript
|
|
3030
|
+
JsonPatch.copy('/biscuits/0', '/best_biscuit')
|
|
3031
|
+
```
|
|
3032
|
+
|
|
2203
3033
|
|
|
2204
|
-
|
|
3034
|
+
###### `from`<sup>Required</sup> <a name="from" id="cdk8s.JsonPatch.copy.parameter.from"></a>
|
|
3035
|
+
|
|
3036
|
+
- *Type:* string
|
|
2205
3037
|
|
|
2206
3038
|
---
|
|
2207
3039
|
|
|
2208
|
-
###### `path`<sup>Required</sup> <a name="cdk8s.JsonPatch.parameter.path"></a>
|
|
3040
|
+
###### `path`<sup>Required</sup> <a name="path" id="cdk8s.JsonPatch.copy.parameter.path"></a>
|
|
2209
3041
|
|
|
2210
|
-
- *Type:*
|
|
3042
|
+
- *Type:* string
|
|
2211
3043
|
|
|
2212
3044
|
---
|
|
2213
3045
|
|
|
2214
|
-
##### `move` <a name="cdk8s.JsonPatch.move"></a>
|
|
3046
|
+
##### `move` <a name="move" id="cdk8s.JsonPatch.move"></a>
|
|
2215
3047
|
|
|
2216
3048
|
```typescript
|
|
2217
3049
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2219,19 +3051,30 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2219
3051
|
JsonPatch.move(from: string, path: string)
|
|
2220
3052
|
```
|
|
2221
3053
|
|
|
2222
|
-
|
|
3054
|
+
Moves a value from one location to the other.
|
|
3055
|
+
|
|
3056
|
+
Both from and path are JSON Pointers.
|
|
3057
|
+
|
|
3058
|
+
*Example*
|
|
3059
|
+
|
|
3060
|
+
```typescript
|
|
3061
|
+
JsonPatch.move('/biscuits', '/cookies')
|
|
3062
|
+
```
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+
###### `from`<sup>Required</sup> <a name="from" id="cdk8s.JsonPatch.move.parameter.from"></a>
|
|
2223
3066
|
|
|
2224
|
-
- *Type:*
|
|
3067
|
+
- *Type:* string
|
|
2225
3068
|
|
|
2226
3069
|
---
|
|
2227
3070
|
|
|
2228
|
-
###### `path`<sup>Required</sup> <a name="cdk8s.JsonPatch.parameter.path"></a>
|
|
3071
|
+
###### `path`<sup>Required</sup> <a name="path" id="cdk8s.JsonPatch.move.parameter.path"></a>
|
|
2229
3072
|
|
|
2230
|
-
- *Type:*
|
|
3073
|
+
- *Type:* string
|
|
2231
3074
|
|
|
2232
3075
|
---
|
|
2233
3076
|
|
|
2234
|
-
##### `remove` <a name="cdk8s.JsonPatch.remove"></a>
|
|
3077
|
+
##### `remove` <a name="remove" id="cdk8s.JsonPatch.remove"></a>
|
|
2235
3078
|
|
|
2236
3079
|
```typescript
|
|
2237
3080
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2239,13 +3082,22 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2239
3082
|
JsonPatch.remove(path: string)
|
|
2240
3083
|
```
|
|
2241
3084
|
|
|
2242
|
-
|
|
3085
|
+
Removes a value from an object or array.
|
|
2243
3086
|
|
|
2244
|
-
|
|
3087
|
+
*Example*
|
|
3088
|
+
|
|
3089
|
+
```typescript
|
|
3090
|
+
JsonPatch.remove('/biscuits/0')
|
|
3091
|
+
```
|
|
3092
|
+
|
|
3093
|
+
|
|
3094
|
+
###### `path`<sup>Required</sup> <a name="path" id="cdk8s.JsonPatch.remove.parameter.path"></a>
|
|
3095
|
+
|
|
3096
|
+
- *Type:* string
|
|
2245
3097
|
|
|
2246
3098
|
---
|
|
2247
3099
|
|
|
2248
|
-
##### `replace` <a name="cdk8s.JsonPatch.replace"></a>
|
|
3100
|
+
##### `replace` <a name="replace" id="cdk8s.JsonPatch.replace"></a>
|
|
2249
3101
|
|
|
2250
3102
|
```typescript
|
|
2251
3103
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2253,19 +3105,30 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2253
3105
|
JsonPatch.replace(path: string, value: any)
|
|
2254
3106
|
```
|
|
2255
3107
|
|
|
2256
|
-
|
|
3108
|
+
Replaces a value.
|
|
3109
|
+
|
|
3110
|
+
Equivalent to a “remove” followed by an “add”.
|
|
3111
|
+
|
|
3112
|
+
*Example*
|
|
3113
|
+
|
|
3114
|
+
```typescript
|
|
3115
|
+
JsonPatch.replace('/biscuits/0/name', 'Chocolate Digestive')
|
|
3116
|
+
```
|
|
3117
|
+
|
|
2257
3118
|
|
|
2258
|
-
|
|
3119
|
+
###### `path`<sup>Required</sup> <a name="path" id="cdk8s.JsonPatch.replace.parameter.path"></a>
|
|
3120
|
+
|
|
3121
|
+
- *Type:* string
|
|
2259
3122
|
|
|
2260
3123
|
---
|
|
2261
3124
|
|
|
2262
|
-
###### `value`<sup>Required</sup> <a name="cdk8s.JsonPatch.parameter.value"></a>
|
|
3125
|
+
###### `value`<sup>Required</sup> <a name="value" id="cdk8s.JsonPatch.replace.parameter.value"></a>
|
|
2263
3126
|
|
|
2264
|
-
- *Type:*
|
|
3127
|
+
- *Type:* any
|
|
2265
3128
|
|
|
2266
3129
|
---
|
|
2267
3130
|
|
|
2268
|
-
##### `test` <a name="cdk8s.JsonPatch.test"></a>
|
|
3131
|
+
##### `test` <a name="test" id="cdk8s.JsonPatch.test"></a>
|
|
2269
3132
|
|
|
2270
3133
|
```typescript
|
|
2271
3134
|
import { JsonPatch } from 'cdk8s'
|
|
@@ -2273,33 +3136,57 @@ import { JsonPatch } from 'cdk8s'
|
|
|
2273
3136
|
JsonPatch.test(path: string, value: any)
|
|
2274
3137
|
```
|
|
2275
3138
|
|
|
2276
|
-
|
|
3139
|
+
Tests that the specified value is set in the document.
|
|
3140
|
+
|
|
3141
|
+
If the test fails,
|
|
3142
|
+
then the patch as a whole should not apply.
|
|
3143
|
+
|
|
3144
|
+
*Example*
|
|
3145
|
+
|
|
3146
|
+
```typescript
|
|
3147
|
+
JsonPatch.test('/best_biscuit/name', 'Choco Leibniz')
|
|
3148
|
+
```
|
|
3149
|
+
|
|
3150
|
+
|
|
3151
|
+
###### `path`<sup>Required</sup> <a name="path" id="cdk8s.JsonPatch.test.parameter.path"></a>
|
|
2277
3152
|
|
|
2278
|
-
- *Type:*
|
|
3153
|
+
- *Type:* string
|
|
2279
3154
|
|
|
2280
3155
|
---
|
|
2281
3156
|
|
|
2282
|
-
###### `value`<sup>Required</sup> <a name="cdk8s.JsonPatch.parameter.value"></a>
|
|
3157
|
+
###### `value`<sup>Required</sup> <a name="value" id="cdk8s.JsonPatch.test.parameter.value"></a>
|
|
2283
3158
|
|
|
2284
|
-
- *Type:*
|
|
3159
|
+
- *Type:* any
|
|
2285
3160
|
|
|
2286
3161
|
---
|
|
2287
3162
|
|
|
2288
3163
|
|
|
2289
3164
|
|
|
2290
|
-
### Lazy <a name="cdk8s.Lazy"></a>
|
|
3165
|
+
### Lazy <a name="Lazy" id="cdk8s.Lazy"></a>
|
|
2291
3166
|
|
|
2292
|
-
#### Methods <a name="Methods"></a>
|
|
3167
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2293
3168
|
|
|
2294
|
-
|
|
3169
|
+
| **Name** | **Description** |
|
|
3170
|
+
| --- | --- |
|
|
3171
|
+
| <code><a href="#cdk8s.Lazy.produce">produce</a></code> | *No description.* |
|
|
3172
|
+
|
|
3173
|
+
---
|
|
3174
|
+
|
|
3175
|
+
##### `produce` <a name="produce" id="cdk8s.Lazy.produce"></a>
|
|
2295
3176
|
|
|
2296
3177
|
```typescript
|
|
2297
|
-
public produce()
|
|
3178
|
+
public produce(): any
|
|
2298
3179
|
```
|
|
2299
3180
|
|
|
2300
|
-
#### Static Functions <a name="Static Functions"></a>
|
|
3181
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
3182
|
+
|
|
3183
|
+
| **Name** | **Description** |
|
|
3184
|
+
| --- | --- |
|
|
3185
|
+
| <code><a href="#cdk8s.Lazy.any">any</a></code> | *No description.* |
|
|
2301
3186
|
|
|
2302
|
-
|
|
3187
|
+
---
|
|
3188
|
+
|
|
3189
|
+
##### `any` <a name="any" id="cdk8s.Lazy.any"></a>
|
|
2303
3190
|
|
|
2304
3191
|
```typescript
|
|
2305
3192
|
import { Lazy } from 'cdk8s'
|
|
@@ -2307,21 +3194,21 @@ import { Lazy } from 'cdk8s'
|
|
|
2307
3194
|
Lazy.any(producer: IAnyProducer)
|
|
2308
3195
|
```
|
|
2309
3196
|
|
|
2310
|
-
###### `producer`<sup>Required</sup> <a name="cdk8s.Lazy.parameter.producer"></a>
|
|
3197
|
+
###### `producer`<sup>Required</sup> <a name="producer" id="cdk8s.Lazy.any.parameter.producer"></a>
|
|
2311
3198
|
|
|
2312
|
-
- *Type:*
|
|
3199
|
+
- *Type:* <a href="#cdk8s.IAnyProducer">IAnyProducer</a>
|
|
2313
3200
|
|
|
2314
3201
|
---
|
|
2315
3202
|
|
|
2316
3203
|
|
|
2317
3204
|
|
|
2318
|
-
### LazyResolver <a name="cdk8s.LazyResolver"></a>
|
|
3205
|
+
### LazyResolver <a name="LazyResolver" id="cdk8s.LazyResolver"></a>
|
|
2319
3206
|
|
|
2320
|
-
- *Implements:*
|
|
3207
|
+
- *Implements:* <a href="#cdk8s.IResolver">IResolver</a>
|
|
2321
3208
|
|
|
2322
3209
|
Resolvers instanecs of `Lazy`.
|
|
2323
3210
|
|
|
2324
|
-
#### Initializers <a name="cdk8s.LazyResolver.Initializer"></a>
|
|
3211
|
+
#### Initializers <a name="Initializers" id="cdk8s.LazyResolver.Initializer"></a>
|
|
2325
3212
|
|
|
2326
3213
|
```typescript
|
|
2327
3214
|
import { LazyResolver } from 'cdk8s'
|
|
@@ -2329,31 +3216,53 @@ import { LazyResolver } from 'cdk8s'
|
|
|
2329
3216
|
new LazyResolver()
|
|
2330
3217
|
```
|
|
2331
3218
|
|
|
2332
|
-
|
|
3219
|
+
| **Name** | **Type** | **Description** |
|
|
3220
|
+
| --- | --- | --- |
|
|
3221
|
+
|
|
3222
|
+
---
|
|
3223
|
+
|
|
3224
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
3225
|
+
|
|
3226
|
+
| **Name** | **Description** |
|
|
3227
|
+
| --- | --- |
|
|
3228
|
+
| <code><a href="#cdk8s.LazyResolver.resolve">resolve</a></code> | This function is invoked on every property during cdk8s synthesis. |
|
|
3229
|
+
|
|
3230
|
+
---
|
|
2333
3231
|
|
|
2334
|
-
##### `resolve` <a name="cdk8s.LazyResolver.resolve"></a>
|
|
3232
|
+
##### `resolve` <a name="resolve" id="cdk8s.LazyResolver.resolve"></a>
|
|
2335
3233
|
|
|
2336
3234
|
```typescript
|
|
2337
|
-
public resolve(context: ResolutionContext)
|
|
3235
|
+
public resolve(context: ResolutionContext): void
|
|
2338
3236
|
```
|
|
2339
3237
|
|
|
2340
|
-
|
|
3238
|
+
This function is invoked on every property during cdk8s synthesis.
|
|
2341
3239
|
|
|
2342
|
-
|
|
3240
|
+
To replace a value, implementations must invoke `context.replaceValue`.
|
|
3241
|
+
|
|
3242
|
+
###### `context`<sup>Required</sup> <a name="context" id="cdk8s.LazyResolver.resolve.parameter.context"></a>
|
|
3243
|
+
|
|
3244
|
+
- *Type:* <a href="#cdk8s.ResolutionContext">ResolutionContext</a>
|
|
2343
3245
|
|
|
2344
3246
|
---
|
|
2345
3247
|
|
|
2346
3248
|
|
|
2347
3249
|
|
|
2348
3250
|
|
|
2349
|
-
### Names <a name="cdk8s.Names"></a>
|
|
3251
|
+
### Names <a name="Names" id="cdk8s.Names"></a>
|
|
2350
3252
|
|
|
2351
3253
|
Utilities for generating unique and stable names.
|
|
2352
3254
|
|
|
2353
3255
|
|
|
2354
|
-
#### Static Functions <a name="Static Functions"></a>
|
|
3256
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
3257
|
+
|
|
3258
|
+
| **Name** | **Description** |
|
|
3259
|
+
| --- | --- |
|
|
3260
|
+
| <code><a href="#cdk8s.Names.toDnsLabel">toDnsLabel</a></code> | Generates a unique and stable name compatible DNS_LABEL from RFC-1123 from a path. |
|
|
3261
|
+
| <code><a href="#cdk8s.Names.toLabelValue">toLabelValue</a></code> | Generates a unique and stable name compatible label key name segment and label value from a path. |
|
|
3262
|
+
|
|
3263
|
+
---
|
|
2355
3264
|
|
|
2356
|
-
##### `toDnsLabel` <a name="cdk8s.Names.toDnsLabel"></a>
|
|
3265
|
+
##### `toDnsLabel` <a name="toDnsLabel" id="cdk8s.Names.toDnsLabel"></a>
|
|
2357
3266
|
|
|
2358
3267
|
```typescript
|
|
2359
3268
|
import { Names } from 'cdk8s'
|
|
@@ -2361,23 +3270,42 @@ import { Names } from 'cdk8s'
|
|
|
2361
3270
|
Names.toDnsLabel(scope: Construct, options?: NameOptions)
|
|
2362
3271
|
```
|
|
2363
3272
|
|
|
2364
|
-
|
|
3273
|
+
Generates a unique and stable name compatible DNS_LABEL from RFC-1123 from a path.
|
|
3274
|
+
|
|
3275
|
+
The generated name will:
|
|
3276
|
+
- contain at most 63 characters
|
|
3277
|
+
- contain only lowercase alphanumeric characters or ‘-’
|
|
3278
|
+
- start with an alphanumeric character
|
|
3279
|
+
- end with an alphanumeric character
|
|
3280
|
+
|
|
3281
|
+
The generated name will have the form:
|
|
3282
|
+
<comp0>-<comp1>-..-<compN>-<short-hash>
|
|
3283
|
+
|
|
3284
|
+
Where <comp> are the path components (assuming they are is separated by
|
|
3285
|
+
"/").
|
|
2365
3286
|
|
|
2366
|
-
|
|
3287
|
+
Note that if the total length is longer than 63 characters, we will trim
|
|
3288
|
+
the first components since the last components usually encode more meaning.
|
|
3289
|
+
|
|
3290
|
+
> [https://tools.ietf.org/html/rfc1123](https://tools.ietf.org/html/rfc1123)
|
|
3291
|
+
|
|
3292
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="cdk8s.Names.toDnsLabel.parameter.scope"></a>
|
|
3293
|
+
|
|
3294
|
+
- *Type:* constructs.Construct
|
|
2367
3295
|
|
|
2368
3296
|
The construct for which to render the DNS label.
|
|
2369
3297
|
|
|
2370
3298
|
---
|
|
2371
3299
|
|
|
2372
|
-
###### `options`<sup>Optional</sup> <a name="cdk8s.Names.parameter.options"></a>
|
|
3300
|
+
###### `options`<sup>Optional</sup> <a name="options" id="cdk8s.Names.toDnsLabel.parameter.options"></a>
|
|
2373
3301
|
|
|
2374
|
-
- *Type:*
|
|
3302
|
+
- *Type:* <a href="#cdk8s.NameOptions">NameOptions</a>
|
|
2375
3303
|
|
|
2376
3304
|
Name options.
|
|
2377
3305
|
|
|
2378
3306
|
---
|
|
2379
3307
|
|
|
2380
|
-
##### `toLabelValue` <a name="cdk8s.Names.toLabelValue"></a>
|
|
3308
|
+
##### `toLabelValue` <a name="toLabelValue" id="cdk8s.Names.toLabelValue"></a>
|
|
2381
3309
|
|
|
2382
3310
|
```typescript
|
|
2383
3311
|
import { Names } from 'cdk8s'
|
|
@@ -2385,17 +3313,38 @@ import { Names } from 'cdk8s'
|
|
|
2385
3313
|
Names.toLabelValue(scope: Construct, options?: NameOptions)
|
|
2386
3314
|
```
|
|
2387
3315
|
|
|
2388
|
-
|
|
3316
|
+
Generates a unique and stable name compatible label key name segment and label value from a path.
|
|
3317
|
+
|
|
3318
|
+
The name segment is required and must be 63 characters or less, beginning
|
|
3319
|
+
and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-),
|
|
3320
|
+
underscores (_), dots (.), and alphanumerics between.
|
|
3321
|
+
|
|
3322
|
+
Valid label values must be 63 characters or less and must be empty or
|
|
3323
|
+
begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes
|
|
3324
|
+
(-), underscores (_), dots (.), and alphanumerics between.
|
|
3325
|
+
|
|
3326
|
+
The generated name will have the form:
|
|
3327
|
+
<comp0><delim><comp1><delim>..<delim><compN><delim><short-hash>
|
|
3328
|
+
|
|
3329
|
+
Where <comp> are the path components (assuming they are is separated by
|
|
3330
|
+
"/").
|
|
3331
|
+
|
|
3332
|
+
Note that if the total length is longer than 63 characters, we will trim
|
|
3333
|
+
the first components since the last components usually encode more meaning.
|
|
2389
3334
|
|
|
2390
|
-
|
|
3335
|
+
> [https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set)
|
|
3336
|
+
|
|
3337
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="cdk8s.Names.toLabelValue.parameter.scope"></a>
|
|
3338
|
+
|
|
3339
|
+
- *Type:* constructs.Construct
|
|
2391
3340
|
|
|
2392
3341
|
The construct for which to render the DNS label.
|
|
2393
3342
|
|
|
2394
3343
|
---
|
|
2395
3344
|
|
|
2396
|
-
###### `options`<sup>Optional</sup> <a name="cdk8s.Names.parameter.options"></a>
|
|
3345
|
+
###### `options`<sup>Optional</sup> <a name="options" id="cdk8s.Names.toLabelValue.parameter.options"></a>
|
|
2397
3346
|
|
|
2398
|
-
- *Type:*
|
|
3347
|
+
- *Type:* <a href="#cdk8s.NameOptions">NameOptions</a>
|
|
2399
3348
|
|
|
2400
3349
|
Name options.
|
|
2401
3350
|
|
|
@@ -2403,15 +3352,15 @@ Name options.
|
|
|
2403
3352
|
|
|
2404
3353
|
|
|
2405
3354
|
|
|
2406
|
-
### NumberStringUnionResolver <a name="cdk8s.NumberStringUnionResolver"></a>
|
|
3355
|
+
### NumberStringUnionResolver <a name="NumberStringUnionResolver" id="cdk8s.NumberStringUnionResolver"></a>
|
|
2407
3356
|
|
|
2408
|
-
- *Implements:*
|
|
3357
|
+
- *Implements:* <a href="#cdk8s.IResolver">IResolver</a>
|
|
2409
3358
|
|
|
2410
3359
|
Resolves union types that allow using either number or string (as generated by the CLI).
|
|
2411
3360
|
|
|
2412
3361
|
E.g IntOrString, Quantity, ...
|
|
2413
3362
|
|
|
2414
|
-
#### Initializers <a name="cdk8s.NumberStringUnionResolver.Initializer"></a>
|
|
3363
|
+
#### Initializers <a name="Initializers" id="cdk8s.NumberStringUnionResolver.Initializer"></a>
|
|
2415
3364
|
|
|
2416
3365
|
```typescript
|
|
2417
3366
|
import { NumberStringUnionResolver } from 'cdk8s'
|
|
@@ -2419,28 +3368,43 @@ import { NumberStringUnionResolver } from 'cdk8s'
|
|
|
2419
3368
|
new NumberStringUnionResolver()
|
|
2420
3369
|
```
|
|
2421
3370
|
|
|
2422
|
-
|
|
3371
|
+
| **Name** | **Type** | **Description** |
|
|
3372
|
+
| --- | --- | --- |
|
|
3373
|
+
|
|
3374
|
+
---
|
|
3375
|
+
|
|
3376
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
3377
|
+
|
|
3378
|
+
| **Name** | **Description** |
|
|
3379
|
+
| --- | --- |
|
|
3380
|
+
| <code><a href="#cdk8s.NumberStringUnionResolver.resolve">resolve</a></code> | This function is invoked on every property during cdk8s synthesis. |
|
|
3381
|
+
|
|
3382
|
+
---
|
|
2423
3383
|
|
|
2424
|
-
##### `resolve` <a name="cdk8s.NumberStringUnionResolver.resolve"></a>
|
|
3384
|
+
##### `resolve` <a name="resolve" id="cdk8s.NumberStringUnionResolver.resolve"></a>
|
|
2425
3385
|
|
|
2426
3386
|
```typescript
|
|
2427
|
-
public resolve(context: ResolutionContext)
|
|
3387
|
+
public resolve(context: ResolutionContext): void
|
|
2428
3388
|
```
|
|
2429
3389
|
|
|
2430
|
-
|
|
3390
|
+
This function is invoked on every property during cdk8s synthesis.
|
|
2431
3391
|
|
|
2432
|
-
|
|
3392
|
+
To replace a value, implementations must invoke `context.replaceValue`.
|
|
3393
|
+
|
|
3394
|
+
###### `context`<sup>Required</sup> <a name="context" id="cdk8s.NumberStringUnionResolver.resolve.parameter.context"></a>
|
|
3395
|
+
|
|
3396
|
+
- *Type:* <a href="#cdk8s.ResolutionContext">ResolutionContext</a>
|
|
2433
3397
|
|
|
2434
3398
|
---
|
|
2435
3399
|
|
|
2436
3400
|
|
|
2437
3401
|
|
|
2438
3402
|
|
|
2439
|
-
### ResolutionContext <a name="cdk8s.ResolutionContext"></a>
|
|
3403
|
+
### ResolutionContext <a name="ResolutionContext" id="cdk8s.ResolutionContext"></a>
|
|
2440
3404
|
|
|
2441
3405
|
Context object for a specific resolution process.
|
|
2442
3406
|
|
|
2443
|
-
#### Initializers <a name="cdk8s.ResolutionContext.Initializer"></a>
|
|
3407
|
+
#### Initializers <a name="Initializers" id="cdk8s.ResolutionContext.Initializer"></a>
|
|
2444
3408
|
|
|
2445
3409
|
```typescript
|
|
2446
3410
|
import { ResolutionContext } from 'cdk8s'
|
|
@@ -2448,109 +3412,137 @@ import { ResolutionContext } from 'cdk8s'
|
|
|
2448
3412
|
new ResolutionContext(obj: ApiObject, key: string[], value: any)
|
|
2449
3413
|
```
|
|
2450
3414
|
|
|
2451
|
-
|
|
3415
|
+
| **Name** | **Type** | **Description** |
|
|
3416
|
+
| --- | --- | --- |
|
|
3417
|
+
| <code><a href="#cdk8s.ResolutionContext.Initializer.parameter.obj">obj</a></code> | <code><a href="#cdk8s.ApiObject">ApiObject</a></code> | Which ApiObject is currently being resolved. |
|
|
3418
|
+
| <code><a href="#cdk8s.ResolutionContext.Initializer.parameter.key">key</a></code> | <code>string[]</code> | Which key is currently being resolved. |
|
|
3419
|
+
| <code><a href="#cdk8s.ResolutionContext.Initializer.parameter.value">value</a></code> | <code>any</code> | The value associated to the key currently being resolved. |
|
|
3420
|
+
|
|
3421
|
+
---
|
|
3422
|
+
|
|
3423
|
+
##### `obj`<sup>Required</sup> <a name="obj" id="cdk8s.ResolutionContext.Initializer.parameter.obj"></a>
|
|
2452
3424
|
|
|
2453
|
-
- *Type:*
|
|
3425
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>
|
|
2454
3426
|
|
|
2455
3427
|
Which ApiObject is currently being resolved.
|
|
2456
3428
|
|
|
2457
3429
|
---
|
|
2458
3430
|
|
|
2459
|
-
##### `key`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.key"></a>
|
|
3431
|
+
##### `key`<sup>Required</sup> <a name="key" id="cdk8s.ResolutionContext.Initializer.parameter.key"></a>
|
|
2460
3432
|
|
|
2461
|
-
- *Type:*
|
|
3433
|
+
- *Type:* string[]
|
|
2462
3434
|
|
|
2463
3435
|
Which key is currently being resolved.
|
|
2464
3436
|
|
|
2465
3437
|
---
|
|
2466
3438
|
|
|
2467
|
-
##### `value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.value"></a>
|
|
3439
|
+
##### `value`<sup>Required</sup> <a name="value" id="cdk8s.ResolutionContext.Initializer.parameter.value"></a>
|
|
2468
3440
|
|
|
2469
|
-
- *Type:*
|
|
3441
|
+
- *Type:* any
|
|
2470
3442
|
|
|
2471
3443
|
The value associated to the key currently being resolved.
|
|
2472
3444
|
|
|
2473
3445
|
---
|
|
2474
3446
|
|
|
2475
|
-
#### Methods <a name="Methods"></a>
|
|
3447
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
3448
|
+
|
|
3449
|
+
| **Name** | **Description** |
|
|
3450
|
+
| --- | --- |
|
|
3451
|
+
| <code><a href="#cdk8s.ResolutionContext.replaceValue">replaceValue</a></code> | Replaces the original value in this resolution context with a new value. |
|
|
3452
|
+
|
|
3453
|
+
---
|
|
2476
3454
|
|
|
2477
|
-
##### `replaceValue` <a name="cdk8s.ResolutionContext.replaceValue"></a>
|
|
3455
|
+
##### `replaceValue` <a name="replaceValue" id="cdk8s.ResolutionContext.replaceValue"></a>
|
|
2478
3456
|
|
|
2479
3457
|
```typescript
|
|
2480
|
-
public replaceValue(newValue: any)
|
|
3458
|
+
public replaceValue(newValue: any): void
|
|
2481
3459
|
```
|
|
2482
3460
|
|
|
2483
|
-
|
|
3461
|
+
Replaces the original value in this resolution context with a new value.
|
|
2484
3462
|
|
|
2485
|
-
|
|
3463
|
+
The new value is what will end up in the manifest.
|
|
3464
|
+
|
|
3465
|
+
###### `newValue`<sup>Required</sup> <a name="newValue" id="cdk8s.ResolutionContext.replaceValue.parameter.newValue"></a>
|
|
3466
|
+
|
|
3467
|
+
- *Type:* any
|
|
2486
3468
|
|
|
2487
3469
|
---
|
|
2488
3470
|
|
|
2489
3471
|
|
|
2490
|
-
#### Properties <a name="Properties"></a>
|
|
3472
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
3473
|
+
|
|
3474
|
+
| **Name** | **Type** | **Description** |
|
|
3475
|
+
| --- | --- | --- |
|
|
3476
|
+
| <code><a href="#cdk8s.ResolutionContext.property.key">key</a></code> | <code>string[]</code> | Which key is currently being resolved. |
|
|
3477
|
+
| <code><a href="#cdk8s.ResolutionContext.property.obj">obj</a></code> | <code><a href="#cdk8s.ApiObject">ApiObject</a></code> | Which ApiObject is currently being resolved. |
|
|
3478
|
+
| <code><a href="#cdk8s.ResolutionContext.property.value">value</a></code> | <code>any</code> | The value associated to the key currently being resolved. |
|
|
3479
|
+
| <code><a href="#cdk8s.ResolutionContext.property.replaced">replaced</a></code> | <code>boolean</code> | Whether or not the value was replaced by invoking the `replaceValue` method. |
|
|
3480
|
+
| <code><a href="#cdk8s.ResolutionContext.property.replacedValue">replacedValue</a></code> | <code>any</code> | The replaced value that was set via the `replaceValue` method. |
|
|
3481
|
+
|
|
3482
|
+
---
|
|
2491
3483
|
|
|
2492
|
-
##### `key`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.key"></a>
|
|
3484
|
+
##### `key`<sup>Required</sup> <a name="key" id="cdk8s.ResolutionContext.property.key"></a>
|
|
2493
3485
|
|
|
2494
3486
|
```typescript
|
|
2495
3487
|
public readonly key: string[];
|
|
2496
3488
|
```
|
|
2497
3489
|
|
|
2498
|
-
- *Type:*
|
|
3490
|
+
- *Type:* string[]
|
|
2499
3491
|
|
|
2500
3492
|
Which key is currently being resolved.
|
|
2501
3493
|
|
|
2502
3494
|
---
|
|
2503
3495
|
|
|
2504
|
-
##### `obj`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.obj"></a>
|
|
3496
|
+
##### `obj`<sup>Required</sup> <a name="obj" id="cdk8s.ResolutionContext.property.obj"></a>
|
|
2505
3497
|
|
|
2506
3498
|
```typescript
|
|
2507
3499
|
public readonly obj: ApiObject;
|
|
2508
3500
|
```
|
|
2509
3501
|
|
|
2510
|
-
- *Type:*
|
|
3502
|
+
- *Type:* <a href="#cdk8s.ApiObject">ApiObject</a>
|
|
2511
3503
|
|
|
2512
3504
|
Which ApiObject is currently being resolved.
|
|
2513
3505
|
|
|
2514
3506
|
---
|
|
2515
3507
|
|
|
2516
|
-
##### `value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.value"></a>
|
|
3508
|
+
##### `value`<sup>Required</sup> <a name="value" id="cdk8s.ResolutionContext.property.value"></a>
|
|
2517
3509
|
|
|
2518
3510
|
```typescript
|
|
2519
3511
|
public readonly value: any;
|
|
2520
3512
|
```
|
|
2521
3513
|
|
|
2522
|
-
- *Type:*
|
|
3514
|
+
- *Type:* any
|
|
2523
3515
|
|
|
2524
3516
|
The value associated to the key currently being resolved.
|
|
2525
3517
|
|
|
2526
3518
|
---
|
|
2527
3519
|
|
|
2528
|
-
##### `replaced`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.replaced"></a>
|
|
3520
|
+
##### `replaced`<sup>Required</sup> <a name="replaced" id="cdk8s.ResolutionContext.property.replaced"></a>
|
|
2529
3521
|
|
|
2530
3522
|
```typescript
|
|
2531
3523
|
public readonly replaced: boolean;
|
|
2532
3524
|
```
|
|
2533
3525
|
|
|
2534
|
-
- *Type:*
|
|
3526
|
+
- *Type:* boolean
|
|
2535
3527
|
|
|
2536
3528
|
Whether or not the value was replaced by invoking the `replaceValue` method.
|
|
2537
3529
|
|
|
2538
3530
|
---
|
|
2539
3531
|
|
|
2540
|
-
##### `replacedValue`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.replacedValue"></a>
|
|
3532
|
+
##### `replacedValue`<sup>Required</sup> <a name="replacedValue" id="cdk8s.ResolutionContext.property.replacedValue"></a>
|
|
2541
3533
|
|
|
2542
3534
|
```typescript
|
|
2543
3535
|
public readonly replacedValue: any;
|
|
2544
3536
|
```
|
|
2545
3537
|
|
|
2546
|
-
- *Type:*
|
|
3538
|
+
- *Type:* any
|
|
2547
3539
|
|
|
2548
3540
|
The replaced value that was set via the `replaceValue` method.
|
|
2549
3541
|
|
|
2550
3542
|
---
|
|
2551
3543
|
|
|
2552
3544
|
|
|
2553
|
-
### Size <a name="cdk8s.Size"></a>
|
|
3545
|
+
### Size <a name="Size" id="cdk8s.Size"></a>
|
|
2554
3546
|
|
|
2555
3547
|
Represents the amount of digital storage.
|
|
2556
3548
|
|
|
@@ -2559,71 +3551,101 @@ cannot be negative.
|
|
|
2559
3551
|
|
|
2560
3552
|
When the amount is passed as a token, unit conversion is not possible.
|
|
2561
3553
|
|
|
2562
|
-
#### Methods <a name="Methods"></a>
|
|
3554
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
3555
|
+
|
|
3556
|
+
| **Name** | **Description** |
|
|
3557
|
+
| --- | --- |
|
|
3558
|
+
| <code><a href="#cdk8s.Size.toGibibytes">toGibibytes</a></code> | Return this storage as a total number of gibibytes. |
|
|
3559
|
+
| <code><a href="#cdk8s.Size.toKibibytes">toKibibytes</a></code> | Return this storage as a total number of kibibytes. |
|
|
3560
|
+
| <code><a href="#cdk8s.Size.toMebibytes">toMebibytes</a></code> | Return this storage as a total number of mebibytes. |
|
|
3561
|
+
| <code><a href="#cdk8s.Size.toPebibytes">toPebibytes</a></code> | Return this storage as a total number of pebibytes. |
|
|
3562
|
+
| <code><a href="#cdk8s.Size.toTebibytes">toTebibytes</a></code> | Return this storage as a total number of tebibytes. |
|
|
3563
|
+
|
|
3564
|
+
---
|
|
2563
3565
|
|
|
2564
|
-
##### `toGibibytes` <a name="cdk8s.Size.toGibibytes"></a>
|
|
3566
|
+
##### `toGibibytes` <a name="toGibibytes" id="cdk8s.Size.toGibibytes"></a>
|
|
2565
3567
|
|
|
2566
3568
|
```typescript
|
|
2567
|
-
public toGibibytes(opts?: SizeConversionOptions)
|
|
3569
|
+
public toGibibytes(opts?: SizeConversionOptions): number
|
|
2568
3570
|
```
|
|
2569
3571
|
|
|
2570
|
-
|
|
3572
|
+
Return this storage as a total number of gibibytes.
|
|
2571
3573
|
|
|
2572
|
-
|
|
3574
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Size.toGibibytes.parameter.opts"></a>
|
|
3575
|
+
|
|
3576
|
+
- *Type:* <a href="#cdk8s.SizeConversionOptions">SizeConversionOptions</a>
|
|
2573
3577
|
|
|
2574
3578
|
---
|
|
2575
3579
|
|
|
2576
|
-
##### `toKibibytes` <a name="cdk8s.Size.toKibibytes"></a>
|
|
3580
|
+
##### `toKibibytes` <a name="toKibibytes" id="cdk8s.Size.toKibibytes"></a>
|
|
2577
3581
|
|
|
2578
3582
|
```typescript
|
|
2579
|
-
public toKibibytes(opts?: SizeConversionOptions)
|
|
3583
|
+
public toKibibytes(opts?: SizeConversionOptions): number
|
|
2580
3584
|
```
|
|
2581
3585
|
|
|
2582
|
-
|
|
3586
|
+
Return this storage as a total number of kibibytes.
|
|
3587
|
+
|
|
3588
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Size.toKibibytes.parameter.opts"></a>
|
|
2583
3589
|
|
|
2584
|
-
- *Type:*
|
|
3590
|
+
- *Type:* <a href="#cdk8s.SizeConversionOptions">SizeConversionOptions</a>
|
|
2585
3591
|
|
|
2586
3592
|
---
|
|
2587
3593
|
|
|
2588
|
-
##### `toMebibytes` <a name="cdk8s.Size.toMebibytes"></a>
|
|
3594
|
+
##### `toMebibytes` <a name="toMebibytes" id="cdk8s.Size.toMebibytes"></a>
|
|
2589
3595
|
|
|
2590
3596
|
```typescript
|
|
2591
|
-
public toMebibytes(opts?: SizeConversionOptions)
|
|
3597
|
+
public toMebibytes(opts?: SizeConversionOptions): number
|
|
2592
3598
|
```
|
|
2593
3599
|
|
|
2594
|
-
|
|
3600
|
+
Return this storage as a total number of mebibytes.
|
|
2595
3601
|
|
|
2596
|
-
|
|
3602
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Size.toMebibytes.parameter.opts"></a>
|
|
3603
|
+
|
|
3604
|
+
- *Type:* <a href="#cdk8s.SizeConversionOptions">SizeConversionOptions</a>
|
|
2597
3605
|
|
|
2598
3606
|
---
|
|
2599
3607
|
|
|
2600
|
-
##### `toPebibytes` <a name="cdk8s.Size.toPebibytes"></a>
|
|
3608
|
+
##### `toPebibytes` <a name="toPebibytes" id="cdk8s.Size.toPebibytes"></a>
|
|
2601
3609
|
|
|
2602
3610
|
```typescript
|
|
2603
|
-
public toPebibytes(opts?: SizeConversionOptions)
|
|
3611
|
+
public toPebibytes(opts?: SizeConversionOptions): number
|
|
2604
3612
|
```
|
|
2605
3613
|
|
|
2606
|
-
|
|
3614
|
+
Return this storage as a total number of pebibytes.
|
|
3615
|
+
|
|
3616
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Size.toPebibytes.parameter.opts"></a>
|
|
2607
3617
|
|
|
2608
|
-
- *Type:*
|
|
3618
|
+
- *Type:* <a href="#cdk8s.SizeConversionOptions">SizeConversionOptions</a>
|
|
2609
3619
|
|
|
2610
3620
|
---
|
|
2611
3621
|
|
|
2612
|
-
##### `toTebibytes` <a name="cdk8s.Size.toTebibytes"></a>
|
|
3622
|
+
##### `toTebibytes` <a name="toTebibytes" id="cdk8s.Size.toTebibytes"></a>
|
|
2613
3623
|
|
|
2614
3624
|
```typescript
|
|
2615
|
-
public toTebibytes(opts?: SizeConversionOptions)
|
|
3625
|
+
public toTebibytes(opts?: SizeConversionOptions): number
|
|
2616
3626
|
```
|
|
2617
3627
|
|
|
2618
|
-
|
|
3628
|
+
Return this storage as a total number of tebibytes.
|
|
2619
3629
|
|
|
2620
|
-
|
|
3630
|
+
###### `opts`<sup>Optional</sup> <a name="opts" id="cdk8s.Size.toTebibytes.parameter.opts"></a>
|
|
3631
|
+
|
|
3632
|
+
- *Type:* <a href="#cdk8s.SizeConversionOptions">SizeConversionOptions</a>
|
|
2621
3633
|
|
|
2622
3634
|
---
|
|
2623
3635
|
|
|
2624
|
-
#### Static Functions <a name="Static Functions"></a>
|
|
3636
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
3637
|
+
|
|
3638
|
+
| **Name** | **Description** |
|
|
3639
|
+
| --- | --- |
|
|
3640
|
+
| <code><a href="#cdk8s.Size.gibibytes">gibibytes</a></code> | Create a Storage representing an amount gibibytes. |
|
|
3641
|
+
| <code><a href="#cdk8s.Size.kibibytes">kibibytes</a></code> | Create a Storage representing an amount kibibytes. |
|
|
3642
|
+
| <code><a href="#cdk8s.Size.mebibytes">mebibytes</a></code> | Create a Storage representing an amount mebibytes. |
|
|
3643
|
+
| <code><a href="#cdk8s.Size.pebibyte">pebibyte</a></code> | Create a Storage representing an amount pebibytes. |
|
|
3644
|
+
| <code><a href="#cdk8s.Size.tebibytes">tebibytes</a></code> | Create a Storage representing an amount tebibytes. |
|
|
3645
|
+
|
|
3646
|
+
---
|
|
2625
3647
|
|
|
2626
|
-
##### `gibibytes` <a name="cdk8s.Size.gibibytes"></a>
|
|
3648
|
+
##### `gibibytes` <a name="gibibytes" id="cdk8s.Size.gibibytes"></a>
|
|
2627
3649
|
|
|
2628
3650
|
```typescript
|
|
2629
3651
|
import { Size } from 'cdk8s'
|
|
@@ -2631,13 +3653,17 @@ import { Size } from 'cdk8s'
|
|
|
2631
3653
|
Size.gibibytes(amount: number)
|
|
2632
3654
|
```
|
|
2633
3655
|
|
|
2634
|
-
|
|
3656
|
+
Create a Storage representing an amount gibibytes.
|
|
2635
3657
|
|
|
2636
|
-
|
|
3658
|
+
1 GiB = 1024 MiB
|
|
3659
|
+
|
|
3660
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Size.gibibytes.parameter.amount"></a>
|
|
3661
|
+
|
|
3662
|
+
- *Type:* number
|
|
2637
3663
|
|
|
2638
3664
|
---
|
|
2639
3665
|
|
|
2640
|
-
##### `kibibytes` <a name="cdk8s.Size.kibibytes"></a>
|
|
3666
|
+
##### `kibibytes` <a name="kibibytes" id="cdk8s.Size.kibibytes"></a>
|
|
2641
3667
|
|
|
2642
3668
|
```typescript
|
|
2643
3669
|
import { Size } from 'cdk8s'
|
|
@@ -2645,13 +3671,17 @@ import { Size } from 'cdk8s'
|
|
|
2645
3671
|
Size.kibibytes(amount: number)
|
|
2646
3672
|
```
|
|
2647
3673
|
|
|
2648
|
-
|
|
3674
|
+
Create a Storage representing an amount kibibytes.
|
|
3675
|
+
|
|
3676
|
+
1 KiB = 1024 bytes
|
|
3677
|
+
|
|
3678
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Size.kibibytes.parameter.amount"></a>
|
|
2649
3679
|
|
|
2650
|
-
- *Type:*
|
|
3680
|
+
- *Type:* number
|
|
2651
3681
|
|
|
2652
3682
|
---
|
|
2653
3683
|
|
|
2654
|
-
##### `mebibytes` <a name="cdk8s.Size.mebibytes"></a>
|
|
3684
|
+
##### `mebibytes` <a name="mebibytes" id="cdk8s.Size.mebibytes"></a>
|
|
2655
3685
|
|
|
2656
3686
|
```typescript
|
|
2657
3687
|
import { Size } from 'cdk8s'
|
|
@@ -2659,13 +3689,17 @@ import { Size } from 'cdk8s'
|
|
|
2659
3689
|
Size.mebibytes(amount: number)
|
|
2660
3690
|
```
|
|
2661
3691
|
|
|
2662
|
-
|
|
3692
|
+
Create a Storage representing an amount mebibytes.
|
|
2663
3693
|
|
|
2664
|
-
|
|
3694
|
+
1 MiB = 1024 KiB
|
|
3695
|
+
|
|
3696
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Size.mebibytes.parameter.amount"></a>
|
|
3697
|
+
|
|
3698
|
+
- *Type:* number
|
|
2665
3699
|
|
|
2666
3700
|
---
|
|
2667
3701
|
|
|
2668
|
-
##### `pebibyte` <a name="cdk8s.Size.pebibyte"></a>
|
|
3702
|
+
##### `pebibyte` <a name="pebibyte" id="cdk8s.Size.pebibyte"></a>
|
|
2669
3703
|
|
|
2670
3704
|
```typescript
|
|
2671
3705
|
import { Size } from 'cdk8s'
|
|
@@ -2673,13 +3707,17 @@ import { Size } from 'cdk8s'
|
|
|
2673
3707
|
Size.pebibyte(amount: number)
|
|
2674
3708
|
```
|
|
2675
3709
|
|
|
2676
|
-
|
|
3710
|
+
Create a Storage representing an amount pebibytes.
|
|
3711
|
+
|
|
3712
|
+
1 PiB = 1024 TiB
|
|
3713
|
+
|
|
3714
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Size.pebibyte.parameter.amount"></a>
|
|
2677
3715
|
|
|
2678
|
-
- *Type:*
|
|
3716
|
+
- *Type:* number
|
|
2679
3717
|
|
|
2680
3718
|
---
|
|
2681
3719
|
|
|
2682
|
-
##### `tebibytes` <a name="cdk8s.Size.tebibytes"></a>
|
|
3720
|
+
##### `tebibytes` <a name="tebibytes" id="cdk8s.Size.tebibytes"></a>
|
|
2683
3721
|
|
|
2684
3722
|
```typescript
|
|
2685
3723
|
import { Size } from 'cdk8s'
|
|
@@ -2687,22 +3725,34 @@ import { Size } from 'cdk8s'
|
|
|
2687
3725
|
Size.tebibytes(amount: number)
|
|
2688
3726
|
```
|
|
2689
3727
|
|
|
2690
|
-
|
|
3728
|
+
Create a Storage representing an amount tebibytes.
|
|
2691
3729
|
|
|
2692
|
-
|
|
3730
|
+
1 TiB = 1024 GiB
|
|
3731
|
+
|
|
3732
|
+
###### `amount`<sup>Required</sup> <a name="amount" id="cdk8s.Size.tebibytes.parameter.amount"></a>
|
|
3733
|
+
|
|
3734
|
+
- *Type:* number
|
|
2693
3735
|
|
|
2694
3736
|
---
|
|
2695
3737
|
|
|
2696
3738
|
|
|
2697
3739
|
|
|
2698
|
-
### Testing <a name="cdk8s.Testing"></a>
|
|
3740
|
+
### Testing <a name="Testing" id="cdk8s.Testing"></a>
|
|
2699
3741
|
|
|
2700
3742
|
Testing utilities for cdk8s applications.
|
|
2701
3743
|
|
|
2702
3744
|
|
|
2703
|
-
#### Static Functions <a name="Static Functions"></a>
|
|
3745
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
3746
|
+
|
|
3747
|
+
| **Name** | **Description** |
|
|
3748
|
+
| --- | --- |
|
|
3749
|
+
| <code><a href="#cdk8s.Testing.app">app</a></code> | Returns an app for testing with the following properties: - Output directory is a temp dir. |
|
|
3750
|
+
| <code><a href="#cdk8s.Testing.chart">chart</a></code> | *No description.* |
|
|
3751
|
+
| <code><a href="#cdk8s.Testing.synth">synth</a></code> | Returns the Kubernetes manifest synthesized from this chart. |
|
|
3752
|
+
|
|
3753
|
+
---
|
|
2704
3754
|
|
|
2705
|
-
##### `app` <a name="cdk8s.Testing.app"></a>
|
|
3755
|
+
##### `app` <a name="app" id="cdk8s.Testing.app"></a>
|
|
2706
3756
|
|
|
2707
3757
|
```typescript
|
|
2708
3758
|
import { Testing } from 'cdk8s'
|
|
@@ -2710,13 +3760,15 @@ import { Testing } from 'cdk8s'
|
|
|
2710
3760
|
Testing.app(props?: AppProps)
|
|
2711
3761
|
```
|
|
2712
3762
|
|
|
2713
|
-
|
|
3763
|
+
Returns an app for testing with the following properties: - Output directory is a temp dir.
|
|
3764
|
+
|
|
3765
|
+
###### `props`<sup>Optional</sup> <a name="props" id="cdk8s.Testing.app.parameter.props"></a>
|
|
2714
3766
|
|
|
2715
|
-
- *Type:*
|
|
3767
|
+
- *Type:* <a href="#cdk8s.AppProps">AppProps</a>
|
|
2716
3768
|
|
|
2717
3769
|
---
|
|
2718
3770
|
|
|
2719
|
-
##### `chart` <a name="cdk8s.Testing.chart"></a>
|
|
3771
|
+
##### `chart` <a name="chart" id="cdk8s.Testing.chart"></a>
|
|
2720
3772
|
|
|
2721
3773
|
```typescript
|
|
2722
3774
|
import { Testing } from 'cdk8s'
|
|
@@ -2724,7 +3776,7 @@ import { Testing } from 'cdk8s'
|
|
|
2724
3776
|
Testing.chart()
|
|
2725
3777
|
```
|
|
2726
3778
|
|
|
2727
|
-
##### `synth` <a name="cdk8s.Testing.synth"></a>
|
|
3779
|
+
##### `synth` <a name="synth" id="cdk8s.Testing.synth"></a>
|
|
2728
3780
|
|
|
2729
3781
|
```typescript
|
|
2730
3782
|
import { Testing } from 'cdk8s'
|
|
@@ -2732,22 +3784,34 @@ import { Testing } from 'cdk8s'
|
|
|
2732
3784
|
Testing.synth(chart: Chart)
|
|
2733
3785
|
```
|
|
2734
3786
|
|
|
2735
|
-
|
|
3787
|
+
Returns the Kubernetes manifest synthesized from this chart.
|
|
2736
3788
|
|
|
2737
|
-
|
|
3789
|
+
###### `chart`<sup>Required</sup> <a name="chart" id="cdk8s.Testing.synth.parameter.chart"></a>
|
|
3790
|
+
|
|
3791
|
+
- *Type:* <a href="#cdk8s.Chart">Chart</a>
|
|
2738
3792
|
|
|
2739
3793
|
---
|
|
2740
3794
|
|
|
2741
3795
|
|
|
2742
3796
|
|
|
2743
|
-
### Yaml <a name="cdk8s.Yaml"></a>
|
|
3797
|
+
### Yaml <a name="Yaml" id="cdk8s.Yaml"></a>
|
|
2744
3798
|
|
|
2745
3799
|
YAML utilities.
|
|
2746
3800
|
|
|
2747
3801
|
|
|
2748
|
-
#### Static Functions <a name="Static Functions"></a>
|
|
3802
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
3803
|
+
|
|
3804
|
+
| **Name** | **Description** |
|
|
3805
|
+
| --- | --- |
|
|
3806
|
+
| <code><a href="#cdk8s.Yaml.formatObjects">formatObjects</a></code> | *No description.* |
|
|
3807
|
+
| <code><a href="#cdk8s.Yaml.load">load</a></code> | Downloads a set of YAML documents (k8s manifest for example) from a URL or a file and returns them as javascript objects. |
|
|
3808
|
+
| <code><a href="#cdk8s.Yaml.save">save</a></code> | Saves a set of objects as a multi-document YAML file. |
|
|
3809
|
+
| <code><a href="#cdk8s.Yaml.stringify">stringify</a></code> | Stringify a document (or multiple documents) into YAML. |
|
|
3810
|
+
| <code><a href="#cdk8s.Yaml.tmp">tmp</a></code> | Saves a set of YAML documents into a temp file (in /tmp). |
|
|
2749
3811
|
|
|
2750
|
-
|
|
3812
|
+
---
|
|
3813
|
+
|
|
3814
|
+
##### ~~`formatObjects`~~ <a name="formatObjects" id="cdk8s.Yaml.formatObjects"></a>
|
|
2751
3815
|
|
|
2752
3816
|
```typescript
|
|
2753
3817
|
import { Yaml } from 'cdk8s'
|
|
@@ -2755,13 +3819,13 @@ import { Yaml } from 'cdk8s'
|
|
|
2755
3819
|
Yaml.formatObjects(docs: any[])
|
|
2756
3820
|
```
|
|
2757
3821
|
|
|
2758
|
-
###### `docs`<sup>Required</sup> <a name="cdk8s.Yaml.parameter.docs"></a>
|
|
3822
|
+
###### `docs`<sup>Required</sup> <a name="docs" id="cdk8s.Yaml.formatObjects.parameter.docs"></a>
|
|
2759
3823
|
|
|
2760
|
-
- *Type:*
|
|
3824
|
+
- *Type:* any[]
|
|
2761
3825
|
|
|
2762
3826
|
---
|
|
2763
3827
|
|
|
2764
|
-
##### `load` <a name="cdk8s.Yaml.load"></a>
|
|
3828
|
+
##### `load` <a name="load" id="cdk8s.Yaml.load"></a>
|
|
2765
3829
|
|
|
2766
3830
|
```typescript
|
|
2767
3831
|
import { Yaml } from 'cdk8s'
|
|
@@ -2769,15 +3833,19 @@ import { Yaml } from 'cdk8s'
|
|
|
2769
3833
|
Yaml.load(urlOrFile: string)
|
|
2770
3834
|
```
|
|
2771
3835
|
|
|
2772
|
-
|
|
3836
|
+
Downloads a set of YAML documents (k8s manifest for example) from a URL or a file and returns them as javascript objects.
|
|
3837
|
+
|
|
3838
|
+
Empty documents are filtered out.
|
|
3839
|
+
|
|
3840
|
+
###### `urlOrFile`<sup>Required</sup> <a name="urlOrFile" id="cdk8s.Yaml.load.parameter.urlOrFile"></a>
|
|
2773
3841
|
|
|
2774
|
-
- *Type:*
|
|
3842
|
+
- *Type:* string
|
|
2775
3843
|
|
|
2776
3844
|
a URL of a file path to load from.
|
|
2777
3845
|
|
|
2778
3846
|
---
|
|
2779
3847
|
|
|
2780
|
-
##### `save` <a name="cdk8s.Yaml.save"></a>
|
|
3848
|
+
##### `save` <a name="save" id="cdk8s.Yaml.save"></a>
|
|
2781
3849
|
|
|
2782
3850
|
```typescript
|
|
2783
3851
|
import { Yaml } from 'cdk8s'
|
|
@@ -2785,23 +3853,25 @@ import { Yaml } from 'cdk8s'
|
|
|
2785
3853
|
Yaml.save(filePath: string, docs: any[])
|
|
2786
3854
|
```
|
|
2787
3855
|
|
|
2788
|
-
|
|
3856
|
+
Saves a set of objects as a multi-document YAML file.
|
|
2789
3857
|
|
|
2790
|
-
|
|
3858
|
+
###### `filePath`<sup>Required</sup> <a name="filePath" id="cdk8s.Yaml.save.parameter.filePath"></a>
|
|
3859
|
+
|
|
3860
|
+
- *Type:* string
|
|
2791
3861
|
|
|
2792
3862
|
The output path.
|
|
2793
3863
|
|
|
2794
3864
|
---
|
|
2795
3865
|
|
|
2796
|
-
###### `docs`<sup>Required</sup> <a name="cdk8s.Yaml.parameter.docs"></a>
|
|
3866
|
+
###### `docs`<sup>Required</sup> <a name="docs" id="cdk8s.Yaml.save.parameter.docs"></a>
|
|
2797
3867
|
|
|
2798
|
-
- *Type:*
|
|
3868
|
+
- *Type:* any[]
|
|
2799
3869
|
|
|
2800
3870
|
The set of objects.
|
|
2801
3871
|
|
|
2802
3872
|
---
|
|
2803
3873
|
|
|
2804
|
-
##### `stringify` <a name="cdk8s.Yaml.stringify"></a>
|
|
3874
|
+
##### `stringify` <a name="stringify" id="cdk8s.Yaml.stringify"></a>
|
|
2805
3875
|
|
|
2806
3876
|
```typescript
|
|
2807
3877
|
import { Yaml } from 'cdk8s'
|
|
@@ -2809,15 +3879,20 @@ import { Yaml } from 'cdk8s'
|
|
|
2809
3879
|
Yaml.stringify(docs: any)
|
|
2810
3880
|
```
|
|
2811
3881
|
|
|
2812
|
-
|
|
3882
|
+
Stringify a document (or multiple documents) into YAML.
|
|
3883
|
+
|
|
3884
|
+
We convert undefined values to null, but ignore any documents that are
|
|
3885
|
+
undefined.
|
|
2813
3886
|
|
|
2814
|
-
|
|
3887
|
+
###### `docs`<sup>Required</sup> <a name="docs" id="cdk8s.Yaml.stringify.parameter.docs"></a>
|
|
3888
|
+
|
|
3889
|
+
- *Type:* any
|
|
2815
3890
|
|
|
2816
3891
|
A set of objects to convert to YAML.
|
|
2817
3892
|
|
|
2818
3893
|
---
|
|
2819
3894
|
|
|
2820
|
-
##### `tmp` <a name="cdk8s.Yaml.tmp"></a>
|
|
3895
|
+
##### `tmp` <a name="tmp" id="cdk8s.Yaml.tmp"></a>
|
|
2821
3896
|
|
|
2822
3897
|
```typescript
|
|
2823
3898
|
import { Yaml } from 'cdk8s'
|
|
@@ -2825,9 +3900,11 @@ import { Yaml } from 'cdk8s'
|
|
|
2825
3900
|
Yaml.tmp(docs: any[])
|
|
2826
3901
|
```
|
|
2827
3902
|
|
|
2828
|
-
|
|
3903
|
+
Saves a set of YAML documents into a temp file (in /tmp).
|
|
3904
|
+
|
|
3905
|
+
###### `docs`<sup>Required</sup> <a name="docs" id="cdk8s.Yaml.tmp.parameter.docs"></a>
|
|
2829
3906
|
|
|
2830
|
-
- *Type:*
|
|
3907
|
+
- *Type:* any[]
|
|
2831
3908
|
|
|
2832
3909
|
the set of documents to save.
|
|
2833
3910
|
|
|
@@ -2835,63 +3912,89 @@ the set of documents to save.
|
|
|
2835
3912
|
|
|
2836
3913
|
|
|
2837
3914
|
|
|
2838
|
-
## Protocols <a name="Protocols"></a>
|
|
3915
|
+
## Protocols <a name="Protocols" id="Protocols"></a>
|
|
2839
3916
|
|
|
2840
|
-
### IAnyProducer <a name="cdk8s.IAnyProducer"></a>
|
|
3917
|
+
### IAnyProducer <a name="IAnyProducer" id="cdk8s.IAnyProducer"></a>
|
|
2841
3918
|
|
|
2842
|
-
- *Implemented By:*
|
|
3919
|
+
- *Implemented By:* <a href="#cdk8s.IAnyProducer">IAnyProducer</a>
|
|
2843
3920
|
|
|
2844
|
-
#### Methods <a name="Methods"></a>
|
|
3921
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2845
3922
|
|
|
2846
|
-
|
|
3923
|
+
| **Name** | **Description** |
|
|
3924
|
+
| --- | --- |
|
|
3925
|
+
| <code><a href="#cdk8s.IAnyProducer.produce">produce</a></code> | *No description.* |
|
|
3926
|
+
|
|
3927
|
+
---
|
|
3928
|
+
|
|
3929
|
+
##### `produce` <a name="produce" id="cdk8s.IAnyProducer.produce"></a>
|
|
2847
3930
|
|
|
2848
3931
|
```typescript
|
|
2849
|
-
public produce()
|
|
3932
|
+
public produce(): any
|
|
2850
3933
|
```
|
|
2851
3934
|
|
|
2852
3935
|
|
|
2853
|
-
### IResolver <a name="cdk8s.IResolver"></a>
|
|
3936
|
+
### IResolver <a name="IResolver" id="cdk8s.IResolver"></a>
|
|
2854
3937
|
|
|
2855
|
-
- *Implemented By:*
|
|
3938
|
+
- *Implemented By:* <a href="#cdk8s.ImplicitTokenResolver">ImplicitTokenResolver</a>, <a href="#cdk8s.LazyResolver">LazyResolver</a>, <a href="#cdk8s.NumberStringUnionResolver">NumberStringUnionResolver</a>, <a href="#cdk8s.IResolver">IResolver</a>
|
|
2856
3939
|
|
|
2857
3940
|
Contract for resolver objects.
|
|
2858
3941
|
|
|
2859
|
-
#### Methods <a name="Methods"></a>
|
|
3942
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
3943
|
+
|
|
3944
|
+
| **Name** | **Description** |
|
|
3945
|
+
| --- | --- |
|
|
3946
|
+
| <code><a href="#cdk8s.IResolver.resolve">resolve</a></code> | This function is invoked on every property during cdk8s synthesis. |
|
|
2860
3947
|
|
|
2861
|
-
|
|
3948
|
+
---
|
|
3949
|
+
|
|
3950
|
+
##### `resolve` <a name="resolve" id="cdk8s.IResolver.resolve"></a>
|
|
2862
3951
|
|
|
2863
3952
|
```typescript
|
|
2864
|
-
public resolve(context: ResolutionContext)
|
|
3953
|
+
public resolve(context: ResolutionContext): void
|
|
2865
3954
|
```
|
|
2866
3955
|
|
|
2867
|
-
|
|
3956
|
+
This function is invoked on every property during cdk8s synthesis.
|
|
3957
|
+
|
|
3958
|
+
To replace a value, implementations must invoke `context.replaceValue`.
|
|
3959
|
+
|
|
3960
|
+
###### `context`<sup>Required</sup> <a name="context" id="cdk8s.IResolver.resolve.parameter.context"></a>
|
|
2868
3961
|
|
|
2869
|
-
- *Type:*
|
|
3962
|
+
- *Type:* <a href="#cdk8s.ResolutionContext">ResolutionContext</a>
|
|
2870
3963
|
|
|
2871
3964
|
---
|
|
2872
3965
|
|
|
2873
3966
|
|
|
2874
|
-
## Enums <a name="Enums"></a>
|
|
3967
|
+
## Enums <a name="Enums" id="Enums"></a>
|
|
2875
3968
|
|
|
2876
|
-
### SizeRoundingBehavior <a name="SizeRoundingBehavior"></a>
|
|
3969
|
+
### SizeRoundingBehavior <a name="SizeRoundingBehavior" id="cdk8s.SizeRoundingBehavior"></a>
|
|
2877
3970
|
|
|
2878
3971
|
Rounding behaviour when converting between units of `Size`.
|
|
2879
3972
|
|
|
2880
|
-
####
|
|
3973
|
+
#### Members <a name="Members" id="Members"></a>
|
|
3974
|
+
|
|
3975
|
+
| **Name** | **Description** |
|
|
3976
|
+
| --- | --- |
|
|
3977
|
+
| <code><a href="#cdk8s.SizeRoundingBehavior.FAIL">FAIL</a></code> | Fail the conversion if the result is not an integer. |
|
|
3978
|
+
| <code><a href="#cdk8s.SizeRoundingBehavior.FLOOR">FLOOR</a></code> | If the result is not an integer, round it to the closest integer less than the result. |
|
|
3979
|
+
| <code><a href="#cdk8s.SizeRoundingBehavior.NONE">NONE</a></code> | Don't round. |
|
|
3980
|
+
|
|
3981
|
+
---
|
|
3982
|
+
|
|
3983
|
+
##### `FAIL` <a name="FAIL" id="cdk8s.SizeRoundingBehavior.FAIL"></a>
|
|
2881
3984
|
|
|
2882
3985
|
Fail the conversion if the result is not an integer.
|
|
2883
3986
|
|
|
2884
3987
|
---
|
|
2885
3988
|
|
|
2886
3989
|
|
|
2887
|
-
|
|
3990
|
+
##### `FLOOR` <a name="FLOOR" id="cdk8s.SizeRoundingBehavior.FLOOR"></a>
|
|
2888
3991
|
|
|
2889
3992
|
If the result is not an integer, round it to the closest integer less than the result.
|
|
2890
3993
|
|
|
2891
3994
|
---
|
|
2892
3995
|
|
|
2893
3996
|
|
|
2894
|
-
|
|
3997
|
+
##### `NONE` <a name="NONE" id="cdk8s.SizeRoundingBehavior.NONE"></a>
|
|
2895
3998
|
|
|
2896
3999
|
Don't round.
|
|
2897
4000
|
|
|
@@ -2900,32 +4003,43 @@ Return even if the result is a fraction.
|
|
|
2900
4003
|
---
|
|
2901
4004
|
|
|
2902
4005
|
|
|
2903
|
-
### YamlOutputType <a name="YamlOutputType"></a>
|
|
4006
|
+
### YamlOutputType <a name="YamlOutputType" id="cdk8s.YamlOutputType"></a>
|
|
2904
4007
|
|
|
2905
4008
|
The method to divide YAML output into files.
|
|
2906
4009
|
|
|
2907
|
-
####
|
|
4010
|
+
#### Members <a name="Members" id="Members"></a>
|
|
4011
|
+
|
|
4012
|
+
| **Name** | **Description** |
|
|
4013
|
+
| --- | --- |
|
|
4014
|
+
| <code><a href="#cdk8s.YamlOutputType.FILE_PER_APP">FILE_PER_APP</a></code> | All resources are output into a single YAML file. |
|
|
4015
|
+
| <code><a href="#cdk8s.YamlOutputType.FILE_PER_CHART">FILE_PER_CHART</a></code> | Resources are split into seperate files by chart. |
|
|
4016
|
+
| <code><a href="#cdk8s.YamlOutputType.FILE_PER_RESOURCE">FILE_PER_RESOURCE</a></code> | Each resource is output to its own file. |
|
|
4017
|
+
| <code><a href="#cdk8s.YamlOutputType.FOLDER_PER_CHART_FILE_PER_RESOURCE">FOLDER_PER_CHART_FILE_PER_RESOURCE</a></code> | Each chart in its own folder and each resource in its own file. |
|
|
4018
|
+
|
|
4019
|
+
---
|
|
4020
|
+
|
|
4021
|
+
##### `FILE_PER_APP` <a name="FILE_PER_APP" id="cdk8s.YamlOutputType.FILE_PER_APP"></a>
|
|
2908
4022
|
|
|
2909
4023
|
All resources are output into a single YAML file.
|
|
2910
4024
|
|
|
2911
4025
|
---
|
|
2912
4026
|
|
|
2913
4027
|
|
|
2914
|
-
|
|
4028
|
+
##### `FILE_PER_CHART` <a name="FILE_PER_CHART" id="cdk8s.YamlOutputType.FILE_PER_CHART"></a>
|
|
2915
4029
|
|
|
2916
4030
|
Resources are split into seperate files by chart.
|
|
2917
4031
|
|
|
2918
4032
|
---
|
|
2919
4033
|
|
|
2920
4034
|
|
|
2921
|
-
|
|
4035
|
+
##### `FILE_PER_RESOURCE` <a name="FILE_PER_RESOURCE" id="cdk8s.YamlOutputType.FILE_PER_RESOURCE"></a>
|
|
2922
4036
|
|
|
2923
4037
|
Each resource is output to its own file.
|
|
2924
4038
|
|
|
2925
4039
|
---
|
|
2926
4040
|
|
|
2927
4041
|
|
|
2928
|
-
|
|
4042
|
+
##### `FOLDER_PER_CHART_FILE_PER_RESOURCE` <a name="FOLDER_PER_CHART_FILE_PER_RESOURCE" id="cdk8s.YamlOutputType.FOLDER_PER_CHART_FILE_PER_RESOURCE"></a>
|
|
2929
4043
|
|
|
2930
4044
|
Each chart in its own folder and each resource in its own file.
|
|
2931
4045
|
|