pub struct Eviction {
pub metadata: ObjectMeta,
pub spec: EvictionSpec,
pub status: Option<EvictionStatus>,
}Expand description
Eviction initiates an eviction process, which should ideally result in a graceful eviction of a .spec.target (e.g. termination of a pod).
The evictionrequest-controller observes intents of all EvictionRequests and transforms them into Evictions. It manages the Eviction lifecycle. Requesters are preserved in .status.requesters even after they have withdrawn their request. If all requesters withdraw their eviction intent for a common target, the eviction will be canceled. Once all EvictionRequest corresponding to this Eviction .spec.target have been removed, this Eviction object will eventually be garbage collected.
If the target is a pod, the .status.targetResponders is populated from Pod’s .spec.evictionResponders.
Responders should observe and communicate through the .status to help with the eviction of the target when they see their state == Active in .status.targetResponders. ResponderStatus struct should then be periodically updated to indicate the progress or completion of the eviction process by each responder in .status.responders. If .status.responders[].heartbeatTime is not updated within the heartbeat deadline defined by the Eviction API (currently 20 minutes), the eviction is passed over to the next responder with a lower priority.
If there are no other responders and the target is a pod, the last default imperative-eviction.k8s.io/evictor responder with a priority of 100 will evict the pod using the imperative Eviction API (pods/<name>/eviction subresource).
Fields§
§metadata: ObjectMetametadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. .metadata.name set by the evictionrequest-controller is purely informative and subject to change. .spec.target field should be used to identify the target precisesly.
The requester and responder names will be used as label keys and added to the labels of the eviction in one of the following formats: 1. acme.io/foo: “requester” 2. acme.io/foo: “responder” 3. acme.io/foo: “requester-responder”
Please see EvictionParticipantRole for available role label values.
spec: EvictionSpecspec defines the eviction specification. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status: Option<EvictionStatus>status represents the most recently observed status of the eviction. Populated by responders and evictionrequest-controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Trait Implementations§
Source§impl DeepMerge for Eviction
impl DeepMerge for Eviction
Source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
other into self.Source§impl<'de> Deserialize<'de> for Eviction
impl<'de> Deserialize<'de> for Eviction
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 ListableResource for Eviction
impl ListableResource for Eviction
Source§impl Resource for Eviction
impl Resource for Eviction
Source§const API_VERSION: &'static str = "lifecycle.k8s.io/v1alpha1"
const API_VERSION: &'static str = "lifecycle.k8s.io/v1alpha1"
Resource::GROUP and Resource::VERSION (eg "apiextensions.k8s.io/v1beta1")
or just the version for resources without a group (eg "v1"). Read more