Skip to content

Commit

Permalink
Change metrics update interval
Browse files Browse the repository at this point in the history
  • Loading branch information
alperencelik committed Dec 9, 2024
1 parent 83fd682 commit 216c53f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ import (
)

var (
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
metricsUpdateInterval = 30 * time.Second
)

func init() { //nolint:gochecknoinits // This is required by kubebuilder
Expand Down Expand Up @@ -195,7 +196,7 @@ func main() {

func startMetricsUpdater(ctx context.Context, kubeClient client.Client) {
go func() {
ticker := time.NewTicker(15 * time.Second)
ticker := time.NewTicker(metricsUpdateInterval * time.Second)
defer ticker.Stop()
for range ticker.C {
// Update metrics here
Expand Down

0 comments on commit 216c53f

Please sign in to comment.