Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config-reloader): add timeout seconds on startup #190

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config-reloader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ func main() {
logrus.Fatalf("Cannot start control loop %+v", err)
}

// Add this for a timeout between 0-120 seconds (default: 30 (ExecTimeoutSeconds))
// This is for golang/fluentd race condition when KFO starts/restarts:
if cfg.ExecTimeoutSeconds > 0 && cfg.ExecTimeoutSeconds <= 120 {
logrus.Infof("Sleeping for %v seconds in order for fluentd to be ready.", cfg.ExecTimeoutSeconds)
time.Sleep(time.Second * time.Duration(cfg.ExecTimeoutSeconds))
}

if cfg.IntervalSeconds == 0 {
ctrl.RunOnce()
return
Expand Down