reconfigure ntffy + add more logs
All checks were successful
Run Check Script / check (pull_request) Successful in 1m9s

This commit is contained in:
Ian Letourneau 2025-08-12 12:06:53 -04:00
parent 102aa2bdf0
commit 39aaf7c374
5 changed files with 22 additions and 29 deletions

View File

@ -120,7 +120,7 @@ impl K8sClient {
.expect("Couldn't unwrap status"); .expect("Couldn't unwrap status");
if let Some(s) = status.status { if let Some(s) = status.status {
debug!("Status: {}", s); debug!("Status: {} - {:?}", s, status.details);
if s == "Success" { Ok(()) } else { Err(s) } if s == "Success" { Ok(()) } else { Err(s) }
} else { } else {
Err("Couldn't get inner status of pod exec".to_string()) Err("Couldn't get inner status of pod exec".to_string())

View File

@ -178,7 +178,7 @@ impl<
info!("Deploying {} to target {target:?}", self.application.name()); info!("Deploying {} to target {target:?}", self.application.name());
let score = ArgoHelmScore { let score = ArgoHelmScore {
namespace: "harmony-example-rust-webapp".to_string(), namespace: "harmony-example-rust-webapp".to_string(),
openshift: false, openshift: true,
domain: "argo.harmonydemo.apps.ncd0.harmony.mcd".to_string(), domain: "argo.harmonydemo.apps.ncd0.harmony.mcd".to_string(),
argo_apps: vec![ArgoApplication::from(CDApplicationConfig { argo_apps: vec![ArgoApplication::from(CDApplicationConfig {
// helm pull oci://hub.nationtech.io/harmony/harmony-example-rust-webapp-chart --version 0.1.0 // helm pull oci://hub.nationtech.io/harmony/harmony-example-rust-webapp-chart --version 0.1.0

View File

@ -55,11 +55,11 @@ impl<
}; };
let ntfy = NtfyScore { let ntfy = NtfyScore {
namespace: namespace.clone(), namespace: namespace.clone(),
host: "localhost".to_string(), host: "ntfy.harmonydemo.apps.ncd0.harmony.mcd".to_string(),
}; };
ntfy.interpret(&Inventory::empty(), topology) ntfy.interpret(&Inventory::empty(), topology)
.await .await
.expect("couldn't create interpret for ntfy"); .map_err(|e| e.to_string())?;
let ntfy_default_auth_username = "harmony"; let ntfy_default_auth_username = "harmony";
let ntfy_default_auth_password = "harmony"; let ntfy_default_auth_password = "harmony";
@ -96,7 +96,7 @@ impl<
alerting_score alerting_score
.interpret(&Inventory::empty(), topology) .interpret(&Inventory::empty(), topology)
.await .await
.unwrap(); .map_err(|e| e.to_string())?;
Ok(()) Ok(())
} }
fn name(&self) -> String { fn name(&self) -> String {

View File

@ -25,24 +25,14 @@ serviceAccount:
service: service:
type: ClusterIP type: ClusterIP
port: 80 port: 8080
targetPort: 8080
ingress: ingress:
enabled: true enabled: false
# annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: {host}
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
route:
enabled: true
host: {host}
autoscaling: autoscaling:
enabled: false enabled: false
@ -50,7 +40,7 @@ autoscaling:
config: config:
enabled: true enabled: true
data: data:
# base-url: "https://ntfy.something.com" base-url: "https://{host}"
auth-file: "/var/cache/ntfy/user.db" auth-file: "/var/cache/ntfy/user.db"
auth-default-access: "deny-all" auth-default-access: "deny-all"
cache-file: "/var/cache/ntfy/cache.db" cache-file: "/var/cache/ntfy/cache.db"
@ -71,16 +61,12 @@ persistence:
HelmChartScore { HelmChartScore {
namespace: Some(NonBlankString::from_str(&namespace).unwrap()), namespace: Some(NonBlankString::from_str(&namespace).unwrap()),
release_name: NonBlankString::from_str("ntfy").unwrap(), release_name: NonBlankString::from_str("ntfy").unwrap(),
chart_name: NonBlankString::from_str("sarab97/ntfy").unwrap(), chart_name: NonBlankString::from_str("oci://hub.nationtech.io/harmony/ntfy").unwrap(),
chart_version: Some(NonBlankString::from_str("0.1.7").unwrap()), chart_version: Some(NonBlankString::from_str("0.1.7-nationtech.1").unwrap()),
values_overrides: None, values_overrides: None,
values_yaml: Some(values.to_string()), values_yaml: Some(values.to_string()),
create_namespace: true, create_namespace: true,
install_only: false, install_only: false,
repository: Some(HelmRepository::new( repository: None,
"sarab97".to_string(),
url::Url::parse("https://charts.sarabsingh.com").unwrap(),
true,
)),
} }
} }

View File

@ -5,7 +5,12 @@ use harmony::{
}; };
use indicatif::MultiProgress; use indicatif::MultiProgress;
use indicatif_log_bridge::LogWrapper; use indicatif_log_bridge::LogWrapper;
use std::sync::{Arc, Mutex}; use log::error;
use std::{
sync::{Arc, Mutex},
thread,
time::Duration,
};
use crate::progress::{IndicatifProgressTracker, ProgressTracker}; use crate::progress::{IndicatifProgressTracker, ProgressTracker};
@ -59,6 +64,7 @@ async fn handle_events(base_progress: MultiProgress) {
&format!("\n{} Harmony completed\n\n", crate::theme::EMOJI_HARMONY), &format!("\n{} Harmony completed\n\n", crate::theme::EMOJI_HARMONY),
); );
progress_tracker.add_section("harmony-finished", "\n\n"); progress_tracker.add_section("harmony-finished", "\n\n");
thread::sleep(Duration::from_millis(200));
return false; return false;
} }
HarmonyEvent::TopologyStateChanged { HarmonyEvent::TopologyStateChanged {
@ -157,6 +163,7 @@ async fn handle_events(base_progress: MultiProgress) {
_ => progress_tracker.fail_task(&task_key, &outcome.message), _ => progress_tracker.fail_task(&task_key, &outcome.message),
}, },
Err(err) => { Err(err) => {
error!("Interpret error: {err}");
progress_tracker.fail_task(&task_key, &err.to_string()); progress_tracker.fail_task(&task_key, &err.to_string());
} }
} }