fix: fleet operator chart name was conflicting with the container name. Append -chart to the chart name #317

Merged
johnride merged 1 commits from fix/fleet-operator-chart-name into chore/rename-release-to-publish 2026-06-01 15:42:57 +00:00
4 changed files with 8 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ harmony-fleet-deploy --filter FleetOperatorScore \
``` ```
It installs the published It installs the published
`oci://hub.nationtech.io/harmony/harmony-fleet-operator:<version>` chart; `oci://hub.nationtech.io/harmony/harmony-fleet-operator-chart:<version>` chart;
the version is parsed from the tag in Rust (the tag is the only source 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 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 is a no-op. Auth is Zitadel-SSO-only: the operator gets its zitadel-jwt

View File

@@ -66,7 +66,7 @@ pub struct ChartOptions {
/// to the deploy crate's `CARGO_PKG_VERSION` — fine for in-process /// to the deploy crate's `CARGO_PKG_VERSION` — fine for in-process
/// uses (e2e harness, runtime operator Score). The release binary /// uses (e2e harness, runtime operator Score). The release binary
/// sets this to the released tag so the OCI chart artifact lands /// sets this to the released tag so the OCI chart artifact lands
/// at `…/harmony-fleet-operator:<tag>` matching the image tag. /// at `…/harmony-fleet-operator-chart:<tag>` matching the image tag.
pub chart_version: Option<String>, pub chart_version: Option<String>,
} }
@@ -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 RELEASE_NAME: &str = "harmony-fleet-operator";
pub const SERVICE_ACCOUNT: &str = "harmony-fleet-operator"; pub const SERVICE_ACCOUNT: &str = "harmony-fleet-operator";
pub const CLUSTER_ROLE: &str = "harmony-fleet-operator"; pub const CLUSTER_ROLE: &str = "harmony-fleet-operator";
@@ -161,7 +162,7 @@ pub fn build_chart(opts: &ChartOptions) -> Result<PathBuf> {
.chart_version .chart_version
.clone() .clone()
.unwrap_or_else(|| env!("CARGO_PKG_VERSION").to_string()); .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.version = chart_version;
chart.description = "IoT operator — Deployment CRD → NATS KV".to_string(); chart.description = "IoT operator — Deployment CRD → NATS KV".to_string();

View File

@@ -43,7 +43,7 @@ use crate::operator::chart::{ChartOptions, OperatorCredentials, build_chart, ope
/// The already-published OCI chart to install (the CD `harmony apply` /// The already-published OCI chart to install (the CD `harmony apply`
/// path). When set, the operator installs /// 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). /// score's `image` is ignored (the image is baked into the chart).
#[derive(Debug, Clone, Serialize)] #[derive(Debug, Clone, Serialize)]
pub struct PublishedChart { pub struct PublishedChart {
@@ -205,7 +205,7 @@ impl<T: Topology + HelmCommand + K8sclient> Interpret<T> for FleetOperatorInterp
// branch runs its own install so the local tempdir stays alive // branch runs its own install so the local tempdir stays alive
// across it. // across it.
let helm_outcome = if let Some(p) = &self.score.published_chart { 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!( info!(
"Installing helm release '{}' from published chart {chart_ref} version {}", "Installing helm release '{}' from published chart {chart_ref} version {}",
self.score.release_name, p.version self.score.release_name, p.version

View File

@@ -11,7 +11,7 @@ use std::process::Command;
use anyhow::{Context, Result, bail}; 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 TAG_PREFIX: &str = "harmony-fleet-operator-";
const IMAGE_NAME: &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])?; 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(()) Ok(())
} }