diff --git a/Makefile b/Makefile index de1d55c..cf2aa75 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ name ?= goldpinger -version ?= 1.0.1 +version ?= 1.0.2 bin ?= goldpinger pkg ?= "github.com/bloomberg/goldpinger" tag = $(name):$(version) diff --git a/README.md b/README.md index 266f2eb..0182059 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/pkg/goldpinger/config.go b/pkg/goldpinger/config.go index ba30322..04e18d2 100644 --- a/pkg/goldpinger/config.go +++ b/pkg/goldpinger/config.go @@ -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"`