pub struct ServiceDef {Show 26 fields
pub rootfs: String,
pub command: Vec<String>,
pub memory: String,
pub cpus: f64,
pub pids: u64,
pub networks: Vec<String>,
pub volumes: Vec<String>,
pub depends_on: Vec<DependsOn>,
pub health_check: Option<String>,
pub health_interval: u64,
pub egress_allow: Vec<String>,
pub egress_domains: Vec<String>,
pub egress_tcp_ports: Vec<u16>,
pub egress_udp_ports: Vec<u16>,
pub credential_broker: Option<String>,
pub credential_broker_no_proxy_env: bool,
pub port_forwards: Vec<String>,
pub environment: BTreeMap<String, String>,
pub user: Option<String>,
pub group: Option<String>,
pub additional_groups: Vec<String>,
pub secrets: Vec<String>,
pub dns: Vec<String>,
pub nat_backend: NatBackend,
pub replicas: u32,
pub runtime: String,
}Expand description
Service (container) definition within a topology.
Fields§
§rootfs: StringNix store path to rootfs derivation
command: Vec<String>Command to run
memory: StringMemory limit (e.g. “512M”, “2G”)
cpus: f64CPU core limit
pids: u64PID limit
networks: Vec<String>Networks this service connects to
volumes: Vec<String>Volume mounts (format: “volume-name:/mount/path”)
depends_on: Vec<DependsOn>Services this depends on, with optional health condition
health_check: Option<String>Health check command
health_interval: u64Health check interval in seconds
egress_allow: Vec<String>Allowed egress CIDRs
egress_domains: Vec<String>Allowed exact egress domains
egress_tcp_ports: Vec<u16>Allowed egress TCP ports
egress_udp_ports: Vec<u16>Allowed egress UDP ports
credential_broker: Option<String>Host-side credential broker endpoint in IPv4:PORT form.
credential_broker_no_proxy_env: boolDisable automatic HTTP_PROXY/HTTPS_PROXY injection for credential broker mode.
port_forwards: Vec<String>Port forwards (format: “HOST:CONTAINER” or “HOST_IP:HOST:CONTAINER”)
environment: BTreeMap<String, String>Environment variables
user: Option<String>Workload user name or numeric uid.
group: Option<String>Workload group name or numeric gid.
additional_groups: Vec<String>Supplementary workload groups (names or numeric gids).
secrets: Vec<String>Secret mounts (format: “source:dest”)
dns: Vec<String>DNS servers
nat_backend: NatBackendNative bridge NAT backend.
replicas: u32Number of replicas for scaling
runtime: StringContainer runtime
Trait Implementations§
Source§impl Clone for ServiceDef
impl Clone for ServiceDef
Source§fn clone(&self) -> ServiceDef
fn clone(&self) -> ServiceDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more