pub struct UpdateStrategy {
pub max_parallel: u32,
pub health_check: HealthCheck,
pub min_healthy_time: Duration,
pub healthy_deadline: Duration,
pub progress_deadline: Duration,
pub auto_revert: bool,
pub canary: u32,
pub auto_promote: bool,
pub stagger: Duration,
}Expand description
Specifies the task group update strategy. When omitted, rolling updates are disabled. The update stanza can be specified at the job or task group level. When specified at the job, the update stanza is inherited by all task groups. When specified in both the job and in a task group, the stanzas are merged with the task group’s taking precedence.
Fields§
§max_parallel: u32Specifies the number of tasks that can be updated at the same time. Defaults to 1.
health_check: HealthCheckSpecifies the mechanism in which allocations health is determined. See also HealthCheck
min_healthy_time: DurationSpecifies the minimum time the allocation must be in the healthy state before it is marked as healthy and unblocks further allocations from being updated. Defaults to 10 seconds.
healthy_deadline: DurationSpecifies the deadline in which the allocation must be marked as healthy after which the allocation is automatically transitioned to unhealthy. Defaults to 5 minutes.
progress_deadline: DurationSpecifies the deadline in which an allocation must be marked as healthy. The deadline begins when the first allocation for the deployment is created and is reset whenever an allocation as part of the deployment transitions to a healthy state. If no allocation transitions to the healthy state before the progress deadline, the deployment is marked as failed. If the progress_deadline is set to 0, the first allocation to be marked as unhealthy causes the deployment to fail. Defaults to 10 minutes.
auto_revert: boolSpecifies if the job should auto-revert to the last stable job on deployment failure. A job is marked as stable if all the allocations as part of its deployment were marked healthy. Defaults to false.
canary: u32Specifies that changes to the job that would result in destructive updates should create the specified number of canaries without stopping any previous allocations. Once the operator determines the canaries are healthy, they can be promoted which unblocks a rolling update of the remaining allocations at a rate of max_parallel. Defaults to 0.
auto_promote: boolspecifies if the job should automatically promote to the new deployment if all canaries become healthy. Defaults to false.
stagger: DurationSpecifies the delay between migrating allocations off nodes marked for draining. Defaults to 30 seconds.
Trait Implementations§
Source§impl Clone for UpdateStrategy
impl Clone for UpdateStrategy
Source§fn clone(&self) -> UpdateStrategy
fn clone(&self) -> UpdateStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateStrategy
impl Debug for UpdateStrategy
Source§impl Default for UpdateStrategy
impl Default for UpdateStrategy
Source§fn default() -> Self
fn default() -> Self
Return UpdateStrategy { max_parallel: 1, health_check: Default::default(), min_healthy_time: Duration :: from_secs(10), healthy_deadline: Duration :: from_secs(300), progress_deadline: Duration :: from_secs(600), auto_revert: Default::default(), canary: Default::default(), auto_promote: Default::default(), stagger: Duration :: from_secs(30) }
Source§impl<'de> Deserialize<'de> for UpdateStrategy
impl<'de> Deserialize<'de> for UpdateStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UpdateStrategy
impl PartialEq for UpdateStrategy
Source§impl Serialize for UpdateStrategy
impl Serialize for UpdateStrategy
impl Eq for UpdateStrategy
impl StructuralPartialEq for UpdateStrategy
Auto Trait Implementations§
impl Freeze for UpdateStrategy
impl RefUnwindSafe for UpdateStrategy
impl Send for UpdateStrategy
impl Sync for UpdateStrategy
impl Unpin for UpdateStrategy
impl UnwindSafe for UpdateStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.