Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
throttle period fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaakin-atl committed Nov 6, 2021
1 parent f5b0b1c commit 3208b6e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16 AS builder
FROM golang:1.17 AS builder

ADD . /app
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
logLevel: error
logLevel: debug
logFormat: json
route:
routes:
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func main() {
log.Fatal().Str("log_format", cfg.LogFormat).Msg("Unknown log format")
}

if cfg.ThrottlePeriod == 0 {
cfg.ThrottlePeriod = 5
}

kubeconfig, err := kube.GetKubernetesConfig()
if err != nil {
log.Fatal().Err(err).Msg("cannot get kubeconfig")
Expand Down
2 changes: 1 addition & 1 deletion pkg/exporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Config struct {
// TODO: I am not sure what to do here.
LogLevel string `yaml:"logLevel"`
LogFormat string `yaml:"logFormat"`
ThrottlePeriod int64 `yaml:"throttlePeriod" default:"5""`
ThrottlePeriod int64 `yaml:"throttlePeriod"`
Namespace string `yaml:"namespace"`
LeaderElection kube.LeaderElectionConfig `yaml:"leaderElection"`
Route Route `yaml:"route"`
Expand Down

0 comments on commit 3208b6e

Please sign in to comment.