pub struct ReplicaGroup {
pub role: String,
pub count: u32,
pub image: Option<ImageSpec>,
pub env: HashMap<String, String>,
pub command: Option<CommandSpec>,
pub resources: Option<ResourcesSpec>,
pub affinity: GroupAffinity,
}Expand description
One named replica group within a service.
When ServiceSpec.replica_groups is set, the service is composed of one
or more groups, each with its own count, optional overrides, and
affinity hint. Containers in each group get DNS names of the form
<role>.<service>.<deployment>.zlayer.internal and proxy backends
can target a single role via EndpointSpec.target_role.
Backward compat: services without replica_groups are treated as a
single implicit group {role: "default", count: <scale.replicas>}.
Fields§
§role: StringGroup identifier. Becomes part of container IDs and DNS names. Must be a valid DNS label: lowercase letters, digits, and hyphens; must not start or end with a hyphen; ≤ 30 chars.
count: u32Number of replicas in this group.
image: Option<ImageSpec>Image override (inherits ServiceSpec.image when None).
env: HashMap<String, String>Environment variables MERGED on top of ServiceSpec.env. Entries
in this map win on conflict (group overrides service default).
command: Option<CommandSpec>Command override (inherits ServiceSpec.command when None).
resources: Option<ResourcesSpec>Resources override (inherits ServiceSpec.resources when None).
affinity: GroupAffinityAffinity hint for placement of this group’s replicas.
Trait Implementations§
Source§impl Clone for ReplicaGroup
impl Clone for ReplicaGroup
Source§fn clone(&self) -> ReplicaGroup
fn clone(&self) -> ReplicaGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReplicaGroup
impl Debug for ReplicaGroup
Source§impl<'de> Deserialize<'de> for ReplicaGroup
impl<'de> Deserialize<'de> for ReplicaGroup
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 ReplicaGroup
impl PartialEq for ReplicaGroup
Source§fn eq(&self, other: &ReplicaGroup) -> bool
fn eq(&self, other: &ReplicaGroup) -> bool
self and other values to be equal, and is used by ==.