cdk8s 2.64.25 → 2.65.1
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 +442 -46
- package/docs/java.md +444 -6
- package/docs/python.md +475 -7
- package/docs/typescript.md +407 -3
- package/lib/api-object.js +5 -4
- package/lib/app.d.ts +19 -2
- package/lib/app.js +4 -2
- 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/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/json-patch.js +1 -1
- package/lib/lazy.js +1 -1
- package/lib/metadata.d.ts +15 -1
- package/lib/metadata.js +10 -7
- package/lib/names.js +1 -1
- package/lib/resolve.d.ts +70 -0
- package/lib/resolve.js +105 -0
- package/lib/size.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +1 -1
- package/lib/_resolve.d.ts +0 -1
- package/lib/_resolve.js +0 -32
package/docs/python.md
CHANGED
|
@@ -232,6 +232,7 @@ cdk8s.App(
|
|
|
232
232
|
outdir: str = None,
|
|
233
233
|
output_file_extension: str = None,
|
|
234
234
|
record_construct_metadata: bool = None,
|
|
235
|
+
resolvers: typing.List[IResolver] = None,
|
|
235
236
|
yaml_output_type: YamlOutputType = None
|
|
236
237
|
)
|
|
237
238
|
```
|
|
@@ -271,6 +272,21 @@ When set to true, the output directory will contain a `construct-metadata.json`
|
|
|
271
272
|
|
|
272
273
|
---
|
|
273
274
|
|
|
275
|
+
##### `resolvers`<sup>Optional</sup> <a name="cdk8s.AppProps.parameter.resolvers"></a>
|
|
276
|
+
|
|
277
|
+
- *Type:* typing.List[[`cdk8s.IResolver`](#cdk8s.IResolver)]
|
|
278
|
+
- *Default:* no resolvers.
|
|
279
|
+
|
|
280
|
+
A list of resolvers that can be used to replace property values before they are written to the manifest file.
|
|
281
|
+
|
|
282
|
+
When multiple resolvers are passed,
|
|
283
|
+
they are invoked by order in the list, and only the first one that applies
|
|
284
|
+
(e.g calls `context.replaceValue`) is invoked.
|
|
285
|
+
|
|
286
|
+
> https://cdk8s.io/docs/latest/basics/app/#resolvers
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
274
290
|
##### `yaml_output_type`<sup>Optional</sup> <a name="cdk8s.AppProps.parameter.yaml_output_type"></a>
|
|
275
291
|
|
|
276
292
|
- *Type:* [`cdk8s.YamlOutputType`](#cdk8s.YamlOutputType)
|
|
@@ -294,6 +310,23 @@ def synth()
|
|
|
294
310
|
def synth_yaml()
|
|
295
311
|
```
|
|
296
312
|
|
|
313
|
+
#### Static Functions <a name="Static Functions"></a>
|
|
314
|
+
|
|
315
|
+
##### `of` <a name="cdk8s.App.of"></a>
|
|
316
|
+
|
|
317
|
+
```python
|
|
318
|
+
import cdk8s
|
|
319
|
+
|
|
320
|
+
cdk8s.App.of(
|
|
321
|
+
c: IConstruct
|
|
322
|
+
)
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
###### `c`<sup>Required</sup> <a name="cdk8s.App.parameter.c"></a>
|
|
326
|
+
|
|
327
|
+
- *Type:* [`constructs.IConstruct`](#constructs.IConstruct)
|
|
328
|
+
|
|
329
|
+
---
|
|
297
330
|
|
|
298
331
|
#### Properties <a name="Properties"></a>
|
|
299
332
|
|
|
@@ -334,6 +367,21 @@ The file extension to use for rendered YAML files.
|
|
|
334
367
|
|
|
335
368
|
---
|
|
336
369
|
|
|
370
|
+
##### `resolvers`<sup>Required</sup> <a name="cdk8s.App.property.resolvers"></a>
|
|
371
|
+
|
|
372
|
+
```python
|
|
373
|
+
resolvers: typing.List[IResolver]
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
- *Type:* typing.List[[`cdk8s.IResolver`](#cdk8s.IResolver)]
|
|
377
|
+
|
|
378
|
+
Resolvers used by this app.
|
|
379
|
+
|
|
380
|
+
This includes both custom resolvers
|
|
381
|
+
passed by the `resolvers` property, as well as built-in resolvers.
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
337
385
|
##### `yaml_output_type`<sup>Required</sup> <a name="cdk8s.App.property.yaml_output_type"></a>
|
|
338
386
|
|
|
339
387
|
```python
|
|
@@ -856,6 +904,172 @@ relationships.
|
|
|
856
904
|
|
|
857
905
|
---
|
|
858
906
|
|
|
907
|
+
### ApiObjectMetadataDefinitionOptions <a name="cdk8s.ApiObjectMetadataDefinitionOptions"></a>
|
|
908
|
+
|
|
909
|
+
Options for `ApiObjectMetadataDefinition`.
|
|
910
|
+
|
|
911
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
912
|
+
|
|
913
|
+
```python
|
|
914
|
+
import cdk8s
|
|
915
|
+
|
|
916
|
+
cdk8s.ApiObjectMetadataDefinitionOptions(
|
|
917
|
+
annotations: typing.Mapping[str] = None,
|
|
918
|
+
finalizers: typing.List[str] = None,
|
|
919
|
+
labels: typing.Mapping[str] = None,
|
|
920
|
+
name: str = None,
|
|
921
|
+
namespace: str = None,
|
|
922
|
+
owner_references: typing.List[OwnerReference] = None,
|
|
923
|
+
api_object: ApiObject
|
|
924
|
+
)
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
##### `annotations`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.annotations"></a>
|
|
928
|
+
|
|
929
|
+
```python
|
|
930
|
+
annotations: typing.Mapping[str]
|
|
931
|
+
```
|
|
932
|
+
|
|
933
|
+
- *Type:* typing.Mapping[`str`]
|
|
934
|
+
- *Default:* No annotations.
|
|
935
|
+
|
|
936
|
+
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
|
|
937
|
+
|
|
938
|
+
They are not queryable and should be
|
|
939
|
+
preserved when modifying objects.
|
|
940
|
+
|
|
941
|
+
> http://kubernetes.io/docs/user-guide/annotations
|
|
942
|
+
|
|
943
|
+
---
|
|
944
|
+
|
|
945
|
+
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.finalizers"></a>
|
|
946
|
+
|
|
947
|
+
```python
|
|
948
|
+
finalizers: typing.List[str]
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
- *Type:* typing.List[`str`]
|
|
952
|
+
- *Default:* No finalizers.
|
|
953
|
+
|
|
954
|
+
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
955
|
+
|
|
956
|
+
Must be empty before the object is deleted from the registry. Each entry is
|
|
957
|
+
an identifier for the responsible component that will remove the entry from
|
|
958
|
+
the list. If the deletionTimestamp of the object is non-nil, entries in
|
|
959
|
+
this list can only be removed. Finalizers may be processed and removed in
|
|
960
|
+
any order. Order is NOT enforced because it introduces significant risk of
|
|
961
|
+
stuck finalizers. finalizers is a shared field, any actor with permission
|
|
962
|
+
can reorder it. If the finalizer list is processed in order, then this can
|
|
963
|
+
lead to a situation in which the component responsible for the first
|
|
964
|
+
finalizer in the list is waiting for a signal (field value, external
|
|
965
|
+
system, or other) produced by a component responsible for a finalizer later
|
|
966
|
+
in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
967
|
+
are free to order amongst themselves and are not vulnerable to ordering
|
|
968
|
+
changes in the list.
|
|
969
|
+
|
|
970
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
971
|
+
|
|
972
|
+
---
|
|
973
|
+
|
|
974
|
+
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.labels"></a>
|
|
975
|
+
|
|
976
|
+
```python
|
|
977
|
+
labels: typing.Mapping[str]
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
- *Type:* typing.Mapping[`str`]
|
|
981
|
+
- *Default:* No labels.
|
|
982
|
+
|
|
983
|
+
Map of string keys and values that can be used to organize and categorize (scope and select) objects.
|
|
984
|
+
|
|
985
|
+
May match selectors of replication controllers and services.
|
|
986
|
+
|
|
987
|
+
> http://kubernetes.io/docs/user-guide/labels
|
|
988
|
+
|
|
989
|
+
---
|
|
990
|
+
|
|
991
|
+
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.name"></a>
|
|
992
|
+
|
|
993
|
+
```python
|
|
994
|
+
name: str
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
- *Type:* `str`
|
|
998
|
+
- *Default:* an app-unique name generated by the chart
|
|
999
|
+
|
|
1000
|
+
The unique, namespace-global, name of this object inside the Kubernetes cluster.
|
|
1001
|
+
|
|
1002
|
+
Normally, you shouldn't specify names for objects and let the CDK generate
|
|
1003
|
+
a name for you that is application-unique. The names CDK generates are
|
|
1004
|
+
composed from the construct path components, separated by dots and a suffix
|
|
1005
|
+
that is based on a hash of the entire path, to ensure uniqueness.
|
|
1006
|
+
|
|
1007
|
+
You can supply custom name allocation logic by overriding the
|
|
1008
|
+
`chart.generateObjectName` method.
|
|
1009
|
+
|
|
1010
|
+
If you use an explicit name here, bear in mind that this reduces the
|
|
1011
|
+
composability of your construct because it won't be possible to include
|
|
1012
|
+
more than one instance in any app. Therefore it is highly recommended to
|
|
1013
|
+
leave this unspecified.
|
|
1014
|
+
|
|
1015
|
+
---
|
|
1016
|
+
|
|
1017
|
+
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.namespace"></a>
|
|
1018
|
+
|
|
1019
|
+
```python
|
|
1020
|
+
namespace: str
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
- *Type:* `str`
|
|
1024
|
+
- *Default:* undefined (will be assigned to the 'default' namespace)
|
|
1025
|
+
|
|
1026
|
+
Namespace defines the space within each name must be unique.
|
|
1027
|
+
|
|
1028
|
+
An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation.
|
|
1029
|
+
Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
|
|
1030
|
+
|
|
1031
|
+
---
|
|
1032
|
+
|
|
1033
|
+
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.owner_references"></a>
|
|
1034
|
+
|
|
1035
|
+
```python
|
|
1036
|
+
owner_references: typing.List[OwnerReference]
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
- *Type:* typing.List[[`cdk8s.OwnerReference`](#cdk8s.OwnerReference)]
|
|
1040
|
+
- *Default:* automatically set by Kubernetes
|
|
1041
|
+
|
|
1042
|
+
List of objects depended by this object.
|
|
1043
|
+
|
|
1044
|
+
If ALL objects in the list have
|
|
1045
|
+
been deleted, this object will be garbage collected. If this object is
|
|
1046
|
+
managed by a controller, then an entry in this list will point to this
|
|
1047
|
+
controller, with the controller field set to true. There cannot be more
|
|
1048
|
+
than one managing controller.
|
|
1049
|
+
|
|
1050
|
+
Kubernetes sets the value of this field automatically for objects that are
|
|
1051
|
+
dependents of other objects like ReplicaSets, DaemonSets, Deployments, Jobs
|
|
1052
|
+
and CronJobs, and ReplicationControllers. You can also configure these
|
|
1053
|
+
relationships manually by changing the value of this field. However, you
|
|
1054
|
+
usually don't need to and can allow Kubernetes to automatically manage the
|
|
1055
|
+
relationships.
|
|
1056
|
+
|
|
1057
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
1058
|
+
|
|
1059
|
+
---
|
|
1060
|
+
|
|
1061
|
+
##### `api_object`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.api_object"></a>
|
|
1062
|
+
|
|
1063
|
+
```python
|
|
1064
|
+
api_object: ApiObject
|
|
1065
|
+
```
|
|
1066
|
+
|
|
1067
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
1068
|
+
|
|
1069
|
+
Which ApiObject instance is the metadata attached to.
|
|
1070
|
+
|
|
1071
|
+
---
|
|
1072
|
+
|
|
859
1073
|
### ApiObjectProps <a name="cdk8s.ApiObjectProps"></a>
|
|
860
1074
|
|
|
861
1075
|
Options for defining API objects.
|
|
@@ -922,6 +1136,7 @@ cdk8s.AppProps(
|
|
|
922
1136
|
outdir: str = None,
|
|
923
1137
|
output_file_extension: str = None,
|
|
924
1138
|
record_construct_metadata: bool = None,
|
|
1139
|
+
resolvers: typing.List[IResolver] = None,
|
|
925
1140
|
yaml_output_type: YamlOutputType = None
|
|
926
1141
|
)
|
|
927
1142
|
```
|
|
@@ -973,6 +1188,25 @@ When set to true, the output directory will contain a `construct-metadata.json`
|
|
|
973
1188
|
|
|
974
1189
|
---
|
|
975
1190
|
|
|
1191
|
+
##### `resolvers`<sup>Optional</sup> <a name="cdk8s.AppProps.property.resolvers"></a>
|
|
1192
|
+
|
|
1193
|
+
```python
|
|
1194
|
+
resolvers: typing.List[IResolver]
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
- *Type:* typing.List[[`cdk8s.IResolver`](#cdk8s.IResolver)]
|
|
1198
|
+
- *Default:* no resolvers.
|
|
1199
|
+
|
|
1200
|
+
A list of resolvers that can be used to replace property values before they are written to the manifest file.
|
|
1201
|
+
|
|
1202
|
+
When multiple resolvers are passed,
|
|
1203
|
+
they are invoked by order in the list, and only the first one that applies
|
|
1204
|
+
(e.g calls `context.replaceValue`) is invoked.
|
|
1205
|
+
|
|
1206
|
+
> https://cdk8s.io/docs/latest/basics/app/#resolvers
|
|
1207
|
+
|
|
1208
|
+
---
|
|
1209
|
+
|
|
976
1210
|
##### `yaml_output_type`<sup>Optional</sup> <a name="cdk8s.AppProps.property.yaml_output_type"></a>
|
|
977
1211
|
|
|
978
1212
|
```python
|
|
@@ -1568,11 +1802,12 @@ cdk8s.ApiObjectMetadataDefinition(
|
|
|
1568
1802
|
labels: typing.Mapping[str] = None,
|
|
1569
1803
|
name: str = None,
|
|
1570
1804
|
namespace: str = None,
|
|
1571
|
-
owner_references: typing.List[OwnerReference] = None
|
|
1805
|
+
owner_references: typing.List[OwnerReference] = None,
|
|
1806
|
+
api_object: ApiObject
|
|
1572
1807
|
)
|
|
1573
1808
|
```
|
|
1574
1809
|
|
|
1575
|
-
##### `annotations`<sup>Optional</sup> <a name="cdk8s.
|
|
1810
|
+
##### `annotations`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.annotations"></a>
|
|
1576
1811
|
|
|
1577
1812
|
- *Type:* typing.Mapping[`str`]
|
|
1578
1813
|
- *Default:* No annotations.
|
|
@@ -1586,7 +1821,7 @@ preserved when modifying objects.
|
|
|
1586
1821
|
|
|
1587
1822
|
---
|
|
1588
1823
|
|
|
1589
|
-
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.
|
|
1824
|
+
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.finalizers"></a>
|
|
1590
1825
|
|
|
1591
1826
|
- *Type:* typing.List[`str`]
|
|
1592
1827
|
- *Default:* No finalizers.
|
|
@@ -1611,7 +1846,7 @@ changes in the list.
|
|
|
1611
1846
|
|
|
1612
1847
|
---
|
|
1613
1848
|
|
|
1614
|
-
##### `labels`<sup>Optional</sup> <a name="cdk8s.
|
|
1849
|
+
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.labels"></a>
|
|
1615
1850
|
|
|
1616
1851
|
- *Type:* typing.Mapping[`str`]
|
|
1617
1852
|
- *Default:* No labels.
|
|
@@ -1624,7 +1859,7 @@ May match selectors of replication controllers and services.
|
|
|
1624
1859
|
|
|
1625
1860
|
---
|
|
1626
1861
|
|
|
1627
|
-
##### `name`<sup>Optional</sup> <a name="cdk8s.
|
|
1862
|
+
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.name"></a>
|
|
1628
1863
|
|
|
1629
1864
|
- *Type:* `str`
|
|
1630
1865
|
- *Default:* an app-unique name generated by the chart
|
|
@@ -1646,7 +1881,7 @@ leave this unspecified.
|
|
|
1646
1881
|
|
|
1647
1882
|
---
|
|
1648
1883
|
|
|
1649
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.
|
|
1884
|
+
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.namespace"></a>
|
|
1650
1885
|
|
|
1651
1886
|
- *Type:* `str`
|
|
1652
1887
|
- *Default:* undefined (will be assigned to the 'default' namespace)
|
|
@@ -1658,7 +1893,7 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
1658
1893
|
|
|
1659
1894
|
---
|
|
1660
1895
|
|
|
1661
|
-
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.
|
|
1896
|
+
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.owner_references"></a>
|
|
1662
1897
|
|
|
1663
1898
|
- *Type:* typing.List[[`cdk8s.OwnerReference`](#cdk8s.OwnerReference)]
|
|
1664
1899
|
- *Default:* automatically set by Kubernetes
|
|
@@ -1682,6 +1917,14 @@ relationships.
|
|
|
1682
1917
|
|
|
1683
1918
|
---
|
|
1684
1919
|
|
|
1920
|
+
##### `api_object`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.api_object"></a>
|
|
1921
|
+
|
|
1922
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
1923
|
+
|
|
1924
|
+
Which ApiObject instance is the metadata attached to.
|
|
1925
|
+
|
|
1926
|
+
---
|
|
1927
|
+
|
|
1685
1928
|
#### Methods <a name="Methods"></a>
|
|
1686
1929
|
|
|
1687
1930
|
##### `add` <a name="cdk8s.ApiObjectMetadataDefinition.add"></a>
|
|
@@ -2459,6 +2702,39 @@ the amount of Seconds the `Duration` will represent.
|
|
|
2459
2702
|
|
|
2460
2703
|
|
|
2461
2704
|
|
|
2705
|
+
### ImplicitTokenResolver <a name="cdk8s.ImplicitTokenResolver"></a>
|
|
2706
|
+
|
|
2707
|
+
- *Implements:* [`cdk8s.IResolver`](#cdk8s.IResolver)
|
|
2708
|
+
|
|
2709
|
+
Resolves implicit tokens.
|
|
2710
|
+
|
|
2711
|
+
#### Initializers <a name="cdk8s.ImplicitTokenResolver.Initializer"></a>
|
|
2712
|
+
|
|
2713
|
+
```python
|
|
2714
|
+
import cdk8s
|
|
2715
|
+
|
|
2716
|
+
cdk8s.ImplicitTokenResolver()
|
|
2717
|
+
```
|
|
2718
|
+
|
|
2719
|
+
#### Methods <a name="Methods"></a>
|
|
2720
|
+
|
|
2721
|
+
##### `resolve` <a name="cdk8s.ImplicitTokenResolver.resolve"></a>
|
|
2722
|
+
|
|
2723
|
+
```python
|
|
2724
|
+
def resolve(
|
|
2725
|
+
context: ResolutionContext
|
|
2726
|
+
)
|
|
2727
|
+
```
|
|
2728
|
+
|
|
2729
|
+
###### `context`<sup>Required</sup> <a name="cdk8s.ImplicitTokenResolver.parameter.context"></a>
|
|
2730
|
+
|
|
2731
|
+
- *Type:* [`cdk8s.ResolutionContext`](#cdk8s.ResolutionContext)
|
|
2732
|
+
|
|
2733
|
+
---
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
|
|
2462
2738
|
### JsonPatch <a name="cdk8s.JsonPatch"></a>
|
|
2463
2739
|
|
|
2464
2740
|
Utility for applying RFC-6902 JSON-Patch to a document.
|
|
@@ -2662,6 +2938,39 @@ cdk8s.Lazy.any(
|
|
|
2662
2938
|
|
|
2663
2939
|
|
|
2664
2940
|
|
|
2941
|
+
### LazyResolver <a name="cdk8s.LazyResolver"></a>
|
|
2942
|
+
|
|
2943
|
+
- *Implements:* [`cdk8s.IResolver`](#cdk8s.IResolver)
|
|
2944
|
+
|
|
2945
|
+
Resolvers instanecs of `Lazy`.
|
|
2946
|
+
|
|
2947
|
+
#### Initializers <a name="cdk8s.LazyResolver.Initializer"></a>
|
|
2948
|
+
|
|
2949
|
+
```python
|
|
2950
|
+
import cdk8s
|
|
2951
|
+
|
|
2952
|
+
cdk8s.LazyResolver()
|
|
2953
|
+
```
|
|
2954
|
+
|
|
2955
|
+
#### Methods <a name="Methods"></a>
|
|
2956
|
+
|
|
2957
|
+
##### `resolve` <a name="cdk8s.LazyResolver.resolve"></a>
|
|
2958
|
+
|
|
2959
|
+
```python
|
|
2960
|
+
def resolve(
|
|
2961
|
+
context: ResolutionContext
|
|
2962
|
+
)
|
|
2963
|
+
```
|
|
2964
|
+
|
|
2965
|
+
###### `context`<sup>Required</sup> <a name="cdk8s.LazyResolver.parameter.context"></a>
|
|
2966
|
+
|
|
2967
|
+
- *Type:* [`cdk8s.ResolutionContext`](#cdk8s.ResolutionContext)
|
|
2968
|
+
|
|
2969
|
+
---
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
|
|
2665
2974
|
### Names <a name="cdk8s.Names"></a>
|
|
2666
2975
|
|
|
2667
2976
|
Utilities for generating unique and stable names.
|
|
@@ -2787,6 +3096,126 @@ Maximum allowed length for the name.
|
|
|
2787
3096
|
|
|
2788
3097
|
|
|
2789
3098
|
|
|
3099
|
+
### ResolutionContext <a name="cdk8s.ResolutionContext"></a>
|
|
3100
|
+
|
|
3101
|
+
Context object for a specific resolution process.
|
|
3102
|
+
|
|
3103
|
+
#### Initializers <a name="cdk8s.ResolutionContext.Initializer"></a>
|
|
3104
|
+
|
|
3105
|
+
```python
|
|
3106
|
+
import cdk8s
|
|
3107
|
+
|
|
3108
|
+
cdk8s.ResolutionContext(
|
|
3109
|
+
obj: ApiObject,
|
|
3110
|
+
key: typing.List[str],
|
|
3111
|
+
value: typing.Any
|
|
3112
|
+
)
|
|
3113
|
+
```
|
|
3114
|
+
|
|
3115
|
+
##### `obj`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.obj"></a>
|
|
3116
|
+
|
|
3117
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
3118
|
+
|
|
3119
|
+
Which ApiObject is currently being resolved.
|
|
3120
|
+
|
|
3121
|
+
---
|
|
3122
|
+
|
|
3123
|
+
##### `key`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.key"></a>
|
|
3124
|
+
|
|
3125
|
+
- *Type:* typing.List[`str`]
|
|
3126
|
+
|
|
3127
|
+
Which key is currently being resolved.
|
|
3128
|
+
|
|
3129
|
+
---
|
|
3130
|
+
|
|
3131
|
+
##### `value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.value"></a>
|
|
3132
|
+
|
|
3133
|
+
- *Type:* `typing.Any`
|
|
3134
|
+
|
|
3135
|
+
The value associated to the key currently being resolved.
|
|
3136
|
+
|
|
3137
|
+
---
|
|
3138
|
+
|
|
3139
|
+
#### Methods <a name="Methods"></a>
|
|
3140
|
+
|
|
3141
|
+
##### `replace_value` <a name="cdk8s.ResolutionContext.replace_value"></a>
|
|
3142
|
+
|
|
3143
|
+
```python
|
|
3144
|
+
def replace_value(
|
|
3145
|
+
new_value: typing.Any
|
|
3146
|
+
)
|
|
3147
|
+
```
|
|
3148
|
+
|
|
3149
|
+
###### `new_value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.new_value"></a>
|
|
3150
|
+
|
|
3151
|
+
- *Type:* `typing.Any`
|
|
3152
|
+
|
|
3153
|
+
---
|
|
3154
|
+
|
|
3155
|
+
|
|
3156
|
+
#### Properties <a name="Properties"></a>
|
|
3157
|
+
|
|
3158
|
+
##### `key`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.key"></a>
|
|
3159
|
+
|
|
3160
|
+
```python
|
|
3161
|
+
key: typing.List[str]
|
|
3162
|
+
```
|
|
3163
|
+
|
|
3164
|
+
- *Type:* typing.List[`str`]
|
|
3165
|
+
|
|
3166
|
+
Which key is currently being resolved.
|
|
3167
|
+
|
|
3168
|
+
---
|
|
3169
|
+
|
|
3170
|
+
##### `obj`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.obj"></a>
|
|
3171
|
+
|
|
3172
|
+
```python
|
|
3173
|
+
obj: ApiObject
|
|
3174
|
+
```
|
|
3175
|
+
|
|
3176
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
3177
|
+
|
|
3178
|
+
Which ApiObject is currently being resolved.
|
|
3179
|
+
|
|
3180
|
+
---
|
|
3181
|
+
|
|
3182
|
+
##### `value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.value"></a>
|
|
3183
|
+
|
|
3184
|
+
```python
|
|
3185
|
+
value: typing.Any
|
|
3186
|
+
```
|
|
3187
|
+
|
|
3188
|
+
- *Type:* `typing.Any`
|
|
3189
|
+
|
|
3190
|
+
The value associated to the key currently being resolved.
|
|
3191
|
+
|
|
3192
|
+
---
|
|
3193
|
+
|
|
3194
|
+
##### `replaced`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.replaced"></a>
|
|
3195
|
+
|
|
3196
|
+
```python
|
|
3197
|
+
replaced: bool
|
|
3198
|
+
```
|
|
3199
|
+
|
|
3200
|
+
- *Type:* `bool`
|
|
3201
|
+
|
|
3202
|
+
Whether or not the value was replaced by invoking the `replaceValue` method.
|
|
3203
|
+
|
|
3204
|
+
---
|
|
3205
|
+
|
|
3206
|
+
##### `replaced_value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.replaced_value"></a>
|
|
3207
|
+
|
|
3208
|
+
```python
|
|
3209
|
+
replaced_value: typing.Any
|
|
3210
|
+
```
|
|
3211
|
+
|
|
3212
|
+
- *Type:* `typing.Any`
|
|
3213
|
+
|
|
3214
|
+
The replaced value that was set via the `replaceValue` method.
|
|
3215
|
+
|
|
3216
|
+
---
|
|
3217
|
+
|
|
3218
|
+
|
|
2790
3219
|
### Size <a name="cdk8s.Size"></a>
|
|
2791
3220
|
|
|
2792
3221
|
Represents the amount of digital storage.
|
|
@@ -2983,6 +3412,7 @@ cdk8s.Testing.app(
|
|
|
2983
3412
|
outdir: str = None,
|
|
2984
3413
|
output_file_extension: str = None,
|
|
2985
3414
|
record_construct_metadata: bool = None,
|
|
3415
|
+
resolvers: typing.List[IResolver] = None,
|
|
2986
3416
|
yaml_output_type: YamlOutputType = None
|
|
2987
3417
|
)
|
|
2988
3418
|
```
|
|
@@ -3022,6 +3452,21 @@ When set to true, the output directory will contain a `construct-metadata.json`
|
|
|
3022
3452
|
|
|
3023
3453
|
---
|
|
3024
3454
|
|
|
3455
|
+
###### `resolvers`<sup>Optional</sup> <a name="cdk8s.AppProps.parameter.resolvers"></a>
|
|
3456
|
+
|
|
3457
|
+
- *Type:* typing.List[[`cdk8s.IResolver`](#cdk8s.IResolver)]
|
|
3458
|
+
- *Default:* no resolvers.
|
|
3459
|
+
|
|
3460
|
+
A list of resolvers that can be used to replace property values before they are written to the manifest file.
|
|
3461
|
+
|
|
3462
|
+
When multiple resolvers are passed,
|
|
3463
|
+
they are invoked by order in the list, and only the first one that applies
|
|
3464
|
+
(e.g calls `context.replaceValue`) is invoked.
|
|
3465
|
+
|
|
3466
|
+
> https://cdk8s.io/docs/latest/basics/app/#resolvers
|
|
3467
|
+
|
|
3468
|
+
---
|
|
3469
|
+
|
|
3025
3470
|
###### `yaml_output_type`<sup>Optional</sup> <a name="cdk8s.AppProps.parameter.yaml_output_type"></a>
|
|
3026
3471
|
|
|
3027
3472
|
- *Type:* [`cdk8s.YamlOutputType`](#cdk8s.YamlOutputType)
|
|
@@ -3178,6 +3623,29 @@ def produce()
|
|
|
3178
3623
|
```
|
|
3179
3624
|
|
|
3180
3625
|
|
|
3626
|
+
### IResolver <a name="cdk8s.IResolver"></a>
|
|
3627
|
+
|
|
3628
|
+
- *Implemented By:* [`cdk8s.ImplicitTokenResolver`](#cdk8s.ImplicitTokenResolver), [`cdk8s.LazyResolver`](#cdk8s.LazyResolver), [`cdk8s.IResolver`](#cdk8s.IResolver)
|
|
3629
|
+
|
|
3630
|
+
Contract for resolver objects.
|
|
3631
|
+
|
|
3632
|
+
#### Methods <a name="Methods"></a>
|
|
3633
|
+
|
|
3634
|
+
##### `resolve` <a name="cdk8s.IResolver.resolve"></a>
|
|
3635
|
+
|
|
3636
|
+
```python
|
|
3637
|
+
def resolve(
|
|
3638
|
+
context: ResolutionContext
|
|
3639
|
+
)
|
|
3640
|
+
```
|
|
3641
|
+
|
|
3642
|
+
###### `context`<sup>Required</sup> <a name="cdk8s.IResolver.parameter.context"></a>
|
|
3643
|
+
|
|
3644
|
+
- *Type:* [`cdk8s.ResolutionContext`](#cdk8s.ResolutionContext)
|
|
3645
|
+
|
|
3646
|
+
---
|
|
3647
|
+
|
|
3648
|
+
|
|
3181
3649
|
## Enums <a name="Enums"></a>
|
|
3182
3650
|
|
|
3183
3651
|
### SizeRoundingBehavior <a name="SizeRoundingBehavior"></a>
|