diff --git a/CHANGELOG.md b/CHANGELOG.md index 79b7a28..bf8c6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed * Log messages have been cleaned up. +* The name separator in container names changed from `-` to `---` to allow dashes in domains. ### Fixed diff --git a/src/container_orchestrator.rs b/src/container_orchestrator.rs index e742cdf..0afd061 100644 --- a/src/container_orchestrator.rs +++ b/src/container_orchestrator.rs @@ -252,7 +252,12 @@ impl ContainerOrchestrator { if matches!(manifest_reference.reference(), Reference::Tag(tag) if tag == production_tag) { let location = manifest_reference.location(); - let name = format!("rockslide-{}-{}", location.repository(), location.image()); + + let name = format!( + "rockslide---{}---{}", + location.repository(), + location.image() + ); debug!(%name, "removing (potentially nonexistant) container"); @@ -453,11 +458,11 @@ impl<'de> Deserialize<'de> for EmptyGoStruct { impl ContainerJson { fn image_location(&self) -> Option { - const PREFIX: &str = "rockslide-"; + const PREFIX: &str = "rockslide---"; for name in &self.names { if let Some(subname) = name.strip_prefix(PREFIX) { - if let Some((left, right)) = subname.split_once('-') { + if let Some((left, right)) = subname.split_once("---") { return Some(ImageLocation::new(left.to_owned(), right.to_owned())); } }