mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-08-23 21:36:25 +00:00
Merge pull request #9 from twexler/refresh-interval-default
Set a sane default for REFRESH_INTERVAL
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name ?= goldpinger
|
||||
version ?= 1.0.1
|
||||
version ?= 1.0.2
|
||||
bin ?= goldpinger
|
||||
pkg ?= "github.com/bloomberg/goldpinger"
|
||||
tag = $(name):$(version)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user