Skip to content

Commit

Permalink
Fix missing config
Browse files Browse the repository at this point in the history
  • Loading branch information
chdxD1 committed Nov 28, 2023
1 parent 88b2886 commit afaa439
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ func NewReconciler(clusterClient client.Client, anycastTracker *anycast.Tracker)

reconciler.debouncer = debounce.NewDebouncer(reconciler.reconcileDebounced, defaultDebounceTime)

if val := os.Getenv("FRR_CONFIG_FILE"); val != "" {
reconciler.frrManager.ConfigPath = val
}
if err := reconciler.frrManager.Init(); err != nil {
return nil, fmt.Errorf("error trying to init FRR Manager: %w", err)
}

cfg, err := config.LoadConfig()
if err != nil {
return nil, fmt.Errorf("error loading config: %w", err)
}
reconciler.config = cfg

if val := os.Getenv("FRR_CONFIG_FILE"); val != "" {
reconciler.frrManager.ConfigPath = val
}
if err := reconciler.frrManager.Init(cfg); err != nil {
return nil, fmt.Errorf("error trying to init FRR Manager: %w", err)
}

nc, err := healthcheck.LoadConfig(healthcheck.NetHealthcheckFile)
if err != nil {
return nil, fmt.Errorf("error loading networking healthcheck config: %w", err)
Expand Down

0 comments on commit afaa439

Please sign in to comment.