pub struct StackDef {
pub name: String,
pub org: OrgId,
pub file: ComposeFile,
pub base_dir: PathBuf,
pub secrets: BTreeMap<String, SecretBinding>,
pub force: BTreeMap<String, u64>,
pub images: BTreeMap<String, String>,
pub deployed_at: u64,
pub deployed_by: String,
pub previous: Option<Box<StackDef>>,
}Expand description
A deployed stack, as the daemon stores it.
Fields§
§name: String§org: OrgIdThe org the stack runs in (its incus project).
file: ComposeFileThe resolved compose file.
base_dir: PathBufWhere relative bind paths resolve.
secrets: BTreeMap<String, SecretBinding>The secrets the services use, by top-level key: references into the
org’s store by name and version, never values (secrets).
force: BTreeMap<String, u64>Bumped per service by a forced update, to replace instances whose spec did not change (a moved image tag, say).
images: BTreeMap<String, String>The digest each registry: image resolved to at deploy time, by
service: a moved tag is a new revision, and a rollback runs exactly
what ran before.
deployed_at: u64Unix seconds.
deployed_by: StringWho deployed it (an Access identity, or local).
previous: Option<Box<StackDef>>The deployment this one replaced, for rollback.
Implementations§
Source§impl StackDef
impl StackDef
pub fn qualified(&self) -> String
Sourcepub fn revision(&self, service: &str) -> Result<String>
pub fn revision(&self, service: &str) -> Result<String>
The service’s revision: a hash of what shapes its instances. Replica count, rollout settings and dependencies are left out, so changing them never replaces an instance. A secret counts by its binding (store name, driver, version), so a new version is a new revision.
Sourcepub fn store_secrets(&self) -> BTreeSet<String>
pub fn store_secrets(&self) -> BTreeSet<String>
Names in the org’s store that the stack’s services use (external
ones, and the <stack>_<key> ones it owns): what isb secret rm
must not pull out from under it.
Sourcepub fn instance_image(&self, service: &str, image: &str) -> String
pub fn instance_image(&self, service: &str, image: &str) -> String
A service’s image as its instances get it: a registry: tag pinned
to the digest it named at deploy time (StackDef::images).