logos-storage-nim-cs-dist-t.../DistTestCore/Metrics/PrometheusContainerRecipe.cs
2023-07-17 11:12:14 +02:00

23 lines
600 B
C#

using KubernetesWorkflow;
namespace DistTestCore.Metrics
{
public class PrometheusContainerRecipe : ContainerRecipeFactory
{
public override string Image { get; }
public PrometheusContainerRecipe()
{
Image = "thatbenbierens/prometheus-envconf:latest";
}
protected override void Initialize(StartupConfig startupConfig)
{
var config = startupConfig.Get<PrometheusStartupConfig>();
AddExposedPortAndVar("PROM_PORT");
AddEnvVar("PROM_CONFIG", config.PrometheusConfigBase64);
}
}
}