Set a sane default for REFRESH_INTERVAL

Fixes #7

Signed-off-by: Ted Wexler <twexler@bloomberg.net>
This commit is contained in:
Ted Wexler
2018-12-07 21:25:11 +00:00
parent a8eb2d5751
commit d1dfd54ec6
2 changed files with 2 additions and 4 deletions
-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"`