Skip to content

Commit

Permalink
chore: disable automatic Grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Dec 16, 2024
1 parent 768fa31 commit 407fd18
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions frontend/cli/cmd_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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-"`
Expand Down Expand Up @@ -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")
Expand All @@ -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)

Expand Down

0 comments on commit 407fd18

Please sign in to comment.