fix: fleet operator chart name was conflicting with the container name. Append -chart to the chart name #317
@@ -42,7 +42,7 @@ harmony-fleet-deploy --filter FleetOperatorScore \
|
||||
```
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
@@ -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:<tag>` matching the image tag.
|
||||
/// at `…/harmony-fleet-operator-chart:<tag>` matching the image tag.
|
||||
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 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<PathBuf> {
|
||||
.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();
|
||||
|
||||
|
||||
@@ -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<T: Topology + HelmCommand + K8sclient> Interpret<T> 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
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user