cdk8s 1.61.25 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +464 -46
- package/docs/java.md +479 -6
- package/docs/python.md +510 -7
- package/docs/typescript.md +431 -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 +18 -4
- package/lib/metadata.js +8 -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
|
|
@@ -713,6 +761,7 @@ Metadata associated with this object.
|
|
|
713
761
|
import cdk8s
|
|
714
762
|
|
|
715
763
|
cdk8s.ApiObjectMetadata(
|
|
764
|
+
additional_attributes: typing.Mapping[typing.Any] = None,
|
|
716
765
|
annotations: typing.Mapping[str] = None,
|
|
717
766
|
finalizers: typing.List[str] = None,
|
|
718
767
|
labels: typing.Mapping[str] = None,
|
|
@@ -722,6 +771,18 @@ cdk8s.ApiObjectMetadata(
|
|
|
722
771
|
)
|
|
723
772
|
```
|
|
724
773
|
|
|
774
|
+
##### `additional_attributes`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.additional_attributes"></a>
|
|
775
|
+
|
|
776
|
+
```python
|
|
777
|
+
additional_attributes: typing.Mapping[typing.Any]
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
- *Type:* typing.Mapping[`typing.Any`]
|
|
781
|
+
|
|
782
|
+
Additional metadata attributes.
|
|
783
|
+
|
|
784
|
+
---
|
|
785
|
+
|
|
725
786
|
##### `annotations`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.annotations"></a>
|
|
726
787
|
|
|
727
788
|
```python
|
|
@@ -856,6 +917,185 @@ relationships.
|
|
|
856
917
|
|
|
857
918
|
---
|
|
858
919
|
|
|
920
|
+
### ApiObjectMetadataDefinitionOptions <a name="cdk8s.ApiObjectMetadataDefinitionOptions"></a>
|
|
921
|
+
|
|
922
|
+
Options for `ApiObjectMetadataDefinition`.
|
|
923
|
+
|
|
924
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
925
|
+
|
|
926
|
+
```python
|
|
927
|
+
import cdk8s
|
|
928
|
+
|
|
929
|
+
cdk8s.ApiObjectMetadataDefinitionOptions(
|
|
930
|
+
additional_attributes: typing.Mapping[typing.Any] = None,
|
|
931
|
+
annotations: typing.Mapping[str] = None,
|
|
932
|
+
finalizers: typing.List[str] = None,
|
|
933
|
+
labels: typing.Mapping[str] = None,
|
|
934
|
+
name: str = None,
|
|
935
|
+
namespace: str = None,
|
|
936
|
+
owner_references: typing.List[OwnerReference] = None,
|
|
937
|
+
api_object: ApiObject
|
|
938
|
+
)
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
##### `additional_attributes`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.additional_attributes"></a>
|
|
942
|
+
|
|
943
|
+
```python
|
|
944
|
+
additional_attributes: typing.Mapping[typing.Any]
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
- *Type:* typing.Mapping[`typing.Any`]
|
|
948
|
+
|
|
949
|
+
Additional metadata attributes.
|
|
950
|
+
|
|
951
|
+
---
|
|
952
|
+
|
|
953
|
+
##### `annotations`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.annotations"></a>
|
|
954
|
+
|
|
955
|
+
```python
|
|
956
|
+
annotations: typing.Mapping[str]
|
|
957
|
+
```
|
|
958
|
+
|
|
959
|
+
- *Type:* typing.Mapping[`str`]
|
|
960
|
+
- *Default:* No annotations.
|
|
961
|
+
|
|
962
|
+
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
|
|
963
|
+
|
|
964
|
+
They are not queryable and should be
|
|
965
|
+
preserved when modifying objects.
|
|
966
|
+
|
|
967
|
+
> http://kubernetes.io/docs/user-guide/annotations
|
|
968
|
+
|
|
969
|
+
---
|
|
970
|
+
|
|
971
|
+
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.finalizers"></a>
|
|
972
|
+
|
|
973
|
+
```python
|
|
974
|
+
finalizers: typing.List[str]
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
- *Type:* typing.List[`str`]
|
|
978
|
+
- *Default:* No finalizers.
|
|
979
|
+
|
|
980
|
+
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
981
|
+
|
|
982
|
+
Must be empty before the object is deleted from the registry. Each entry is
|
|
983
|
+
an identifier for the responsible component that will remove the entry from
|
|
984
|
+
the list. If the deletionTimestamp of the object is non-nil, entries in
|
|
985
|
+
this list can only be removed. Finalizers may be processed and removed in
|
|
986
|
+
any order. Order is NOT enforced because it introduces significant risk of
|
|
987
|
+
stuck finalizers. finalizers is a shared field, any actor with permission
|
|
988
|
+
can reorder it. If the finalizer list is processed in order, then this can
|
|
989
|
+
lead to a situation in which the component responsible for the first
|
|
990
|
+
finalizer in the list is waiting for a signal (field value, external
|
|
991
|
+
system, or other) produced by a component responsible for a finalizer later
|
|
992
|
+
in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
993
|
+
are free to order amongst themselves and are not vulnerable to ordering
|
|
994
|
+
changes in the list.
|
|
995
|
+
|
|
996
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
997
|
+
|
|
998
|
+
---
|
|
999
|
+
|
|
1000
|
+
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.labels"></a>
|
|
1001
|
+
|
|
1002
|
+
```python
|
|
1003
|
+
labels: typing.Mapping[str]
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
- *Type:* typing.Mapping[`str`]
|
|
1007
|
+
- *Default:* No labels.
|
|
1008
|
+
|
|
1009
|
+
Map of string keys and values that can be used to organize and categorize (scope and select) objects.
|
|
1010
|
+
|
|
1011
|
+
May match selectors of replication controllers and services.
|
|
1012
|
+
|
|
1013
|
+
> http://kubernetes.io/docs/user-guide/labels
|
|
1014
|
+
|
|
1015
|
+
---
|
|
1016
|
+
|
|
1017
|
+
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.name"></a>
|
|
1018
|
+
|
|
1019
|
+
```python
|
|
1020
|
+
name: str
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
- *Type:* `str`
|
|
1024
|
+
- *Default:* an app-unique name generated by the chart
|
|
1025
|
+
|
|
1026
|
+
The unique, namespace-global, name of this object inside the Kubernetes cluster.
|
|
1027
|
+
|
|
1028
|
+
Normally, you shouldn't specify names for objects and let the CDK generate
|
|
1029
|
+
a name for you that is application-unique. The names CDK generates are
|
|
1030
|
+
composed from the construct path components, separated by dots and a suffix
|
|
1031
|
+
that is based on a hash of the entire path, to ensure uniqueness.
|
|
1032
|
+
|
|
1033
|
+
You can supply custom name allocation logic by overriding the
|
|
1034
|
+
`chart.generateObjectName` method.
|
|
1035
|
+
|
|
1036
|
+
If you use an explicit name here, bear in mind that this reduces the
|
|
1037
|
+
composability of your construct because it won't be possible to include
|
|
1038
|
+
more than one instance in any app. Therefore it is highly recommended to
|
|
1039
|
+
leave this unspecified.
|
|
1040
|
+
|
|
1041
|
+
---
|
|
1042
|
+
|
|
1043
|
+
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.namespace"></a>
|
|
1044
|
+
|
|
1045
|
+
```python
|
|
1046
|
+
namespace: str
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
- *Type:* `str`
|
|
1050
|
+
- *Default:* undefined (will be assigned to the 'default' namespace)
|
|
1051
|
+
|
|
1052
|
+
Namespace defines the space within each name must be unique.
|
|
1053
|
+
|
|
1054
|
+
An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation.
|
|
1055
|
+
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
|
|
1056
|
+
|
|
1057
|
+
---
|
|
1058
|
+
|
|
1059
|
+
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.owner_references"></a>
|
|
1060
|
+
|
|
1061
|
+
```python
|
|
1062
|
+
owner_references: typing.List[OwnerReference]
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
- *Type:* typing.List[[`cdk8s.OwnerReference`](#cdk8s.OwnerReference)]
|
|
1066
|
+
- *Default:* automatically set by Kubernetes
|
|
1067
|
+
|
|
1068
|
+
List of objects depended by this object.
|
|
1069
|
+
|
|
1070
|
+
If ALL objects in the list have
|
|
1071
|
+
been deleted, this object will be garbage collected. If this object is
|
|
1072
|
+
managed by a controller, then an entry in this list will point to this
|
|
1073
|
+
controller, with the controller field set to true. There cannot be more
|
|
1074
|
+
than one managing controller.
|
|
1075
|
+
|
|
1076
|
+
Kubernetes sets the value of this field automatically for objects that are
|
|
1077
|
+
dependents of other objects like ReplicaSets, DaemonSets, Deployments, Jobs
|
|
1078
|
+
and CronJobs, and ReplicationControllers. You can also configure these
|
|
1079
|
+
relationships manually by changing the value of this field. However, you
|
|
1080
|
+
usually don't need to and can allow Kubernetes to automatically manage the
|
|
1081
|
+
relationships.
|
|
1082
|
+
|
|
1083
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
1084
|
+
|
|
1085
|
+
---
|
|
1086
|
+
|
|
1087
|
+
##### `api_object`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.property.api_object"></a>
|
|
1088
|
+
|
|
1089
|
+
```python
|
|
1090
|
+
api_object: ApiObject
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
1094
|
+
|
|
1095
|
+
Which ApiObject instance is the metadata attached to.
|
|
1096
|
+
|
|
1097
|
+
---
|
|
1098
|
+
|
|
859
1099
|
### ApiObjectProps <a name="cdk8s.ApiObjectProps"></a>
|
|
860
1100
|
|
|
861
1101
|
Options for defining API objects.
|
|
@@ -922,6 +1162,7 @@ cdk8s.AppProps(
|
|
|
922
1162
|
outdir: str = None,
|
|
923
1163
|
output_file_extension: str = None,
|
|
924
1164
|
record_construct_metadata: bool = None,
|
|
1165
|
+
resolvers: typing.List[IResolver] = None,
|
|
925
1166
|
yaml_output_type: YamlOutputType = None
|
|
926
1167
|
)
|
|
927
1168
|
```
|
|
@@ -973,6 +1214,25 @@ When set to true, the output directory will contain a `construct-metadata.json`
|
|
|
973
1214
|
|
|
974
1215
|
---
|
|
975
1216
|
|
|
1217
|
+
##### `resolvers`<sup>Optional</sup> <a name="cdk8s.AppProps.property.resolvers"></a>
|
|
1218
|
+
|
|
1219
|
+
```python
|
|
1220
|
+
resolvers: typing.List[IResolver]
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1223
|
+
- *Type:* typing.List[[`cdk8s.IResolver`](#cdk8s.IResolver)]
|
|
1224
|
+
- *Default:* no resolvers.
|
|
1225
|
+
|
|
1226
|
+
A list of resolvers that can be used to replace property values before they are written to the manifest file.
|
|
1227
|
+
|
|
1228
|
+
When multiple resolvers are passed,
|
|
1229
|
+
they are invoked by order in the list, and only the first one that applies
|
|
1230
|
+
(e.g calls `context.replaceValue`) is invoked.
|
|
1231
|
+
|
|
1232
|
+
> https://cdk8s.io/docs/latest/basics/app/#resolvers
|
|
1233
|
+
|
|
1234
|
+
---
|
|
1235
|
+
|
|
976
1236
|
##### `yaml_output_type`<sup>Optional</sup> <a name="cdk8s.AppProps.property.yaml_output_type"></a>
|
|
977
1237
|
|
|
978
1238
|
```python
|
|
@@ -1563,16 +1823,26 @@ Object metadata.
|
|
|
1563
1823
|
import cdk8s
|
|
1564
1824
|
|
|
1565
1825
|
cdk8s.ApiObjectMetadataDefinition(
|
|
1826
|
+
additional_attributes: typing.Mapping[typing.Any] = None,
|
|
1566
1827
|
annotations: typing.Mapping[str] = None,
|
|
1567
1828
|
finalizers: typing.List[str] = None,
|
|
1568
1829
|
labels: typing.Mapping[str] = None,
|
|
1569
1830
|
name: str = None,
|
|
1570
1831
|
namespace: str = None,
|
|
1571
|
-
owner_references: typing.List[OwnerReference] = None
|
|
1832
|
+
owner_references: typing.List[OwnerReference] = None,
|
|
1833
|
+
api_object: ApiObject
|
|
1572
1834
|
)
|
|
1573
1835
|
```
|
|
1574
1836
|
|
|
1575
|
-
##### `
|
|
1837
|
+
##### `additional_attributes`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.additional_attributes"></a>
|
|
1838
|
+
|
|
1839
|
+
- *Type:* typing.Mapping[`typing.Any`]
|
|
1840
|
+
|
|
1841
|
+
Additional metadata attributes.
|
|
1842
|
+
|
|
1843
|
+
---
|
|
1844
|
+
|
|
1845
|
+
##### `annotations`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.annotations"></a>
|
|
1576
1846
|
|
|
1577
1847
|
- *Type:* typing.Mapping[`str`]
|
|
1578
1848
|
- *Default:* No annotations.
|
|
@@ -1586,7 +1856,7 @@ preserved when modifying objects.
|
|
|
1586
1856
|
|
|
1587
1857
|
---
|
|
1588
1858
|
|
|
1589
|
-
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.
|
|
1859
|
+
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.finalizers"></a>
|
|
1590
1860
|
|
|
1591
1861
|
- *Type:* typing.List[`str`]
|
|
1592
1862
|
- *Default:* No finalizers.
|
|
@@ -1611,7 +1881,7 @@ changes in the list.
|
|
|
1611
1881
|
|
|
1612
1882
|
---
|
|
1613
1883
|
|
|
1614
|
-
##### `labels`<sup>Optional</sup> <a name="cdk8s.
|
|
1884
|
+
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.labels"></a>
|
|
1615
1885
|
|
|
1616
1886
|
- *Type:* typing.Mapping[`str`]
|
|
1617
1887
|
- *Default:* No labels.
|
|
@@ -1624,7 +1894,7 @@ May match selectors of replication controllers and services.
|
|
|
1624
1894
|
|
|
1625
1895
|
---
|
|
1626
1896
|
|
|
1627
|
-
##### `name`<sup>Optional</sup> <a name="cdk8s.
|
|
1897
|
+
##### `name`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.name"></a>
|
|
1628
1898
|
|
|
1629
1899
|
- *Type:* `str`
|
|
1630
1900
|
- *Default:* an app-unique name generated by the chart
|
|
@@ -1646,7 +1916,7 @@ leave this unspecified.
|
|
|
1646
1916
|
|
|
1647
1917
|
---
|
|
1648
1918
|
|
|
1649
|
-
##### `namespace`<sup>Optional</sup> <a name="cdk8s.
|
|
1919
|
+
##### `namespace`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.namespace"></a>
|
|
1650
1920
|
|
|
1651
1921
|
- *Type:* `str`
|
|
1652
1922
|
- *Default:* undefined (will be assigned to the 'default' namespace)
|
|
@@ -1658,7 +1928,7 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
1658
1928
|
|
|
1659
1929
|
---
|
|
1660
1930
|
|
|
1661
|
-
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.
|
|
1931
|
+
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.owner_references"></a>
|
|
1662
1932
|
|
|
1663
1933
|
- *Type:* typing.List[[`cdk8s.OwnerReference`](#cdk8s.OwnerReference)]
|
|
1664
1934
|
- *Default:* automatically set by Kubernetes
|
|
@@ -1682,6 +1952,14 @@ relationships.
|
|
|
1682
1952
|
|
|
1683
1953
|
---
|
|
1684
1954
|
|
|
1955
|
+
##### `api_object`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinitionOptions.parameter.api_object"></a>
|
|
1956
|
+
|
|
1957
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
1958
|
+
|
|
1959
|
+
Which ApiObject instance is the metadata attached to.
|
|
1960
|
+
|
|
1961
|
+
---
|
|
1962
|
+
|
|
1685
1963
|
#### Methods <a name="Methods"></a>
|
|
1686
1964
|
|
|
1687
1965
|
##### `add` <a name="cdk8s.ApiObjectMetadataDefinition.add"></a>
|
|
@@ -2459,6 +2737,39 @@ the amount of Seconds the `Duration` will represent.
|
|
|
2459
2737
|
|
|
2460
2738
|
|
|
2461
2739
|
|
|
2740
|
+
### ImplicitTokenResolver <a name="cdk8s.ImplicitTokenResolver"></a>
|
|
2741
|
+
|
|
2742
|
+
- *Implements:* [`cdk8s.IResolver`](#cdk8s.IResolver)
|
|
2743
|
+
|
|
2744
|
+
Resolves implicit tokens.
|
|
2745
|
+
|
|
2746
|
+
#### Initializers <a name="cdk8s.ImplicitTokenResolver.Initializer"></a>
|
|
2747
|
+
|
|
2748
|
+
```python
|
|
2749
|
+
import cdk8s
|
|
2750
|
+
|
|
2751
|
+
cdk8s.ImplicitTokenResolver()
|
|
2752
|
+
```
|
|
2753
|
+
|
|
2754
|
+
#### Methods <a name="Methods"></a>
|
|
2755
|
+
|
|
2756
|
+
##### `resolve` <a name="cdk8s.ImplicitTokenResolver.resolve"></a>
|
|
2757
|
+
|
|
2758
|
+
```python
|
|
2759
|
+
def resolve(
|
|
2760
|
+
context: ResolutionContext
|
|
2761
|
+
)
|
|
2762
|
+
```
|
|
2763
|
+
|
|
2764
|
+
###### `context`<sup>Required</sup> <a name="cdk8s.ImplicitTokenResolver.parameter.context"></a>
|
|
2765
|
+
|
|
2766
|
+
- *Type:* [`cdk8s.ResolutionContext`](#cdk8s.ResolutionContext)
|
|
2767
|
+
|
|
2768
|
+
---
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
|
|
2462
2773
|
### JsonPatch <a name="cdk8s.JsonPatch"></a>
|
|
2463
2774
|
|
|
2464
2775
|
Utility for applying RFC-6902 JSON-Patch to a document.
|
|
@@ -2662,6 +2973,39 @@ cdk8s.Lazy.any(
|
|
|
2662
2973
|
|
|
2663
2974
|
|
|
2664
2975
|
|
|
2976
|
+
### LazyResolver <a name="cdk8s.LazyResolver"></a>
|
|
2977
|
+
|
|
2978
|
+
- *Implements:* [`cdk8s.IResolver`](#cdk8s.IResolver)
|
|
2979
|
+
|
|
2980
|
+
Resolvers instanecs of `Lazy`.
|
|
2981
|
+
|
|
2982
|
+
#### Initializers <a name="cdk8s.LazyResolver.Initializer"></a>
|
|
2983
|
+
|
|
2984
|
+
```python
|
|
2985
|
+
import cdk8s
|
|
2986
|
+
|
|
2987
|
+
cdk8s.LazyResolver()
|
|
2988
|
+
```
|
|
2989
|
+
|
|
2990
|
+
#### Methods <a name="Methods"></a>
|
|
2991
|
+
|
|
2992
|
+
##### `resolve` <a name="cdk8s.LazyResolver.resolve"></a>
|
|
2993
|
+
|
|
2994
|
+
```python
|
|
2995
|
+
def resolve(
|
|
2996
|
+
context: ResolutionContext
|
|
2997
|
+
)
|
|
2998
|
+
```
|
|
2999
|
+
|
|
3000
|
+
###### `context`<sup>Required</sup> <a name="cdk8s.LazyResolver.parameter.context"></a>
|
|
3001
|
+
|
|
3002
|
+
- *Type:* [`cdk8s.ResolutionContext`](#cdk8s.ResolutionContext)
|
|
3003
|
+
|
|
3004
|
+
---
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
|
|
3008
|
+
|
|
2665
3009
|
### Names <a name="cdk8s.Names"></a>
|
|
2666
3010
|
|
|
2667
3011
|
Utilities for generating unique and stable names.
|
|
@@ -2787,6 +3131,126 @@ Maximum allowed length for the name.
|
|
|
2787
3131
|
|
|
2788
3132
|
|
|
2789
3133
|
|
|
3134
|
+
### ResolutionContext <a name="cdk8s.ResolutionContext"></a>
|
|
3135
|
+
|
|
3136
|
+
Context object for a specific resolution process.
|
|
3137
|
+
|
|
3138
|
+
#### Initializers <a name="cdk8s.ResolutionContext.Initializer"></a>
|
|
3139
|
+
|
|
3140
|
+
```python
|
|
3141
|
+
import cdk8s
|
|
3142
|
+
|
|
3143
|
+
cdk8s.ResolutionContext(
|
|
3144
|
+
obj: ApiObject,
|
|
3145
|
+
key: typing.List[str],
|
|
3146
|
+
value: typing.Any
|
|
3147
|
+
)
|
|
3148
|
+
```
|
|
3149
|
+
|
|
3150
|
+
##### `obj`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.obj"></a>
|
|
3151
|
+
|
|
3152
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
3153
|
+
|
|
3154
|
+
Which ApiObject is currently being resolved.
|
|
3155
|
+
|
|
3156
|
+
---
|
|
3157
|
+
|
|
3158
|
+
##### `key`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.key"></a>
|
|
3159
|
+
|
|
3160
|
+
- *Type:* typing.List[`str`]
|
|
3161
|
+
|
|
3162
|
+
Which key is currently being resolved.
|
|
3163
|
+
|
|
3164
|
+
---
|
|
3165
|
+
|
|
3166
|
+
##### `value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.value"></a>
|
|
3167
|
+
|
|
3168
|
+
- *Type:* `typing.Any`
|
|
3169
|
+
|
|
3170
|
+
The value associated to the key currently being resolved.
|
|
3171
|
+
|
|
3172
|
+
---
|
|
3173
|
+
|
|
3174
|
+
#### Methods <a name="Methods"></a>
|
|
3175
|
+
|
|
3176
|
+
##### `replace_value` <a name="cdk8s.ResolutionContext.replace_value"></a>
|
|
3177
|
+
|
|
3178
|
+
```python
|
|
3179
|
+
def replace_value(
|
|
3180
|
+
new_value: typing.Any
|
|
3181
|
+
)
|
|
3182
|
+
```
|
|
3183
|
+
|
|
3184
|
+
###### `new_value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.parameter.new_value"></a>
|
|
3185
|
+
|
|
3186
|
+
- *Type:* `typing.Any`
|
|
3187
|
+
|
|
3188
|
+
---
|
|
3189
|
+
|
|
3190
|
+
|
|
3191
|
+
#### Properties <a name="Properties"></a>
|
|
3192
|
+
|
|
3193
|
+
##### `key`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.key"></a>
|
|
3194
|
+
|
|
3195
|
+
```python
|
|
3196
|
+
key: typing.List[str]
|
|
3197
|
+
```
|
|
3198
|
+
|
|
3199
|
+
- *Type:* typing.List[`str`]
|
|
3200
|
+
|
|
3201
|
+
Which key is currently being resolved.
|
|
3202
|
+
|
|
3203
|
+
---
|
|
3204
|
+
|
|
3205
|
+
##### `obj`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.obj"></a>
|
|
3206
|
+
|
|
3207
|
+
```python
|
|
3208
|
+
obj: ApiObject
|
|
3209
|
+
```
|
|
3210
|
+
|
|
3211
|
+
- *Type:* [`cdk8s.ApiObject`](#cdk8s.ApiObject)
|
|
3212
|
+
|
|
3213
|
+
Which ApiObject is currently being resolved.
|
|
3214
|
+
|
|
3215
|
+
---
|
|
3216
|
+
|
|
3217
|
+
##### `value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.value"></a>
|
|
3218
|
+
|
|
3219
|
+
```python
|
|
3220
|
+
value: typing.Any
|
|
3221
|
+
```
|
|
3222
|
+
|
|
3223
|
+
- *Type:* `typing.Any`
|
|
3224
|
+
|
|
3225
|
+
The value associated to the key currently being resolved.
|
|
3226
|
+
|
|
3227
|
+
---
|
|
3228
|
+
|
|
3229
|
+
##### `replaced`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.replaced"></a>
|
|
3230
|
+
|
|
3231
|
+
```python
|
|
3232
|
+
replaced: bool
|
|
3233
|
+
```
|
|
3234
|
+
|
|
3235
|
+
- *Type:* `bool`
|
|
3236
|
+
|
|
3237
|
+
Whether or not the value was replaced by invoking the `replaceValue` method.
|
|
3238
|
+
|
|
3239
|
+
---
|
|
3240
|
+
|
|
3241
|
+
##### `replaced_value`<sup>Required</sup> <a name="cdk8s.ResolutionContext.property.replaced_value"></a>
|
|
3242
|
+
|
|
3243
|
+
```python
|
|
3244
|
+
replaced_value: typing.Any
|
|
3245
|
+
```
|
|
3246
|
+
|
|
3247
|
+
- *Type:* `typing.Any`
|
|
3248
|
+
|
|
3249
|
+
The replaced value that was set via the `replaceValue` method.
|
|
3250
|
+
|
|
3251
|
+
---
|
|
3252
|
+
|
|
3253
|
+
|
|
2790
3254
|
### Size <a name="cdk8s.Size"></a>
|
|
2791
3255
|
|
|
2792
3256
|
Represents the amount of digital storage.
|
|
@@ -2983,6 +3447,7 @@ cdk8s.Testing.app(
|
|
|
2983
3447
|
outdir: str = None,
|
|
2984
3448
|
output_file_extension: str = None,
|
|
2985
3449
|
record_construct_metadata: bool = None,
|
|
3450
|
+
resolvers: typing.List[IResolver] = None,
|
|
2986
3451
|
yaml_output_type: YamlOutputType = None
|
|
2987
3452
|
)
|
|
2988
3453
|
```
|
|
@@ -3022,6 +3487,21 @@ When set to true, the output directory will contain a `construct-metadata.json`
|
|
|
3022
3487
|
|
|
3023
3488
|
---
|
|
3024
3489
|
|
|
3490
|
+
###### `resolvers`<sup>Optional</sup> <a name="cdk8s.AppProps.parameter.resolvers"></a>
|
|
3491
|
+
|
|
3492
|
+
- *Type:* typing.List[[`cdk8s.IResolver`](#cdk8s.IResolver)]
|
|
3493
|
+
- *Default:* no resolvers.
|
|
3494
|
+
|
|
3495
|
+
A list of resolvers that can be used to replace property values before they are written to the manifest file.
|
|
3496
|
+
|
|
3497
|
+
When multiple resolvers are passed,
|
|
3498
|
+
they are invoked by order in the list, and only the first one that applies
|
|
3499
|
+
(e.g calls `context.replaceValue`) is invoked.
|
|
3500
|
+
|
|
3501
|
+
> https://cdk8s.io/docs/latest/basics/app/#resolvers
|
|
3502
|
+
|
|
3503
|
+
---
|
|
3504
|
+
|
|
3025
3505
|
###### `yaml_output_type`<sup>Optional</sup> <a name="cdk8s.AppProps.parameter.yaml_output_type"></a>
|
|
3026
3506
|
|
|
3027
3507
|
- *Type:* [`cdk8s.YamlOutputType`](#cdk8s.YamlOutputType)
|
|
@@ -3178,6 +3658,29 @@ def produce()
|
|
|
3178
3658
|
```
|
|
3179
3659
|
|
|
3180
3660
|
|
|
3661
|
+
### IResolver <a name="cdk8s.IResolver"></a>
|
|
3662
|
+
|
|
3663
|
+
- *Implemented By:* [`cdk8s.ImplicitTokenResolver`](#cdk8s.ImplicitTokenResolver), [`cdk8s.LazyResolver`](#cdk8s.LazyResolver), [`cdk8s.IResolver`](#cdk8s.IResolver)
|
|
3664
|
+
|
|
3665
|
+
Contract for resolver objects.
|
|
3666
|
+
|
|
3667
|
+
#### Methods <a name="Methods"></a>
|
|
3668
|
+
|
|
3669
|
+
##### `resolve` <a name="cdk8s.IResolver.resolve"></a>
|
|
3670
|
+
|
|
3671
|
+
```python
|
|
3672
|
+
def resolve(
|
|
3673
|
+
context: ResolutionContext
|
|
3674
|
+
)
|
|
3675
|
+
```
|
|
3676
|
+
|
|
3677
|
+
###### `context`<sup>Required</sup> <a name="cdk8s.IResolver.parameter.context"></a>
|
|
3678
|
+
|
|
3679
|
+
- *Type:* [`cdk8s.ResolutionContext`](#cdk8s.ResolutionContext)
|
|
3680
|
+
|
|
3681
|
+
---
|
|
3682
|
+
|
|
3683
|
+
|
|
3181
3684
|
## Enums <a name="Enums"></a>
|
|
3182
3685
|
|
|
3183
3686
|
### SizeRoundingBehavior <a name="SizeRoundingBehavior"></a>
|