cs-codex-dist-tests/DistTestCore/Metrics/PrometheusContainerRecipe.cs

18 lines
513 B
C#
Raw Normal View History

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