Allows for deployment without codex nodes

This commit is contained in:
benbierens 2023-11-21 09:03:52 +01:00
parent 8b224f6922
commit 54471d41d5
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 4 additions and 2 deletions

View File

@ -18,6 +18,8 @@ namespace MetricsPlugin
public RunningContainers CollectMetricsFor(IMetricsScrapeTarget[] targets)
{
if (!targets.Any()) throw new ArgumentException(nameof(targets) + " must not be empty.");
Log($"Starting metrics server for {targets.Length} targets...");
var startupConfig = new StartupConfig();
startupConfig.Add(new PrometheusStartupConfig(GeneratePrometheusConfig(targets)));

View File

@ -142,7 +142,7 @@ namespace CodexNetDeployer
private RunningContainers? StartMetricsService(CoreInterface ci, List<CodexNodeStartResult> startResults)
{
if (!config.MetricsScraper) return null;
if (!config.MetricsScraper || !startResults.Any()) return null;
Log("Starting metrics service...");
@ -176,7 +176,7 @@ namespace CodexNetDeployer
private void CheckPeerConnectivity(List<CodexNodeStartResult> codexContainers)
{
if (!config.CheckPeerConnection) return;
if (!config.CheckPeerConnection || !codexContainers.Any()) return;
Log("Starting peer connectivity check for deployed nodes...");
peerConnectivityChecker.CheckConnectivity(codexContainers);