cs-codex-dist-tests/ProjectPlugins/MetricsPlugin/PrometheusContainerRecipe.cs

19 lines
560 B
C#
Raw Normal View History

2023-09-13 14:06:05 +00:00
using KubernetesWorkflow;
2023-09-13 09:25:08 +00:00
namespace MetricsPlugin
{
2023-09-13 14:06:05 +00:00
public class PrometheusContainerRecipe : ContainerRecipeFactory
2023-09-13 09:25:08 +00:00
{
public override string AppName => "prometheus";
public override string Image => "codexstorage/dist-tests-prometheus:latest";
2023-09-13 14:06:05 +00:00
protected override void Initialize(StartupConfig startupConfig)
2023-09-13 09:25:08 +00:00
{
var config = startupConfig.Get<PrometheusStartupConfig>();
2023-09-13 09:25:08 +00:00
AddExposedPortAndVar("PROM_PORT");
AddEnvVar("PROM_CONFIG", config.PrometheusConfigBase64);
}
}
}