Merge pull request #9 from twexler/refresh-interval-default

Set a sane default for REFRESH_INTERVAL
This commit is contained in:
Mikolaj Pawlikowski
2018-12-07 16:59:48 -05:00
committed by GitHub
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name ?= goldpinger
version ?= 1.0.1
version ?= 1.0.2
bin ?= goldpinger
pkg ?= "github.com/bloomberg/goldpinger"
tag = $(name):$(version)
-3
View File
@@ -108,9 +108,6 @@ spec:
value: "0.0.0.0"
- name: PORT
value: "80"
# refresh interval (seconds) tells goldpinger to call every other instance with that frequency (set to 0 to disable)
- name: REFRESH_INTERVAL
value: "30"
# injecting real hostname will make for easier to understand graphs/metrics
- name: HOSTNAME
valueFrom:
+2 -1
View File
@@ -18,10 +18,11 @@ import (
"k8s.io/client-go/kubernetes"
)
// GoldpingerConfig represents the configuration for goldpinger
var GoldpingerConfig = struct {
StaticFilePath string `long:"static-file-path" description:"Folder for serving static files" env:"STATIC_FILE_PATH"`
KubeConfigPath string `long:"kubeconfig" description:"Path to kubeconfig file" env:"KUBECONFIG"`
RefreshInterval int `long:"refresh-interval" description:"If > 0, will create a thread and collect stats every n seconds" env:"REFRESH_INTERVAL"`
RefreshInterval int `long:"refresh-interval" description:"If > 0, will create a thread and collect stats every n seconds" env:"REFRESH_INTERVAL" default:"30"`
Hostname string `long:"hostname" description:"Hostname to use" env:"HOSTNAME"`
Port int `long:"client-port-override" description:"(for testing) use this port when calling other instances" env:"CLIENT_PORT_OVERRIDE"`
UseHostIP bool `long:"use-host-ip" description:"When making the calls, use host ip (defaults to pod ip)" env:"USE_HOST_IP"`