LivenessProbeRequirements 类

定义 Web 服务部署的实时性探测时间要求。

若要指定自动缩放配置,通常使用deploy_configuration类的updateAksWebservice方法。

初始化实时探测时间要求。

构造函数

LivenessProbeRequirements(period_seconds, initial_delay_seconds, timeout_seconds, success_threshold, failure_threshold)

参数

名称 说明
period_seconds
必需
int

执行运行情况探测的频率(秒)。 默认值为 10 秒。 最小值为 1。

initial_delay_seconds
必需
int

启动生存情况探测之前容器启动后的秒数。

timeout_seconds
必需
int

运行情况探测超时的秒数。默认值为 1 秒。 最小值为 1。

failure_threshold
必需
int

当 Pod 启动且运行情况探测失败时,Kubernetes 会在放弃之前尝试 failureThreshold 时间。 默认值为 3。 最小值为 1。

success_threshold
必需
int

运行情况探测失败后,将其视为成功所需的最小连续成功次数。 默认值为 1。 最小值为 1。

period_seconds
必需
int

执行运行情况探测的频率(秒)。 默认值为 10 秒。 最小值为 1。

initial_delay_seconds
必需
int

启动生存情况探测之前容器启动后的秒数。

timeout_seconds
必需
int

运行情况探测超时的秒数。默认值为 1 秒。 最小值为 1。

failure_threshold
必需
int

当 Pod 启动且运行情况探测失败时,Kubernetes 会在放弃之前尝试 failureThreshold 时间。 默认值为 3。 最小值为 1。

success_threshold
必需
int

运行情况探测失败后,将其视为成功所需的最小连续成功次数。 默认值为 1。 最小值为 1。

变量

名称 说明
period_seconds
int

执行运行情况探测的频率(秒)。 默认值为 10 秒。 最小值为 1。

initial_delay_seconds
int

启动生存情况探测之前容器启动后的秒数。

timeout_seconds
int

运行情况探测超时的秒数。默认值为 1 秒。 最小值为 1。

failure_threshold
int

当 Pod 启动且运行情况探测失败时,Kubernetes 会在放弃之前尝试 failureThreshold 时间。 默认值为 3。 最小值为 1。

success_threshold
int

运行情况探测在失败后被视为成功的最小连续成功。 默认值为 1。 最小值为 1。

方法

deserialize

将 JSON 对象转换为 LivenessProbeRequirements 对象。

serialize

将此 LivenessProbeRequirements 对象转换为 JSON 序列化字典。

deserialize

将 JSON 对象转换为 LivenessProbeRequirements 对象。

static deserialize(payload_obj)

参数

名称 说明
payload_obj
必需

要转换为 LivenessProbeRequirements 对象的 JSON 对象。

返回

类型 说明

提供的 JSON 对象的 LivenessProbeRequirements 表示形式。

serialize

将此 LivenessProbeRequirements 对象转换为 JSON 序列化字典。

serialize()

返回

类型 说明

此 LivenessProbeRequirements 对象的 JSON 表示形式。