From 407fd1875f916a32b0eb95363fd65899b7ce630f Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Tue, 17 Dec 2024 09:49:35 +1100 Subject: [PATCH] chore: disable automatic Grafana --- frontend/cli/cmd_serve.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/cli/cmd_serve.go b/frontend/cli/cmd_serve.go index b5f4c1f87..f4463e64e 100644 --- a/frontend/cli/cmd_serve.go +++ b/frontend/cli/cmd_serve.go @@ -65,7 +65,7 @@ type serveCommonConfig struct { DatabaseImage string `help:"The container image to start for the database" default:"postgres:15.10" env:"FTL_DATABASE_IMAGE" hidden:""` RegistryImage string `help:"The container image to start for the image registry" default:"registry:2" env:"FTL_REGISTRY_IMAGE" hidden:""` GrafanaImage string `help:"The container image to start for the automatic Grafana instance" default:"grafana/otel-lgtm" env:"FTL_GRAFANA_IMAGE" hidden:""` - DisableGrafana bool `help:"Disable the automatic Grafana that is started if no telemetry collector is specified." default:"false"` + EnableGrafana bool `help:"Enable Grafana to view telemetry data." default:"false"` NoConsole bool `help:"Disable the console."` Ingress ingress.Config `embed:"" prefix:"ingress-"` Timeline timeline.Config `embed:"" prefix:"timeline-"` @@ -160,7 +160,7 @@ func (s *serveCommonConfig) run( logger.Debugf("Starting FTL with %d controller(s)", s.Controllers) } - if !s.DisableGrafana && !bool(s.ObservabilityConfig.ExportOTEL) { + if s.EnableGrafana && !bool(s.ObservabilityConfig.ExportOTEL) { err := dev.SetupGrafana(ctx, s.GrafanaImage) if err != nil { logger.Errorf(err, "Failed to setup grafana image") @@ -187,12 +187,6 @@ func (s *serveCommonConfig) run( if err != nil { return fmt.Errorf("failed to create OCI registry storage: %w", err) } - // Bring up the DB and DAL. - dsn := dev.PostgresDSN(ctx, s.DBPort) - err = dev.SetupPostgres(ctx, optional.Some(s.DatabaseImage), s.DBPort, recreate) - if err != nil { - return err - } wg, ctx := errgroup.WithContext(ctx)