diff --git a/fleet/deployment-process.md b/fleet/deployment-process.md index 2b125e63..767a7fac 100644 --- a/fleet/deployment-process.md +++ b/fleet/deployment-process.md @@ -42,7 +42,7 @@ harmony-fleet-deploy --filter FleetOperatorScore \ ``` It installs the published -`oci://hub.nationtech.io/harmony/harmony-fleet-operator:` chart; +`oci://hub.nationtech.io/harmony/harmony-fleet-operator-chart:` chart; the version is parsed from the tag in Rust (the tag is the only source of truth). Same command bootstraps and upgrades; re-running the same tag is a no-op. Auth is Zitadel-SSO-only: the operator gets its zitadel-jwt diff --git a/fleet/harmony-fleet-deploy/src/operator/chart.rs b/fleet/harmony-fleet-deploy/src/operator/chart.rs index c022cef2..1befead0 100644 --- a/fleet/harmony-fleet-deploy/src/operator/chart.rs +++ b/fleet/harmony-fleet-deploy/src/operator/chart.rs @@ -66,7 +66,7 @@ pub struct ChartOptions { /// to the deploy crate's `CARGO_PKG_VERSION` — fine for in-process /// uses (e2e harness, runtime operator Score). The release binary /// sets this to the released tag so the OCI chart artifact lands - /// at `…/harmony-fleet-operator:` matching the image tag. + /// at `…/harmony-fleet-operator-chart:` matching the image tag. pub chart_version: Option, } @@ -136,6 +136,7 @@ impl Default for ChartOptions { } } +pub const CHART_NAME: &str = "harmony-fleet-operator-chart"; pub const RELEASE_NAME: &str = "harmony-fleet-operator"; pub const SERVICE_ACCOUNT: &str = "harmony-fleet-operator"; pub const CLUSTER_ROLE: &str = "harmony-fleet-operator"; @@ -161,7 +162,7 @@ pub fn build_chart(opts: &ChartOptions) -> Result { .chart_version .clone() .unwrap_or_else(|| env!("CARGO_PKG_VERSION").to_string()); - let mut chart = HelmChart::new(RELEASE_NAME.to_string(), chart_version.clone()); + let mut chart = HelmChart::new(CHART_NAME.to_string(), chart_version.clone()); chart.version = chart_version; chart.description = "IoT operator — Deployment CRD → NATS KV".to_string(); diff --git a/fleet/harmony-fleet-deploy/src/operator/score.rs b/fleet/harmony-fleet-deploy/src/operator/score.rs index cc60dd61..bef47eef 100644 --- a/fleet/harmony-fleet-deploy/src/operator/score.rs +++ b/fleet/harmony-fleet-deploy/src/operator/score.rs @@ -43,7 +43,7 @@ use crate::operator::chart::{ChartOptions, OperatorCredentials, build_chart, ope /// The already-published OCI chart to install (the CD `harmony apply` /// path). When set, the operator installs -/// `oci://{registry}/{project}/harmony-fleet-operator:{version}` and the +/// `oci://{registry}/{project}/harmony-fleet-operator-chart:{version}` and the /// score's `image` is ignored (the image is baked into the chart). #[derive(Debug, Clone, Serialize)] pub struct PublishedChart { @@ -205,7 +205,7 @@ impl Interpret for FleetOperatorInterp // branch runs its own install so the local tempdir stays alive // across it. let helm_outcome = if let Some(p) = &self.score.published_chart { - let chart_ref = format!("oci://{}/{}/{}", p.registry, p.project, chart::RELEASE_NAME); + let chart_ref = format!("oci://{}/{}/{}", p.registry, p.project, chart::CHART_NAME); info!( "Installing helm release '{}' from published chart {chart_ref} version {}", self.score.release_name, p.version diff --git a/fleet/harmony-fleet-deploy/src/release.rs b/fleet/harmony-fleet-deploy/src/release.rs index a7fabcaa..5cf766dd 100644 --- a/fleet/harmony-fleet-deploy/src/release.rs +++ b/fleet/harmony-fleet-deploy/src/release.rs @@ -11,7 +11,7 @@ use std::process::Command; use anyhow::{Context, Result, bail}; -use crate::operator::chart::{ChartOptions, build_chart}; +use crate::operator::chart::{CHART_NAME, ChartOptions, build_chart}; const TAG_PREFIX: &str = "harmony-fleet-operator-"; const IMAGE_NAME: &str = "harmony-fleet-operator"; @@ -59,7 +59,7 @@ pub fn release_operator(version: &str, registry: &str, project: &str, push: bool run("helm", &["push", path_str(&tgz)?, &oci_repo])?; } - log::info!("released image={image} chart={oci_repo}/{IMAGE_NAME}:{version} pushed={push}"); + log::info!("released image={image} chart={oci_repo}/{CHART_NAME}:{version} pushed={push}"); Ok(()) }