pub struct ComputeCluster {
pub id: String,
pub capacity_groups: Vec<CapacityGroup>,
pub container_cidr: Option<String>,
}Expand description
ComputeCluster resource for running long-running container workloads.
A ComputeCluster provides the setup-owned machine boundary for containers.
Alien may manage the worker fleet inside that boundary when setup grants
compute-cluster/management.
§Architecture
- Setup creates cloud resources: ASGs/MIGs/VMSSs, IAM roles, security groups
- Alien manages allowed fleet operations: machine count and runtime machine image rollout
- A node agent runs on each machine from the selected runtime image channel
§Example
use alien_core::{CapacityGroup, ComputeCluster, MachineProfile};
let cluster = ComputeCluster::new("compute".to_string())
.capacity_group(CapacityGroup {
group_id: "general".to_string(),
instance_type: None,
profile: Some(MachineProfile {
cpu: "4.0".to_string(),
memory_bytes: 16 * 1024 * 1024 * 1024,
ephemeral_storage_bytes: 20 * 1024 * 1024 * 1024,
architecture: None,
gpu: None,
}),
min_size: 1,
max_size: 5,
scale_policy: None,
nested_virtualization: None,
})
.build();Fields§
§id: StringUnique identifier for the container cluster. Must contain only alphanumeric characters, hyphens, and underscores.
capacity_groups: Vec<CapacityGroup>Capacity groups defining the machine pools for this cluster. Each group becomes a separate ASG/MIG/VMSS.
container_cidr: Option<String>Container CIDR block for internal container networking. Auto-generated as “10.244.0.0/16” if not specified. Each machine gets a /24 subnet from this range.
Implementations§
Source§impl ComputeCluster
impl ComputeCluster
Sourcepub fn new(id: String) -> ComputeClusterBuilder
pub fn new(id: String) -> ComputeClusterBuilder
Create an instance of ComputeCluster using the builder syntax
Source§impl ComputeCluster
impl ComputeCluster
Sourcepub const RESOURCE_TYPE: ResourceType
pub const RESOURCE_TYPE: ResourceType
The resource type identifier for ComputeCluster
Sourcepub fn container_cidr(&self) -> &str
pub fn container_cidr(&self) -> &str
Returns the container CIDR, defaulting to “10.244.0.0/16” if not specified.
Trait Implementations§
Source§impl Clone for ComputeCluster
impl Clone for ComputeCluster
Source§fn clone(&self) -> ComputeCluster
fn clone(&self) -> ComputeCluster
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 ComputeCluster
impl Debug for ComputeCluster
Source§impl<'de> Deserialize<'de> for ComputeCluster
impl<'de> Deserialize<'de> for ComputeCluster
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 ComputeCluster
impl PartialEq for ComputeCluster
Source§fn eq(&self, other: &ComputeCluster) -> bool
fn eq(&self, other: &ComputeCluster) -> bool
self and other values to be equal, and is used by ==.