mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-01 06:28:11 +00:00
Merge pull request #13213 from burgerdev/grpc-probes
genpolicy: add missing probe fields
This commit is contained in:
@@ -299,6 +299,9 @@ struct Probe {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
periodSeconds: Option<i32>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
terminationGracePeriodSeconds: Option<i32>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
failureThreshold: Option<i32>,
|
||||
|
||||
@@ -310,6 +313,9 @@ struct Probe {
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
tcpSocket: Option<TCPSocketAction>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
grpc: Option<GRPCAction>,
|
||||
// TODO: additional fields.
|
||||
}
|
||||
|
||||
@@ -322,6 +328,15 @@ struct TCPSocketAction {
|
||||
host: Option<String>,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
struct GRPCAction {
|
||||
port: u16,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
service: Option<String>,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
struct HTTPGetAction {
|
||||
|
||||
@@ -7,6 +7,24 @@ spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: registry.k8s.io/pause:3.6@sha256:3d380ca8864549e74af4b29c10f9cb0956236dfb01c40ca076fb6c37253234db
|
||||
readinessProbe:
|
||||
grpc:
|
||||
port: 2379
|
||||
service: BarService
|
||||
initialDelaySeconds: 10
|
||||
successThreshold: 3
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
host: foo.bar
|
||||
port: 8080
|
||||
periodSeconds: 10
|
||||
failureThreshold: 2
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: liveness-port
|
||||
terminationGracePeriodSeconds: 60
|
||||
timeoutSeconds: 10
|
||||
priority: 1
|
||||
schedulerName: test-scheduler-name
|
||||
affinity:
|
||||
|
||||
Reference in New Issue
Block a user