cdk8s-plus-32 2.2.0 → 2.3.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 +92 -6
- package/docs/java.md +140 -0
- package/docs/python.md +214 -0
- package/docs/typescript.md +131 -0
- package/lib/_action.d.ts +4 -0
- package/lib/_action.js +7 -1
- package/lib/api-resource.js +2 -2
- package/lib/base.js +2 -2
- package/lib/config-map.js +1 -1
- package/lib/container.js +6 -6
- package/lib/cron-job.js +1 -1
- package/lib/daemon-set.js +1 -1
- package/lib/deployment.js +3 -3
- package/lib/handler.js +1 -1
- package/lib/horizontal-pod-autoscaler.js +4 -4
- package/lib/imports/k8s.js +156 -156
- package/lib/ingress.js +2 -2
- package/lib/job.js +1 -1
- package/lib/namespace.js +2 -2
- package/lib/network-policy.js +3 -3
- package/lib/pod.js +16 -16
- package/lib/probe.d.ts +24 -0
- package/lib/probe.js +17 -6
- package/lib/pv.js +4 -4
- package/lib/pvc.js +1 -1
- package/lib/role-binding.js +4 -4
- package/lib/role.js +2 -2
- package/lib/secret.js +6 -6
- package/lib/service-account.js +1 -1
- package/lib/service.js +1 -1
- package/lib/stateful-set.js +2 -2
- package/lib/volume.js +1 -1
- package/lib/workload.js +2 -2
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -9137,6 +9137,63 @@
|
|
|
9137
9137
|
],
|
|
9138
9138
|
"symbolId": "src/role-binding:Group"
|
|
9139
9139
|
},
|
|
9140
|
+
"cdk8s-plus-32.GrpcProbeOptions": {
|
|
9141
|
+
"assembly": "cdk8s-plus-32",
|
|
9142
|
+
"datatype": true,
|
|
9143
|
+
"docs": {
|
|
9144
|
+
"stability": "stable",
|
|
9145
|
+
"summary": "Options for `Probe.fromGrpc()`."
|
|
9146
|
+
},
|
|
9147
|
+
"fqn": "cdk8s-plus-32.GrpcProbeOptions",
|
|
9148
|
+
"interfaces": [
|
|
9149
|
+
"cdk8s-plus-32.ProbeOptions"
|
|
9150
|
+
],
|
|
9151
|
+
"kind": "interface",
|
|
9152
|
+
"locationInModule": {
|
|
9153
|
+
"filename": "src/probe.ts",
|
|
9154
|
+
"line": 126
|
|
9155
|
+
},
|
|
9156
|
+
"name": "GrpcProbeOptions",
|
|
9157
|
+
"properties": [
|
|
9158
|
+
{
|
|
9159
|
+
"abstract": true,
|
|
9160
|
+
"docs": {
|
|
9161
|
+
"default": "- defaults to `container.port`.",
|
|
9162
|
+
"stability": "stable",
|
|
9163
|
+
"summary": "The TCP port to connect to on the container."
|
|
9164
|
+
},
|
|
9165
|
+
"immutable": true,
|
|
9166
|
+
"locationInModule": {
|
|
9167
|
+
"filename": "src/probe.ts",
|
|
9168
|
+
"line": 132
|
|
9169
|
+
},
|
|
9170
|
+
"name": "port",
|
|
9171
|
+
"optional": true,
|
|
9172
|
+
"type": {
|
|
9173
|
+
"primitive": "number"
|
|
9174
|
+
}
|
|
9175
|
+
},
|
|
9176
|
+
{
|
|
9177
|
+
"abstract": true,
|
|
9178
|
+
"docs": {
|
|
9179
|
+
"default": "- If this is not specified, the default behavior is defined by gRPC.",
|
|
9180
|
+
"stability": "stable",
|
|
9181
|
+
"summary": "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md)."
|
|
9182
|
+
},
|
|
9183
|
+
"immutable": true,
|
|
9184
|
+
"locationInModule": {
|
|
9185
|
+
"filename": "src/probe.ts",
|
|
9186
|
+
"line": 139
|
|
9187
|
+
},
|
|
9188
|
+
"name": "service",
|
|
9189
|
+
"optional": true,
|
|
9190
|
+
"type": {
|
|
9191
|
+
"primitive": "string"
|
|
9192
|
+
}
|
|
9193
|
+
}
|
|
9194
|
+
],
|
|
9195
|
+
"symbolId": "src/probe:GrpcProbeOptions"
|
|
9196
|
+
},
|
|
9140
9197
|
"cdk8s-plus-32.Handler": {
|
|
9141
9198
|
"assembly": "cdk8s-plus-32",
|
|
9142
9199
|
"docs": {
|
|
@@ -17837,7 +17894,7 @@
|
|
|
17837
17894
|
"kind": "class",
|
|
17838
17895
|
"locationInModule": {
|
|
17839
17896
|
"filename": "src/probe.ts",
|
|
17840
|
-
"line":
|
|
17897
|
+
"line": 146
|
|
17841
17898
|
},
|
|
17842
17899
|
"methods": [
|
|
17843
17900
|
{
|
|
@@ -17847,7 +17904,7 @@
|
|
|
17847
17904
|
},
|
|
17848
17905
|
"locationInModule": {
|
|
17849
17906
|
"filename": "src/probe.ts",
|
|
17850
|
-
"line":
|
|
17907
|
+
"line": 164
|
|
17851
17908
|
},
|
|
17852
17909
|
"name": "fromCommand",
|
|
17853
17910
|
"parameters": [
|
|
@@ -17883,6 +17940,35 @@
|
|
|
17883
17940
|
},
|
|
17884
17941
|
"static": true
|
|
17885
17942
|
},
|
|
17943
|
+
{
|
|
17944
|
+
"docs": {
|
|
17945
|
+
"stability": "stable",
|
|
17946
|
+
"summary": "Defines a probe based on a gRPC request to the container."
|
|
17947
|
+
},
|
|
17948
|
+
"locationInModule": {
|
|
17949
|
+
"filename": "src/probe.ts",
|
|
17950
|
+
"line": 182
|
|
17951
|
+
},
|
|
17952
|
+
"name": "fromGrpc",
|
|
17953
|
+
"parameters": [
|
|
17954
|
+
{
|
|
17955
|
+
"docs": {
|
|
17956
|
+
"summary": "Options."
|
|
17957
|
+
},
|
|
17958
|
+
"name": "options",
|
|
17959
|
+
"optional": true,
|
|
17960
|
+
"type": {
|
|
17961
|
+
"fqn": "cdk8s-plus-32.GrpcProbeOptions"
|
|
17962
|
+
}
|
|
17963
|
+
}
|
|
17964
|
+
],
|
|
17965
|
+
"returns": {
|
|
17966
|
+
"type": {
|
|
17967
|
+
"fqn": "cdk8s-plus-32.Probe"
|
|
17968
|
+
}
|
|
17969
|
+
},
|
|
17970
|
+
"static": true
|
|
17971
|
+
},
|
|
17886
17972
|
{
|
|
17887
17973
|
"docs": {
|
|
17888
17974
|
"stability": "stable",
|
|
@@ -17890,7 +17976,7 @@
|
|
|
17890
17976
|
},
|
|
17891
17977
|
"locationInModule": {
|
|
17892
17978
|
"filename": "src/probe.ts",
|
|
17893
|
-
"line":
|
|
17979
|
+
"line": 154
|
|
17894
17980
|
},
|
|
17895
17981
|
"name": "fromHttpGet",
|
|
17896
17982
|
"parameters": [
|
|
@@ -17928,7 +18014,7 @@
|
|
|
17928
18014
|
},
|
|
17929
18015
|
"locationInModule": {
|
|
17930
18016
|
"filename": "src/probe.ts",
|
|
17931
|
-
"line":
|
|
18017
|
+
"line": 173
|
|
17932
18018
|
},
|
|
17933
18019
|
"name": "fromTcpSocket",
|
|
17934
18020
|
"parameters": [
|
|
@@ -90774,6 +90860,6 @@
|
|
|
90774
90860
|
"symbolId": "src/imports/k8s:WindowsSecurityContextOptions"
|
|
90775
90861
|
}
|
|
90776
90862
|
},
|
|
90777
|
-
"version": "2.
|
|
90778
|
-
"fingerprint": "
|
|
90863
|
+
"version": "2.3.0",
|
|
90864
|
+
"fingerprint": "nOgT/q9pf4OxFIyDJbx/iPypnBAmq5yRrIYMNGZs9T4="
|
|
90779
90865
|
}
|
package/docs/java.md
CHANGED
|
@@ -13136,6 +13136,129 @@ Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
|
|
|
13136
13136
|
|
|
13137
13137
|
---
|
|
13138
13138
|
|
|
13139
|
+
### GrpcProbeOptions <a name="org.cdk8s.plus32.GrpcProbeOptions"></a>
|
|
13140
|
+
|
|
13141
|
+
Options for `Probe.fromGrpc()`.
|
|
13142
|
+
|
|
13143
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
13144
|
+
|
|
13145
|
+
```java
|
|
13146
|
+
import org.cdk8s.plus32.GrpcProbeOptions;
|
|
13147
|
+
|
|
13148
|
+
GrpcProbeOptions.builder()
|
|
13149
|
+
// .failureThreshold(java.lang.Number)
|
|
13150
|
+
// .initialDelaySeconds(Duration)
|
|
13151
|
+
// .periodSeconds(Duration)
|
|
13152
|
+
// .successThreshold(java.lang.Number)
|
|
13153
|
+
// .timeoutSeconds(Duration)
|
|
13154
|
+
// .port(java.lang.Number)
|
|
13155
|
+
// .service(java.lang.String)
|
|
13156
|
+
.build();
|
|
13157
|
+
```
|
|
13158
|
+
|
|
13159
|
+
##### `failureThreshold`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.failureThreshold"></a>
|
|
13160
|
+
|
|
13161
|
+
```java
|
|
13162
|
+
public java.lang.Number getFailureThreshold();
|
|
13163
|
+
```
|
|
13164
|
+
|
|
13165
|
+
- *Type:* `java.lang.Number`
|
|
13166
|
+
- *Default:* 3
|
|
13167
|
+
|
|
13168
|
+
Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
|
13169
|
+
|
|
13170
|
+
Defaults to 3. Minimum value is 1.
|
|
13171
|
+
|
|
13172
|
+
---
|
|
13173
|
+
|
|
13174
|
+
##### `initialDelaySeconds`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.initialDelaySeconds"></a>
|
|
13175
|
+
|
|
13176
|
+
```java
|
|
13177
|
+
public Duration getInitialDelaySeconds();
|
|
13178
|
+
```
|
|
13179
|
+
|
|
13180
|
+
- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration)
|
|
13181
|
+
- *Default:* immediate
|
|
13182
|
+
|
|
13183
|
+
Number of seconds after the container has started before liveness probes are initiated.
|
|
13184
|
+
|
|
13185
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
13186
|
+
|
|
13187
|
+
---
|
|
13188
|
+
|
|
13189
|
+
##### `periodSeconds`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.periodSeconds"></a>
|
|
13190
|
+
|
|
13191
|
+
```java
|
|
13192
|
+
public Duration getPeriodSeconds();
|
|
13193
|
+
```
|
|
13194
|
+
|
|
13195
|
+
- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration)
|
|
13196
|
+
- *Default:* Duration.seconds(10) Minimum value is 1.
|
|
13197
|
+
|
|
13198
|
+
How often (in seconds) to perform the probe.
|
|
13199
|
+
|
|
13200
|
+
Default to 10 seconds. Minimum value is 1.
|
|
13201
|
+
|
|
13202
|
+
---
|
|
13203
|
+
|
|
13204
|
+
##### `successThreshold`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.successThreshold"></a>
|
|
13205
|
+
|
|
13206
|
+
```java
|
|
13207
|
+
public java.lang.Number getSuccessThreshold();
|
|
13208
|
+
```
|
|
13209
|
+
|
|
13210
|
+
- *Type:* `java.lang.Number`
|
|
13211
|
+
- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1.
|
|
13212
|
+
|
|
13213
|
+
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1.
|
|
13214
|
+
|
|
13215
|
+
Must be 1 for liveness and startup. Minimum value is 1.
|
|
13216
|
+
|
|
13217
|
+
---
|
|
13218
|
+
|
|
13219
|
+
##### `timeoutSeconds`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.timeoutSeconds"></a>
|
|
13220
|
+
|
|
13221
|
+
```java
|
|
13222
|
+
public Duration getTimeoutSeconds();
|
|
13223
|
+
```
|
|
13224
|
+
|
|
13225
|
+
- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration)
|
|
13226
|
+
- *Default:* Duration.seconds(1)
|
|
13227
|
+
|
|
13228
|
+
Number of seconds after which the probe times out.
|
|
13229
|
+
|
|
13230
|
+
Defaults to 1 second. Minimum value is 1.
|
|
13231
|
+
|
|
13232
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
13233
|
+
|
|
13234
|
+
---
|
|
13235
|
+
|
|
13236
|
+
##### `port`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.port"></a>
|
|
13237
|
+
|
|
13238
|
+
```java
|
|
13239
|
+
public java.lang.Number getPort();
|
|
13240
|
+
```
|
|
13241
|
+
|
|
13242
|
+
- *Type:* `java.lang.Number`
|
|
13243
|
+
- *Default:* defaults to `container.port`.
|
|
13244
|
+
|
|
13245
|
+
The TCP port to connect to on the container.
|
|
13246
|
+
|
|
13247
|
+
---
|
|
13248
|
+
|
|
13249
|
+
##### `service`<sup>Optional</sup> <a name="org.cdk8s.plus32.GrpcProbeOptions.property.service"></a>
|
|
13250
|
+
|
|
13251
|
+
```java
|
|
13252
|
+
public java.lang.String getService();
|
|
13253
|
+
```
|
|
13254
|
+
|
|
13255
|
+
- *Type:* `java.lang.String`
|
|
13256
|
+
- *Default:* If this is not specified, the default behavior is defined by gRPC.
|
|
13257
|
+
|
|
13258
|
+
Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
|
13259
|
+
|
|
13260
|
+
---
|
|
13261
|
+
|
|
13139
13262
|
### HandlerFromHttpGetOptions <a name="org.cdk8s.plus32.HandlerFromHttpGetOptions"></a>
|
|
13140
13263
|
|
|
13141
13264
|
Options for `Handler.fromHttpGet`.
|
|
@@ -21818,6 +21941,23 @@ Options.
|
|
|
21818
21941
|
|
|
21819
21942
|
---
|
|
21820
21943
|
|
|
21944
|
+
##### `fromGrpc` <a name="org.cdk8s.plus32.Probe.fromGrpc"></a>
|
|
21945
|
+
|
|
21946
|
+
```java
|
|
21947
|
+
import org.cdk8s.plus32.Probe;
|
|
21948
|
+
|
|
21949
|
+
Probe.fromGrpc()
|
|
21950
|
+
Probe.fromGrpc(GrpcProbeOptions options)
|
|
21951
|
+
```
|
|
21952
|
+
|
|
21953
|
+
###### `options`<sup>Optional</sup> <a name="org.cdk8s.plus32.Probe.parameter.options"></a>
|
|
21954
|
+
|
|
21955
|
+
- *Type:* [`org.cdk8s.plus32.GrpcProbeOptions`](#org.cdk8s.plus32.GrpcProbeOptions)
|
|
21956
|
+
|
|
21957
|
+
Options.
|
|
21958
|
+
|
|
21959
|
+
---
|
|
21960
|
+
|
|
21821
21961
|
##### `fromHttpGet` <a name="org.cdk8s.plus32.Probe.fromHttpGet"></a>
|
|
21822
21962
|
|
|
21823
21963
|
```java
|
package/docs/python.md
CHANGED
|
@@ -14488,6 +14488,129 @@ Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
|
|
|
14488
14488
|
|
|
14489
14489
|
---
|
|
14490
14490
|
|
|
14491
|
+
### GrpcProbeOptions <a name="cdk8s_plus_32.GrpcProbeOptions"></a>
|
|
14492
|
+
|
|
14493
|
+
Options for `Probe.fromGrpc()`.
|
|
14494
|
+
|
|
14495
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
14496
|
+
|
|
14497
|
+
```python
|
|
14498
|
+
import cdk8s_plus_32
|
|
14499
|
+
|
|
14500
|
+
cdk8s_plus_32.GrpcProbeOptions(
|
|
14501
|
+
failure_threshold: typing.Union[int, float] = None,
|
|
14502
|
+
initial_delay_seconds: Duration = None,
|
|
14503
|
+
period_seconds: Duration = None,
|
|
14504
|
+
success_threshold: typing.Union[int, float] = None,
|
|
14505
|
+
timeout_seconds: Duration = None,
|
|
14506
|
+
port: typing.Union[int, float] = None,
|
|
14507
|
+
service: str = None
|
|
14508
|
+
)
|
|
14509
|
+
```
|
|
14510
|
+
|
|
14511
|
+
##### `failure_threshold`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.failure_threshold"></a>
|
|
14512
|
+
|
|
14513
|
+
```python
|
|
14514
|
+
failure_threshold: typing.Union[int, float]
|
|
14515
|
+
```
|
|
14516
|
+
|
|
14517
|
+
- *Type:* `typing.Union[int, float]`
|
|
14518
|
+
- *Default:* 3
|
|
14519
|
+
|
|
14520
|
+
Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
|
14521
|
+
|
|
14522
|
+
Defaults to 3. Minimum value is 1.
|
|
14523
|
+
|
|
14524
|
+
---
|
|
14525
|
+
|
|
14526
|
+
##### `initial_delay_seconds`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.initial_delay_seconds"></a>
|
|
14527
|
+
|
|
14528
|
+
```python
|
|
14529
|
+
initial_delay_seconds: Duration
|
|
14530
|
+
```
|
|
14531
|
+
|
|
14532
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
14533
|
+
- *Default:* immediate
|
|
14534
|
+
|
|
14535
|
+
Number of seconds after the container has started before liveness probes are initiated.
|
|
14536
|
+
|
|
14537
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
14538
|
+
|
|
14539
|
+
---
|
|
14540
|
+
|
|
14541
|
+
##### `period_seconds`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.period_seconds"></a>
|
|
14542
|
+
|
|
14543
|
+
```python
|
|
14544
|
+
period_seconds: Duration
|
|
14545
|
+
```
|
|
14546
|
+
|
|
14547
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
14548
|
+
- *Default:* Duration.seconds(10) Minimum value is 1.
|
|
14549
|
+
|
|
14550
|
+
How often (in seconds) to perform the probe.
|
|
14551
|
+
|
|
14552
|
+
Default to 10 seconds. Minimum value is 1.
|
|
14553
|
+
|
|
14554
|
+
---
|
|
14555
|
+
|
|
14556
|
+
##### `success_threshold`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.success_threshold"></a>
|
|
14557
|
+
|
|
14558
|
+
```python
|
|
14559
|
+
success_threshold: typing.Union[int, float]
|
|
14560
|
+
```
|
|
14561
|
+
|
|
14562
|
+
- *Type:* `typing.Union[int, float]`
|
|
14563
|
+
- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1.
|
|
14564
|
+
|
|
14565
|
+
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1.
|
|
14566
|
+
|
|
14567
|
+
Must be 1 for liveness and startup. Minimum value is 1.
|
|
14568
|
+
|
|
14569
|
+
---
|
|
14570
|
+
|
|
14571
|
+
##### `timeout_seconds`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.timeout_seconds"></a>
|
|
14572
|
+
|
|
14573
|
+
```python
|
|
14574
|
+
timeout_seconds: Duration
|
|
14575
|
+
```
|
|
14576
|
+
|
|
14577
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
14578
|
+
- *Default:* Duration.seconds(1)
|
|
14579
|
+
|
|
14580
|
+
Number of seconds after which the probe times out.
|
|
14581
|
+
|
|
14582
|
+
Defaults to 1 second. Minimum value is 1.
|
|
14583
|
+
|
|
14584
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
14585
|
+
|
|
14586
|
+
---
|
|
14587
|
+
|
|
14588
|
+
##### `port`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.port"></a>
|
|
14589
|
+
|
|
14590
|
+
```python
|
|
14591
|
+
port: typing.Union[int, float]
|
|
14592
|
+
```
|
|
14593
|
+
|
|
14594
|
+
- *Type:* `typing.Union[int, float]`
|
|
14595
|
+
- *Default:* defaults to `container.port`.
|
|
14596
|
+
|
|
14597
|
+
The TCP port to connect to on the container.
|
|
14598
|
+
|
|
14599
|
+
---
|
|
14600
|
+
|
|
14601
|
+
##### `service`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.property.service"></a>
|
|
14602
|
+
|
|
14603
|
+
```python
|
|
14604
|
+
service: str
|
|
14605
|
+
```
|
|
14606
|
+
|
|
14607
|
+
- *Type:* `str`
|
|
14608
|
+
- *Default:* If this is not specified, the default behavior is defined by gRPC.
|
|
14609
|
+
|
|
14610
|
+
Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
|
14611
|
+
|
|
14612
|
+
---
|
|
14613
|
+
|
|
14491
14614
|
### HandlerFromHttpGetOptions <a name="cdk8s_plus_32.HandlerFromHttpGetOptions"></a>
|
|
14492
14615
|
|
|
14493
14616
|
Options for `Handler.fromHttpGet`.
|
|
@@ -23840,6 +23963,97 @@ Defaults to 1 second. Minimum value is 1.
|
|
|
23840
23963
|
|
|
23841
23964
|
---
|
|
23842
23965
|
|
|
23966
|
+
##### `from_grpc` <a name="cdk8s_plus_32.Probe.from_grpc"></a>
|
|
23967
|
+
|
|
23968
|
+
```python
|
|
23969
|
+
import cdk8s_plus_32
|
|
23970
|
+
|
|
23971
|
+
cdk8s_plus_32.Probe.from_grpc(
|
|
23972
|
+
failure_threshold: typing.Union[int, float] = None,
|
|
23973
|
+
initial_delay_seconds: Duration = None,
|
|
23974
|
+
period_seconds: Duration = None,
|
|
23975
|
+
success_threshold: typing.Union[int, float] = None,
|
|
23976
|
+
timeout_seconds: Duration = None,
|
|
23977
|
+
port: typing.Union[int, float] = None,
|
|
23978
|
+
service: str = None
|
|
23979
|
+
)
|
|
23980
|
+
```
|
|
23981
|
+
|
|
23982
|
+
###### `failure_threshold`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.failure_threshold"></a>
|
|
23983
|
+
|
|
23984
|
+
- *Type:* `typing.Union[int, float]`
|
|
23985
|
+
- *Default:* 3
|
|
23986
|
+
|
|
23987
|
+
Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
|
23988
|
+
|
|
23989
|
+
Defaults to 3. Minimum value is 1.
|
|
23990
|
+
|
|
23991
|
+
---
|
|
23992
|
+
|
|
23993
|
+
###### `initial_delay_seconds`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.initial_delay_seconds"></a>
|
|
23994
|
+
|
|
23995
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
23996
|
+
- *Default:* immediate
|
|
23997
|
+
|
|
23998
|
+
Number of seconds after the container has started before liveness probes are initiated.
|
|
23999
|
+
|
|
24000
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
24001
|
+
|
|
24002
|
+
---
|
|
24003
|
+
|
|
24004
|
+
###### `period_seconds`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.period_seconds"></a>
|
|
24005
|
+
|
|
24006
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
24007
|
+
- *Default:* Duration.seconds(10) Minimum value is 1.
|
|
24008
|
+
|
|
24009
|
+
How often (in seconds) to perform the probe.
|
|
24010
|
+
|
|
24011
|
+
Default to 10 seconds. Minimum value is 1.
|
|
24012
|
+
|
|
24013
|
+
---
|
|
24014
|
+
|
|
24015
|
+
###### `success_threshold`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.success_threshold"></a>
|
|
24016
|
+
|
|
24017
|
+
- *Type:* `typing.Union[int, float]`
|
|
24018
|
+
- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1.
|
|
24019
|
+
|
|
24020
|
+
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1.
|
|
24021
|
+
|
|
24022
|
+
Must be 1 for liveness and startup. Minimum value is 1.
|
|
24023
|
+
|
|
24024
|
+
---
|
|
24025
|
+
|
|
24026
|
+
###### `timeout_seconds`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.timeout_seconds"></a>
|
|
24027
|
+
|
|
24028
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
24029
|
+
- *Default:* Duration.seconds(1)
|
|
24030
|
+
|
|
24031
|
+
Number of seconds after which the probe times out.
|
|
24032
|
+
|
|
24033
|
+
Defaults to 1 second. Minimum value is 1.
|
|
24034
|
+
|
|
24035
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
24036
|
+
|
|
24037
|
+
---
|
|
24038
|
+
|
|
24039
|
+
###### `port`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.port"></a>
|
|
24040
|
+
|
|
24041
|
+
- *Type:* `typing.Union[int, float]`
|
|
24042
|
+
- *Default:* defaults to `container.port`.
|
|
24043
|
+
|
|
24044
|
+
The TCP port to connect to on the container.
|
|
24045
|
+
|
|
24046
|
+
---
|
|
24047
|
+
|
|
24048
|
+
###### `service`<sup>Optional</sup> <a name="cdk8s_plus_32.GrpcProbeOptions.parameter.service"></a>
|
|
24049
|
+
|
|
24050
|
+
- *Type:* `str`
|
|
24051
|
+
- *Default:* If this is not specified, the default behavior is defined by gRPC.
|
|
24052
|
+
|
|
24053
|
+
Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
|
24054
|
+
|
|
24055
|
+
---
|
|
24056
|
+
|
|
23843
24057
|
##### `from_http_get` <a name="cdk8s_plus_32.Probe.from_http_get"></a>
|
|
23844
24058
|
|
|
23845
24059
|
```python
|
package/docs/typescript.md
CHANGED
|
@@ -9490,6 +9490,121 @@ Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
|
|
|
9490
9490
|
|
|
9491
9491
|
---
|
|
9492
9492
|
|
|
9493
|
+
### GrpcProbeOptions <a name="cdk8s-plus-32.GrpcProbeOptions"></a>
|
|
9494
|
+
|
|
9495
|
+
Options for `Probe.fromGrpc()`.
|
|
9496
|
+
|
|
9497
|
+
#### Initializer <a name="[object Object].Initializer"></a>
|
|
9498
|
+
|
|
9499
|
+
```typescript
|
|
9500
|
+
import { GrpcProbeOptions } from 'cdk8s-plus-32'
|
|
9501
|
+
|
|
9502
|
+
const grpcProbeOptions: GrpcProbeOptions = { ... }
|
|
9503
|
+
```
|
|
9504
|
+
|
|
9505
|
+
##### `failureThreshold`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.failureThreshold"></a>
|
|
9506
|
+
|
|
9507
|
+
```typescript
|
|
9508
|
+
public readonly failureThreshold: number;
|
|
9509
|
+
```
|
|
9510
|
+
|
|
9511
|
+
- *Type:* `number`
|
|
9512
|
+
- *Default:* 3
|
|
9513
|
+
|
|
9514
|
+
Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
|
9515
|
+
|
|
9516
|
+
Defaults to 3. Minimum value is 1.
|
|
9517
|
+
|
|
9518
|
+
---
|
|
9519
|
+
|
|
9520
|
+
##### `initialDelaySeconds`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.initialDelaySeconds"></a>
|
|
9521
|
+
|
|
9522
|
+
```typescript
|
|
9523
|
+
public readonly initialDelaySeconds: Duration;
|
|
9524
|
+
```
|
|
9525
|
+
|
|
9526
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
9527
|
+
- *Default:* immediate
|
|
9528
|
+
|
|
9529
|
+
Number of seconds after the container has started before liveness probes are initiated.
|
|
9530
|
+
|
|
9531
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
9532
|
+
|
|
9533
|
+
---
|
|
9534
|
+
|
|
9535
|
+
##### `periodSeconds`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.periodSeconds"></a>
|
|
9536
|
+
|
|
9537
|
+
```typescript
|
|
9538
|
+
public readonly periodSeconds: Duration;
|
|
9539
|
+
```
|
|
9540
|
+
|
|
9541
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
9542
|
+
- *Default:* Duration.seconds(10) Minimum value is 1.
|
|
9543
|
+
|
|
9544
|
+
How often (in seconds) to perform the probe.
|
|
9545
|
+
|
|
9546
|
+
Default to 10 seconds. Minimum value is 1.
|
|
9547
|
+
|
|
9548
|
+
---
|
|
9549
|
+
|
|
9550
|
+
##### `successThreshold`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.successThreshold"></a>
|
|
9551
|
+
|
|
9552
|
+
```typescript
|
|
9553
|
+
public readonly successThreshold: number;
|
|
9554
|
+
```
|
|
9555
|
+
|
|
9556
|
+
- *Type:* `number`
|
|
9557
|
+
- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1.
|
|
9558
|
+
|
|
9559
|
+
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1.
|
|
9560
|
+
|
|
9561
|
+
Must be 1 for liveness and startup. Minimum value is 1.
|
|
9562
|
+
|
|
9563
|
+
---
|
|
9564
|
+
|
|
9565
|
+
##### `timeoutSeconds`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.timeoutSeconds"></a>
|
|
9566
|
+
|
|
9567
|
+
```typescript
|
|
9568
|
+
public readonly timeoutSeconds: Duration;
|
|
9569
|
+
```
|
|
9570
|
+
|
|
9571
|
+
- *Type:* [`cdk8s.Duration`](#cdk8s.Duration)
|
|
9572
|
+
- *Default:* Duration.seconds(1)
|
|
9573
|
+
|
|
9574
|
+
Number of seconds after which the probe times out.
|
|
9575
|
+
|
|
9576
|
+
Defaults to 1 second. Minimum value is 1.
|
|
9577
|
+
|
|
9578
|
+
> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
|
9579
|
+
|
|
9580
|
+
---
|
|
9581
|
+
|
|
9582
|
+
##### `port`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.port"></a>
|
|
9583
|
+
|
|
9584
|
+
```typescript
|
|
9585
|
+
public readonly port: number;
|
|
9586
|
+
```
|
|
9587
|
+
|
|
9588
|
+
- *Type:* `number`
|
|
9589
|
+
- *Default:* defaults to `container.port`.
|
|
9590
|
+
|
|
9591
|
+
The TCP port to connect to on the container.
|
|
9592
|
+
|
|
9593
|
+
---
|
|
9594
|
+
|
|
9595
|
+
##### `service`<sup>Optional</sup> <a name="cdk8s-plus-32.GrpcProbeOptions.property.service"></a>
|
|
9596
|
+
|
|
9597
|
+
```typescript
|
|
9598
|
+
public readonly service: string;
|
|
9599
|
+
```
|
|
9600
|
+
|
|
9601
|
+
- *Type:* `string`
|
|
9602
|
+
- *Default:* If this is not specified, the default behavior is defined by gRPC.
|
|
9603
|
+
|
|
9604
|
+
Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
|
9605
|
+
|
|
9606
|
+
---
|
|
9607
|
+
|
|
9493
9608
|
### HandlerFromHttpGetOptions <a name="cdk8s-plus-32.HandlerFromHttpGetOptions"></a>
|
|
9494
9609
|
|
|
9495
9610
|
Options for `Handler.fromHttpGet`.
|
|
@@ -17312,6 +17427,22 @@ Options.
|
|
|
17312
17427
|
|
|
17313
17428
|
---
|
|
17314
17429
|
|
|
17430
|
+
##### `fromGrpc` <a name="cdk8s-plus-32.Probe.fromGrpc"></a>
|
|
17431
|
+
|
|
17432
|
+
```typescript
|
|
17433
|
+
import { Probe } from 'cdk8s-plus-32'
|
|
17434
|
+
|
|
17435
|
+
Probe.fromGrpc(options?: GrpcProbeOptions)
|
|
17436
|
+
```
|
|
17437
|
+
|
|
17438
|
+
###### `options`<sup>Optional</sup> <a name="cdk8s-plus-32.Probe.parameter.options"></a>
|
|
17439
|
+
|
|
17440
|
+
- *Type:* [`cdk8s-plus-32.GrpcProbeOptions`](#cdk8s-plus-32.GrpcProbeOptions)
|
|
17441
|
+
|
|
17442
|
+
Options.
|
|
17443
|
+
|
|
17444
|
+
---
|
|
17445
|
+
|
|
17315
17446
|
##### `fromHttpGet` <a name="cdk8s-plus-32.Probe.fromHttpGet"></a>
|
|
17316
17447
|
|
|
17317
17448
|
```typescript
|
package/lib/_action.d.ts
CHANGED
package/lib/_action.js
CHANGED
|
@@ -27,6 +27,12 @@ class Action {
|
|
|
27
27
|
host: options.host,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
static fromGrpc(container, options = {}) {
|
|
31
|
+
return {
|
|
32
|
+
port: options.port ?? container.portNumber ?? 80,
|
|
33
|
+
service: options.service,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
exports.Action = Action;
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiX2FjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9fYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBL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