cdk8s 1.0.0 → 1.1.3
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/.gitattributes +1 -2
- package/.jsii +287 -41
- package/README.md +0 -2
- package/docs/java.md +244 -0
- package/docs/python.md +307 -2
- package/docs/typescript.md +184 -0
- package/lib/_child_process.d.ts +10 -0
- package/lib/_child_process.js +13 -0
- package/lib/api-object.js +1 -1
- package/lib/app.js +1 -1
- package/lib/chart.js +1 -1
- package/lib/dependency.js +2 -2
- package/lib/duration.js +1 -1
- package/lib/helm.js +4 -4
- package/lib/include.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/lazy.js +1 -1
- package/lib/metadata.d.ts +120 -0
- package/lib/metadata.js +25 -3
- package/lib/names.js +1 -1
- package/lib/size.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +10 -10
package/docs/java.md
CHANGED
|
@@ -556,9 +556,11 @@ import org.cdk8s.ApiObjectMetadata;
|
|
|
556
556
|
|
|
557
557
|
ApiObjectMetadata.builder()
|
|
558
558
|
// .annotations(java.util.Map<java.lang.String, java.lang.String>)
|
|
559
|
+
// .finalizers(java.util.List<java.lang.String>)
|
|
559
560
|
// .labels(java.util.Map<java.lang.String, java.lang.String>)
|
|
560
561
|
// .name(java.lang.String)
|
|
561
562
|
// .namespace(java.lang.String)
|
|
563
|
+
// .ownerReferences(java.util.List<OwnerReference>)
|
|
562
564
|
.build();
|
|
563
565
|
```
|
|
564
566
|
|
|
@@ -580,6 +582,35 @@ preserved when modifying objects.
|
|
|
580
582
|
|
|
581
583
|
---
|
|
582
584
|
|
|
585
|
+
##### `finalizers`<sup>Optional</sup> <a name="org.cdk8s.ApiObjectMetadata.property.finalizers"></a>
|
|
586
|
+
|
|
587
|
+
```java
|
|
588
|
+
public java.util.List<java.lang.String> getFinalizers();
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
- *Type:* java.util.List<`java.lang.String`>
|
|
592
|
+
- *Default:* No finalizers.
|
|
593
|
+
|
|
594
|
+
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
595
|
+
|
|
596
|
+
Must be empty before the object is deleted from the registry. Each entry is
|
|
597
|
+
an identifier for the responsible component that will remove the entry from
|
|
598
|
+
the list. If the deletionTimestamp of the object is non-nil, entries in
|
|
599
|
+
this list can only be removed. Finalizers may be processed and removed in
|
|
600
|
+
any order. Order is NOT enforced because it introduces significant risk of
|
|
601
|
+
stuck finalizers. finalizers is a shared field, any actor with permission
|
|
602
|
+
can reorder it. If the finalizer list is processed in order, then this can
|
|
603
|
+
lead to a situation in which the component responsible for the first
|
|
604
|
+
finalizer in the list is waiting for a signal (field value, external
|
|
605
|
+
system, or other) produced by a component responsible for a finalizer later
|
|
606
|
+
in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
607
|
+
are free to order amongst themselves and are not vulnerable to ordering
|
|
608
|
+
changes in the list.
|
|
609
|
+
|
|
610
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
583
614
|
##### `labels`<sup>Optional</sup> <a name="org.cdk8s.ApiObjectMetadata.property.labels"></a>
|
|
584
615
|
|
|
585
616
|
```java
|
|
@@ -639,6 +670,34 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
639
670
|
|
|
640
671
|
---
|
|
641
672
|
|
|
673
|
+
##### `ownerReferences`<sup>Optional</sup> <a name="org.cdk8s.ApiObjectMetadata.property.ownerReferences"></a>
|
|
674
|
+
|
|
675
|
+
```java
|
|
676
|
+
public java.util.List<OwnerReference> getOwnerReferences();
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
- *Type:* java.util.List<[`org.cdk8s.OwnerReference`](#org.cdk8s.OwnerReference)>
|
|
680
|
+
- *Default:* automatically set by Kubernetes
|
|
681
|
+
|
|
682
|
+
List of objects depended by this object.
|
|
683
|
+
|
|
684
|
+
If ALL objects in the list have
|
|
685
|
+
been deleted, this object will be garbage collected. If this object is
|
|
686
|
+
managed by a controller, then an entry in this list will point to this
|
|
687
|
+
controller, with the controller field set to true. There cannot be more
|
|
688
|
+
than one managing controller.
|
|
689
|
+
|
|
690
|
+
Kubernetes sets the value of this field automatically for objects that are
|
|
691
|
+
dependents of other objects like ReplicaSets, DaemonSets, Deployments, Jobs
|
|
692
|
+
and CronJobs, and ReplicationControllers. You can also configure these
|
|
693
|
+
relationships manually by changing the value of this field. However, you
|
|
694
|
+
usually don't need to and can allow Kubernetes to automatically manage the
|
|
695
|
+
relationships.
|
|
696
|
+
|
|
697
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
698
|
+
|
|
699
|
+
---
|
|
700
|
+
|
|
642
701
|
### ApiObjectProps <a name="org.cdk8s.ApiObjectProps"></a>
|
|
643
702
|
|
|
644
703
|
Options for defining API objects.
|
|
@@ -991,6 +1050,112 @@ Maximum allowed length for the name.
|
|
|
991
1050
|
|
|
992
1051
|
---
|
|
993
1052
|
|
|
1053
|
+
### OwnerReference <a name="org.cdk8s.OwnerReference"></a>
|
|
1054
|
+
|
|
1055
|
+
OwnerReference contains enough information to let you identify an owning object.
|
|
1056
|
+
|
|
1057
|
+
An owning object must be in the same namespace as the dependent, or
|
|
1058
|
+
be cluster-scoped, so there is no namespace field.
|
|
1059
|
+
|
|
1060
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
1061
|
+
|
|
1062
|
+
```java
|
|
1063
|
+
import org.cdk8s.OwnerReference;
|
|
1064
|
+
|
|
1065
|
+
OwnerReference.builder()
|
|
1066
|
+
.apiVersion(java.lang.String)
|
|
1067
|
+
.kind(java.lang.String)
|
|
1068
|
+
.name(java.lang.String)
|
|
1069
|
+
.uid(java.lang.String)
|
|
1070
|
+
// .blockOwnerDeletion(java.lang.Boolean)
|
|
1071
|
+
// .controller(java.lang.Boolean)
|
|
1072
|
+
.build();
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
##### `apiVersion`<sup>Required</sup> <a name="org.cdk8s.OwnerReference.property.apiVersion"></a>
|
|
1076
|
+
|
|
1077
|
+
```java
|
|
1078
|
+
public java.lang.String getApiVersion();
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
- *Type:* `java.lang.String`
|
|
1082
|
+
|
|
1083
|
+
API version of the referent.
|
|
1084
|
+
|
|
1085
|
+
---
|
|
1086
|
+
|
|
1087
|
+
##### `kind`<sup>Required</sup> <a name="org.cdk8s.OwnerReference.property.kind"></a>
|
|
1088
|
+
|
|
1089
|
+
```java
|
|
1090
|
+
public java.lang.String getKind();
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
- *Type:* `java.lang.String`
|
|
1094
|
+
|
|
1095
|
+
Kind of the referent.
|
|
1096
|
+
|
|
1097
|
+
> https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
1098
|
+
|
|
1099
|
+
---
|
|
1100
|
+
|
|
1101
|
+
##### `name`<sup>Required</sup> <a name="org.cdk8s.OwnerReference.property.name"></a>
|
|
1102
|
+
|
|
1103
|
+
```java
|
|
1104
|
+
public java.lang.String getName();
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1107
|
+
- *Type:* `java.lang.String`
|
|
1108
|
+
|
|
1109
|
+
Name of the referent.
|
|
1110
|
+
|
|
1111
|
+
> http://kubernetes.io/docs/user-guide/identifiers#names
|
|
1112
|
+
|
|
1113
|
+
---
|
|
1114
|
+
|
|
1115
|
+
##### `uid`<sup>Required</sup> <a name="org.cdk8s.OwnerReference.property.uid"></a>
|
|
1116
|
+
|
|
1117
|
+
```java
|
|
1118
|
+
public java.lang.String getUid();
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
- *Type:* `java.lang.String`
|
|
1122
|
+
|
|
1123
|
+
UID of the referent.
|
|
1124
|
+
|
|
1125
|
+
> http://kubernetes.io/docs/user-guide/identifiers#uids
|
|
1126
|
+
|
|
1127
|
+
---
|
|
1128
|
+
|
|
1129
|
+
##### `blockOwnerDeletion`<sup>Optional</sup> <a name="org.cdk8s.OwnerReference.property.blockOwnerDeletion"></a>
|
|
1130
|
+
|
|
1131
|
+
```java
|
|
1132
|
+
public java.lang.Boolean getBlockOwnerDeletion();
|
|
1133
|
+
```
|
|
1134
|
+
|
|
1135
|
+
- *Type:* `java.lang.Boolean`
|
|
1136
|
+
- *Default:* false. To set this field, a user needs "delete" permission of the
|
|
1137
|
+
owner, otherwise 422 (Unprocessable Entity) will be returned.
|
|
1138
|
+
|
|
1139
|
+
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.
|
|
1140
|
+
|
|
1141
|
+
Defaults to false. To set this field, a user needs "delete"
|
|
1142
|
+
permission of the owner, otherwise 422 (Unprocessable Entity) will be
|
|
1143
|
+
returned.
|
|
1144
|
+
|
|
1145
|
+
---
|
|
1146
|
+
|
|
1147
|
+
##### `controller`<sup>Optional</sup> <a name="org.cdk8s.OwnerReference.property.controller"></a>
|
|
1148
|
+
|
|
1149
|
+
```java
|
|
1150
|
+
public java.lang.Boolean getController();
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
- *Type:* `java.lang.Boolean`
|
|
1154
|
+
|
|
1155
|
+
If true, this reference points to the managing controller.
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
994
1159
|
### SizeConversionOptions <a name="org.cdk8s.SizeConversionOptions"></a>
|
|
995
1160
|
|
|
996
1161
|
Options for how to convert time to a different unit.
|
|
@@ -1058,9 +1223,11 @@ import org.cdk8s.ApiObjectMetadataDefinition;
|
|
|
1058
1223
|
|
|
1059
1224
|
ApiObjectMetadataDefinition.Builder.create()
|
|
1060
1225
|
// .annotations(java.util.Map<java.lang.String, java.lang.String>)
|
|
1226
|
+
// .finalizers(java.util.List<java.lang.String>)
|
|
1061
1227
|
// .labels(java.util.Map<java.lang.String, java.lang.String>)
|
|
1062
1228
|
// .name(java.lang.String)
|
|
1063
1229
|
// .namespace(java.lang.String)
|
|
1230
|
+
// .ownerReferences(java.util.List<OwnerReference>)
|
|
1064
1231
|
.build();
|
|
1065
1232
|
```
|
|
1066
1233
|
|
|
@@ -1078,6 +1245,31 @@ preserved when modifying objects.
|
|
|
1078
1245
|
|
|
1079
1246
|
---
|
|
1080
1247
|
|
|
1248
|
+
##### `finalizers`<sup>Optional</sup> <a name="org.cdk8s.ApiObjectMetadata.parameter.finalizers"></a>
|
|
1249
|
+
|
|
1250
|
+
- *Type:* java.util.List<`java.lang.String`>
|
|
1251
|
+
- *Default:* No finalizers.
|
|
1252
|
+
|
|
1253
|
+
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
1254
|
+
|
|
1255
|
+
Must be empty before the object is deleted from the registry. Each entry is
|
|
1256
|
+
an identifier for the responsible component that will remove the entry from
|
|
1257
|
+
the list. If the deletionTimestamp of the object is non-nil, entries in
|
|
1258
|
+
this list can only be removed. Finalizers may be processed and removed in
|
|
1259
|
+
any order. Order is NOT enforced because it introduces significant risk of
|
|
1260
|
+
stuck finalizers. finalizers is a shared field, any actor with permission
|
|
1261
|
+
can reorder it. If the finalizer list is processed in order, then this can
|
|
1262
|
+
lead to a situation in which the component responsible for the first
|
|
1263
|
+
finalizer in the list is waiting for a signal (field value, external
|
|
1264
|
+
system, or other) produced by a component responsible for a finalizer later
|
|
1265
|
+
in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
1266
|
+
are free to order amongst themselves and are not vulnerable to ordering
|
|
1267
|
+
changes in the list.
|
|
1268
|
+
|
|
1269
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
1270
|
+
|
|
1271
|
+
---
|
|
1272
|
+
|
|
1081
1273
|
##### `labels`<sup>Optional</sup> <a name="org.cdk8s.ApiObjectMetadata.parameter.labels"></a>
|
|
1082
1274
|
|
|
1083
1275
|
- *Type:* java.util.Map<java.lang.String, `java.lang.String`>
|
|
@@ -1125,6 +1317,30 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
1125
1317
|
|
|
1126
1318
|
---
|
|
1127
1319
|
|
|
1320
|
+
##### `ownerReferences`<sup>Optional</sup> <a name="org.cdk8s.ApiObjectMetadata.parameter.ownerReferences"></a>
|
|
1321
|
+
|
|
1322
|
+
- *Type:* java.util.List<[`org.cdk8s.OwnerReference`](#org.cdk8s.OwnerReference)>
|
|
1323
|
+
- *Default:* automatically set by Kubernetes
|
|
1324
|
+
|
|
1325
|
+
List of objects depended by this object.
|
|
1326
|
+
|
|
1327
|
+
If ALL objects in the list have
|
|
1328
|
+
been deleted, this object will be garbage collected. If this object is
|
|
1329
|
+
managed by a controller, then an entry in this list will point to this
|
|
1330
|
+
controller, with the controller field set to true. There cannot be more
|
|
1331
|
+
than one managing controller.
|
|
1332
|
+
|
|
1333
|
+
Kubernetes sets the value of this field automatically for objects that are
|
|
1334
|
+
dependents of other objects like ReplicaSets, DaemonSets, Deployments, Jobs
|
|
1335
|
+
and CronJobs, and ReplicationControllers. You can also configure these
|
|
1336
|
+
relationships manually by changing the value of this field. However, you
|
|
1337
|
+
usually don't need to and can allow Kubernetes to automatically manage the
|
|
1338
|
+
relationships.
|
|
1339
|
+
|
|
1340
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
1341
|
+
|
|
1342
|
+
---
|
|
1343
|
+
|
|
1128
1344
|
#### Methods <a name="Methods"></a>
|
|
1129
1345
|
|
|
1130
1346
|
##### `add` <a name="org.cdk8s.ApiObjectMetadataDefinition.add"></a>
|
|
@@ -1171,6 +1387,20 @@ The value.
|
|
|
1171
1387
|
|
|
1172
1388
|
---
|
|
1173
1389
|
|
|
1390
|
+
##### `addFinalizers` <a name="org.cdk8s.ApiObjectMetadataDefinition.addFinalizers"></a>
|
|
1391
|
+
|
|
1392
|
+
```java
|
|
1393
|
+
public addFinalizers(java.lang.String finalizers)
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
###### `finalizers`<sup>Required</sup> <a name="org.cdk8s.ApiObjectMetadataDefinition.parameter.finalizers"></a>
|
|
1397
|
+
|
|
1398
|
+
- *Type:* `java.lang.String`
|
|
1399
|
+
|
|
1400
|
+
the finalizers.
|
|
1401
|
+
|
|
1402
|
+
---
|
|
1403
|
+
|
|
1174
1404
|
##### `addLabel` <a name="org.cdk8s.ApiObjectMetadataDefinition.addLabel"></a>
|
|
1175
1405
|
|
|
1176
1406
|
```java
|
|
@@ -1193,6 +1423,20 @@ The value.
|
|
|
1193
1423
|
|
|
1194
1424
|
---
|
|
1195
1425
|
|
|
1426
|
+
##### `addOwnerReference` <a name="org.cdk8s.ApiObjectMetadataDefinition.addOwnerReference"></a>
|
|
1427
|
+
|
|
1428
|
+
```java
|
|
1429
|
+
public addOwnerReference(OwnerReference owner)
|
|
1430
|
+
```
|
|
1431
|
+
|
|
1432
|
+
###### `owner`<sup>Required</sup> <a name="org.cdk8s.ApiObjectMetadataDefinition.parameter.owner"></a>
|
|
1433
|
+
|
|
1434
|
+
- *Type:* [`org.cdk8s.OwnerReference`](#org.cdk8s.OwnerReference)
|
|
1435
|
+
|
|
1436
|
+
the owner.
|
|
1437
|
+
|
|
1438
|
+
---
|
|
1439
|
+
|
|
1196
1440
|
##### `getLabel` <a name="org.cdk8s.ApiObjectMetadataDefinition.getLabel"></a>
|
|
1197
1441
|
|
|
1198
1442
|
```java
|
package/docs/python.md
CHANGED
|
@@ -576,9 +576,11 @@ import cdk8s
|
|
|
576
576
|
|
|
577
577
|
cdk8s.ApiObjectMetadata(
|
|
578
578
|
annotations: typing.Mapping[str] = None,
|
|
579
|
+
finalizers: typing.List[str] = None,
|
|
579
580
|
labels: typing.Mapping[str] = None,
|
|
580
581
|
name: str = None,
|
|
581
|
-
namespace: str = None
|
|
582
|
+
namespace: str = None,
|
|
583
|
+
owner_references: typing.List[OwnerReference] = None
|
|
582
584
|
)
|
|
583
585
|
```
|
|
584
586
|
|
|
@@ -600,6 +602,35 @@ preserved when modifying objects.
|
|
|
600
602
|
|
|
601
603
|
---
|
|
602
604
|
|
|
605
|
+
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.finalizers"></a>
|
|
606
|
+
|
|
607
|
+
```python
|
|
608
|
+
finalizers: typing.List[str]
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
- *Type:* typing.List[`str`]
|
|
612
|
+
- *Default:* No finalizers.
|
|
613
|
+
|
|
614
|
+
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
615
|
+
|
|
616
|
+
Must be empty before the object is deleted from the registry. Each entry is
|
|
617
|
+
an identifier for the responsible component that will remove the entry from
|
|
618
|
+
the list. If the deletionTimestamp of the object is non-nil, entries in
|
|
619
|
+
this list can only be removed. Finalizers may be processed and removed in
|
|
620
|
+
any order. Order is NOT enforced because it introduces significant risk of
|
|
621
|
+
stuck finalizers. finalizers is a shared field, any actor with permission
|
|
622
|
+
can reorder it. If the finalizer list is processed in order, then this can
|
|
623
|
+
lead to a situation in which the component responsible for the first
|
|
624
|
+
finalizer in the list is waiting for a signal (field value, external
|
|
625
|
+
system, or other) produced by a component responsible for a finalizer later
|
|
626
|
+
in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
627
|
+
are free to order amongst themselves and are not vulnerable to ordering
|
|
628
|
+
changes in the list.
|
|
629
|
+
|
|
630
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
631
|
+
|
|
632
|
+
---
|
|
633
|
+
|
|
603
634
|
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.labels"></a>
|
|
604
635
|
|
|
605
636
|
```python
|
|
@@ -659,6 +690,34 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
659
690
|
|
|
660
691
|
---
|
|
661
692
|
|
|
693
|
+
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.property.owner_references"></a>
|
|
694
|
+
|
|
695
|
+
```python
|
|
696
|
+
owner_references: typing.List[OwnerReference]
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
- *Type:* typing.List[[`cdk8s.OwnerReference`](#cdk8s.OwnerReference)]
|
|
700
|
+
- *Default:* automatically set by Kubernetes
|
|
701
|
+
|
|
702
|
+
List of objects depended by this object.
|
|
703
|
+
|
|
704
|
+
If ALL objects in the list have
|
|
705
|
+
been deleted, this object will be garbage collected. If this object is
|
|
706
|
+
managed by a controller, then an entry in this list will point to this
|
|
707
|
+
controller, with the controller field set to true. There cannot be more
|
|
708
|
+
than one managing controller.
|
|
709
|
+
|
|
710
|
+
Kubernetes sets the value of this field automatically for objects that are
|
|
711
|
+
dependents of other objects like ReplicaSets, DaemonSets, Deployments, Jobs
|
|
712
|
+
and CronJobs, and ReplicationControllers. You can also configure these
|
|
713
|
+
relationships manually by changing the value of this field. However, you
|
|
714
|
+
usually don't need to and can allow Kubernetes to automatically manage the
|
|
715
|
+
relationships.
|
|
716
|
+
|
|
717
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
662
721
|
### ApiObjectProps <a name="cdk8s.ApiObjectProps"></a>
|
|
663
722
|
|
|
664
723
|
Options for defining API objects.
|
|
@@ -1011,6 +1070,112 @@ Maximum allowed length for the name.
|
|
|
1011
1070
|
|
|
1012
1071
|
---
|
|
1013
1072
|
|
|
1073
|
+
### OwnerReference <a name="cdk8s.OwnerReference"></a>
|
|
1074
|
+
|
|
1075
|
+
OwnerReference contains enough information to let you identify an owning object.
|
|
1076
|
+
|
|
1077
|
+
An owning object must be in the same namespace as the dependent, or
|
|
1078
|
+
be cluster-scoped, so there is no namespace field.
|
|
1079
|
+
|
|
1080
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
1081
|
+
|
|
1082
|
+
```python
|
|
1083
|
+
import cdk8s
|
|
1084
|
+
|
|
1085
|
+
cdk8s.OwnerReference(
|
|
1086
|
+
api_version: str,
|
|
1087
|
+
kind: str,
|
|
1088
|
+
name: str,
|
|
1089
|
+
uid: str,
|
|
1090
|
+
block_owner_deletion: bool = None,
|
|
1091
|
+
controller: bool = None
|
|
1092
|
+
)
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
##### `api_version`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.api_version"></a>
|
|
1096
|
+
|
|
1097
|
+
```python
|
|
1098
|
+
api_version: str
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
- *Type:* `str`
|
|
1102
|
+
|
|
1103
|
+
API version of the referent.
|
|
1104
|
+
|
|
1105
|
+
---
|
|
1106
|
+
|
|
1107
|
+
##### `kind`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.kind"></a>
|
|
1108
|
+
|
|
1109
|
+
```python
|
|
1110
|
+
kind: str
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
- *Type:* `str`
|
|
1114
|
+
|
|
1115
|
+
Kind of the referent.
|
|
1116
|
+
|
|
1117
|
+
> https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
1118
|
+
|
|
1119
|
+
---
|
|
1120
|
+
|
|
1121
|
+
##### `name`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.name"></a>
|
|
1122
|
+
|
|
1123
|
+
```python
|
|
1124
|
+
name: str
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
- *Type:* `str`
|
|
1128
|
+
|
|
1129
|
+
Name of the referent.
|
|
1130
|
+
|
|
1131
|
+
> http://kubernetes.io/docs/user-guide/identifiers#names
|
|
1132
|
+
|
|
1133
|
+
---
|
|
1134
|
+
|
|
1135
|
+
##### `uid`<sup>Required</sup> <a name="cdk8s.OwnerReference.property.uid"></a>
|
|
1136
|
+
|
|
1137
|
+
```python
|
|
1138
|
+
uid: str
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
- *Type:* `str`
|
|
1142
|
+
|
|
1143
|
+
UID of the referent.
|
|
1144
|
+
|
|
1145
|
+
> http://kubernetes.io/docs/user-guide/identifiers#uids
|
|
1146
|
+
|
|
1147
|
+
---
|
|
1148
|
+
|
|
1149
|
+
##### `block_owner_deletion`<sup>Optional</sup> <a name="cdk8s.OwnerReference.property.block_owner_deletion"></a>
|
|
1150
|
+
|
|
1151
|
+
```python
|
|
1152
|
+
block_owner_deletion: bool
|
|
1153
|
+
```
|
|
1154
|
+
|
|
1155
|
+
- *Type:* `bool`
|
|
1156
|
+
- *Default:* false. To set this field, a user needs "delete" permission of the
|
|
1157
|
+
owner, otherwise 422 (Unprocessable Entity) will be returned.
|
|
1158
|
+
|
|
1159
|
+
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.
|
|
1160
|
+
|
|
1161
|
+
Defaults to false. To set this field, a user needs "delete"
|
|
1162
|
+
permission of the owner, otherwise 422 (Unprocessable Entity) will be
|
|
1163
|
+
returned.
|
|
1164
|
+
|
|
1165
|
+
---
|
|
1166
|
+
|
|
1167
|
+
##### `controller`<sup>Optional</sup> <a name="cdk8s.OwnerReference.property.controller"></a>
|
|
1168
|
+
|
|
1169
|
+
```python
|
|
1170
|
+
controller: bool
|
|
1171
|
+
```
|
|
1172
|
+
|
|
1173
|
+
- *Type:* `bool`
|
|
1174
|
+
|
|
1175
|
+
If true, this reference points to the managing controller.
|
|
1176
|
+
|
|
1177
|
+
---
|
|
1178
|
+
|
|
1014
1179
|
### SizeConversionOptions <a name="cdk8s.SizeConversionOptions"></a>
|
|
1015
1180
|
|
|
1016
1181
|
Options for how to convert time to a different unit.
|
|
@@ -1078,9 +1243,11 @@ import cdk8s
|
|
|
1078
1243
|
|
|
1079
1244
|
cdk8s.ApiObjectMetadataDefinition(
|
|
1080
1245
|
annotations: typing.Mapping[str] = None,
|
|
1246
|
+
finalizers: typing.List[str] = None,
|
|
1081
1247
|
labels: typing.Mapping[str] = None,
|
|
1082
1248
|
name: str = None,
|
|
1083
|
-
namespace: str = None
|
|
1249
|
+
namespace: str = None,
|
|
1250
|
+
owner_references: typing.List[OwnerReference] = None
|
|
1084
1251
|
)
|
|
1085
1252
|
```
|
|
1086
1253
|
|
|
@@ -1098,6 +1265,31 @@ preserved when modifying objects.
|
|
|
1098
1265
|
|
|
1099
1266
|
---
|
|
1100
1267
|
|
|
1268
|
+
##### `finalizers`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.parameter.finalizers"></a>
|
|
1269
|
+
|
|
1270
|
+
- *Type:* typing.List[`str`]
|
|
1271
|
+
- *Default:* No finalizers.
|
|
1272
|
+
|
|
1273
|
+
Namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion.
|
|
1274
|
+
|
|
1275
|
+
Must be empty before the object is deleted from the registry. Each entry is
|
|
1276
|
+
an identifier for the responsible component that will remove the entry from
|
|
1277
|
+
the list. If the deletionTimestamp of the object is non-nil, entries in
|
|
1278
|
+
this list can only be removed. Finalizers may be processed and removed in
|
|
1279
|
+
any order. Order is NOT enforced because it introduces significant risk of
|
|
1280
|
+
stuck finalizers. finalizers is a shared field, any actor with permission
|
|
1281
|
+
can reorder it. If the finalizer list is processed in order, then this can
|
|
1282
|
+
lead to a situation in which the component responsible for the first
|
|
1283
|
+
finalizer in the list is waiting for a signal (field value, external
|
|
1284
|
+
system, or other) produced by a component responsible for a finalizer later
|
|
1285
|
+
in the list, resulting in a deadlock. Without enforced ordering finalizers
|
|
1286
|
+
are free to order amongst themselves and are not vulnerable to ordering
|
|
1287
|
+
changes in the list.
|
|
1288
|
+
|
|
1289
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
|
|
1290
|
+
|
|
1291
|
+
---
|
|
1292
|
+
|
|
1101
1293
|
##### `labels`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.parameter.labels"></a>
|
|
1102
1294
|
|
|
1103
1295
|
- *Type:* typing.Mapping[`str`]
|
|
@@ -1145,6 +1337,30 @@ Not all objects are required to be scoped to a namespace - the value of this fie
|
|
|
1145
1337
|
|
|
1146
1338
|
---
|
|
1147
1339
|
|
|
1340
|
+
##### `owner_references`<sup>Optional</sup> <a name="cdk8s.ApiObjectMetadata.parameter.owner_references"></a>
|
|
1341
|
+
|
|
1342
|
+
- *Type:* typing.List[[`cdk8s.OwnerReference`](#cdk8s.OwnerReference)]
|
|
1343
|
+
- *Default:* automatically set by Kubernetes
|
|
1344
|
+
|
|
1345
|
+
List of objects depended by this object.
|
|
1346
|
+
|
|
1347
|
+
If ALL objects in the list have
|
|
1348
|
+
been deleted, this object will be garbage collected. If this object is
|
|
1349
|
+
managed by a controller, then an entry in this list will point to this
|
|
1350
|
+
controller, with the controller field set to true. There cannot be more
|
|
1351
|
+
than one managing controller.
|
|
1352
|
+
|
|
1353
|
+
Kubernetes sets the value of this field automatically for objects that are
|
|
1354
|
+
dependents of other objects like ReplicaSets, DaemonSets, Deployments, Jobs
|
|
1355
|
+
and CronJobs, and ReplicationControllers. You can also configure these
|
|
1356
|
+
relationships manually by changing the value of this field. However, you
|
|
1357
|
+
usually don't need to and can allow Kubernetes to automatically manage the
|
|
1358
|
+
relationships.
|
|
1359
|
+
|
|
1360
|
+
> https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
|
|
1361
|
+
|
|
1362
|
+
---
|
|
1363
|
+
|
|
1148
1364
|
#### Methods <a name="Methods"></a>
|
|
1149
1365
|
|
|
1150
1366
|
##### `add` <a name="cdk8s.ApiObjectMetadataDefinition.add"></a>
|
|
@@ -1197,6 +1413,22 @@ The value.
|
|
|
1197
1413
|
|
|
1198
1414
|
---
|
|
1199
1415
|
|
|
1416
|
+
##### `add_finalizers` <a name="cdk8s.ApiObjectMetadataDefinition.add_finalizers"></a>
|
|
1417
|
+
|
|
1418
|
+
```python
|
|
1419
|
+
def add_finalizers(
|
|
1420
|
+
finalizers: str
|
|
1421
|
+
)
|
|
1422
|
+
```
|
|
1423
|
+
|
|
1424
|
+
###### `finalizers`<sup>Required</sup> <a name="cdk8s.ApiObjectMetadataDefinition.parameter.finalizers"></a>
|
|
1425
|
+
|
|
1426
|
+
- *Type:* `str`
|
|
1427
|
+
|
|
1428
|
+
the finalizers.
|
|
1429
|
+
|
|
1430
|
+
---
|
|
1431
|
+
|
|
1200
1432
|
##### `add_label` <a name="cdk8s.ApiObjectMetadataDefinition.add_label"></a>
|
|
1201
1433
|
|
|
1202
1434
|
```python
|
|
@@ -1222,6 +1454,79 @@ The value.
|
|
|
1222
1454
|
|
|
1223
1455
|
---
|
|
1224
1456
|
|
|
1457
|
+
##### `add_owner_reference` <a name="cdk8s.ApiObjectMetadataDefinition.add_owner_reference"></a>
|
|
1458
|
+
|
|
1459
|
+
```python
|
|
1460
|
+
def add_owner_reference(
|
|
1461
|
+
api_version: str,
|
|
1462
|
+
kind: str,
|
|
1463
|
+
name: str,
|
|
1464
|
+
uid: str,
|
|
1465
|
+
block_owner_deletion: bool = None,
|
|
1466
|
+
controller: bool = None
|
|
1467
|
+
)
|
|
1468
|
+
```
|
|
1469
|
+
|
|
1470
|
+
###### `api_version`<sup>Required</sup> <a name="cdk8s.OwnerReference.parameter.api_version"></a>
|
|
1471
|
+
|
|
1472
|
+
- *Type:* `str`
|
|
1473
|
+
|
|
1474
|
+
API version of the referent.
|
|
1475
|
+
|
|
1476
|
+
---
|
|
1477
|
+
|
|
1478
|
+
###### `kind`<sup>Required</sup> <a name="cdk8s.OwnerReference.parameter.kind"></a>
|
|
1479
|
+
|
|
1480
|
+
- *Type:* `str`
|
|
1481
|
+
|
|
1482
|
+
Kind of the referent.
|
|
1483
|
+
|
|
1484
|
+
> https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
1485
|
+
|
|
1486
|
+
---
|
|
1487
|
+
|
|
1488
|
+
###### `name`<sup>Required</sup> <a name="cdk8s.OwnerReference.parameter.name"></a>
|
|
1489
|
+
|
|
1490
|
+
- *Type:* `str`
|
|
1491
|
+
|
|
1492
|
+
Name of the referent.
|
|
1493
|
+
|
|
1494
|
+
> http://kubernetes.io/docs/user-guide/identifiers#names
|
|
1495
|
+
|
|
1496
|
+
---
|
|
1497
|
+
|
|
1498
|
+
###### `uid`<sup>Required</sup> <a name="cdk8s.OwnerReference.parameter.uid"></a>
|
|
1499
|
+
|
|
1500
|
+
- *Type:* `str`
|
|
1501
|
+
|
|
1502
|
+
UID of the referent.
|
|
1503
|
+
|
|
1504
|
+
> http://kubernetes.io/docs/user-guide/identifiers#uids
|
|
1505
|
+
|
|
1506
|
+
---
|
|
1507
|
+
|
|
1508
|
+
###### `block_owner_deletion`<sup>Optional</sup> <a name="cdk8s.OwnerReference.parameter.block_owner_deletion"></a>
|
|
1509
|
+
|
|
1510
|
+
- *Type:* `bool`
|
|
1511
|
+
- *Default:* false. To set this field, a user needs "delete" permission of the
|
|
1512
|
+
owner, otherwise 422 (Unprocessable Entity) will be returned.
|
|
1513
|
+
|
|
1514
|
+
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.
|
|
1515
|
+
|
|
1516
|
+
Defaults to false. To set this field, a user needs "delete"
|
|
1517
|
+
permission of the owner, otherwise 422 (Unprocessable Entity) will be
|
|
1518
|
+
returned.
|
|
1519
|
+
|
|
1520
|
+
---
|
|
1521
|
+
|
|
1522
|
+
###### `controller`<sup>Optional</sup> <a name="cdk8s.OwnerReference.parameter.controller"></a>
|
|
1523
|
+
|
|
1524
|
+
- *Type:* `bool`
|
|
1525
|
+
|
|
1526
|
+
If true, this reference points to the managing controller.
|
|
1527
|
+
|
|
1528
|
+
---
|
|
1529
|
+
|
|
1225
1530
|
##### `get_label` <a name="cdk8s.ApiObjectMetadataDefinition.get_label"></a>
|
|
1226
1531
|
|
|
1227
1532
|
```python
|