Skip to content

Commit

Permalink
Merge pull request #1346 from Frankkkkk/fvd/dualstack
Browse files Browse the repository at this point in the history
options: change default host from 0.0.0.0 to ::
  • Loading branch information
k8s-ci-robot committed Jan 13, 2021
2 parents 700b2e2 + 4b7ce27 commit 72d6d31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/cli-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Usage of ./kube-state-metrics:
--apiserver string The URL of the apiserver to use as a master
--enable-gzip-encoding Gzip responses when requested by clients via 'Accept-Encoding: gzip' header.
-h, --help Print Help text
--host string Host to expose metrics on. (default "0.0.0.0")
--host string Host to expose metrics on. (default "::")
--kubeconfig string Absolute path to the kubeconfig file
--labels-metric-allow-list string Allows to pass a list of additional Kubernetes label keys that will be used in the resource' labels metric. By default the metric contains only name and namespace labels. To include additional labels provide a list of resource names in their plural form and Kubernetes label keys you would like to allow for them (Example: '=namespaces=["k8s-label-1","k8s-label-n",...],pods=["app"],...)'
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
Expand All @@ -49,7 +49,7 @@ Usage of ./kube-state-metrics:
--skip_headers If true, avoid header prefixes in the log messages
--skip_log_headers If true, avoid headers when opening log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
--telemetry-host string Host to expose kube-state-metrics self metrics on. (default "0.0.0.0")
--telemetry-host string Host to expose kube-state-metrics self metrics on. (default "::")
--telemetry-port int Port to expose kube-state-metrics self metrics on. (default 8081)
--total-shards int The total number of shards. Sharding is disabled when total shards is set to 1. (default 1)
-v, --v Level number for the log level verbosity
Expand Down
4 changes: 2 additions & 2 deletions pkg/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ func (o *Options) AddFlags() {
o.flags.StringVar(&o.Kubeconfig, "kubeconfig", "", "Absolute path to the kubeconfig file")
o.flags.BoolVarP(&o.Help, "help", "h", false, "Print Help text")
o.flags.IntVar(&o.Port, "port", 8080, `Port to expose metrics on.`)
o.flags.StringVar(&o.Host, "host", "0.0.0.0", `Host to expose metrics on.`)
o.flags.StringVar(&o.Host, "host", "::", `Host to expose metrics on.`)
o.flags.IntVar(&o.TelemetryPort, "telemetry-port", 8081, `Port to expose kube-state-metrics self metrics on.`)
o.flags.StringVar(&o.TelemetryHost, "telemetry-host", "0.0.0.0", `Host to expose kube-state-metrics self metrics on.`)
o.flags.StringVar(&o.TelemetryHost, "telemetry-host", "::", `Host to expose kube-state-metrics self metrics on.`)
o.flags.Var(&o.Resources, "resources", fmt.Sprintf("Comma-separated list of Resources to be enabled. Defaults to %q", &DefaultResources))
o.flags.Var(&o.Namespaces, "namespaces", fmt.Sprintf("Comma-separated list of namespaces to be enabled. Defaults to %q", &DefaultNamespaces))
o.flags.Var(&o.MetricAllowlist, "metric-allowlist", "Comma-separated list of metrics to be exposed. This list comprises of exact metric names and/or regex patterns. The allowlist and denylist are mutually exclusive.")
Expand Down

0 comments on commit 72d6d31

Please sign in to comment.