2023-09-13 14:06:05 +00:00
|
|
|
|
using KubernetesWorkflow;
|
2023-09-11 09:59:33 +00:00
|
|
|
|
|
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-11 09:59:33 +00:00
|
|
|
|
|
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-11 09:59:33 +00:00
|
|
|
|
|
2023-09-13 09:25:08 +00:00
|
|
|
|
AddExposedPortAndVar("PROM_PORT");
|
|
|
|
|
AddEnvVar("PROM_CONFIG", config.PrometheusConfigBase64);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|