Skip to content

Commit 323a841

Browse files
authored
Merge pull request #1404 from Mikulas/docs-label-allowlist-fix
fix labels-metric-allow-list documentation
2 parents 8f32177 + ffa4c7b commit 323a841

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/cli-arguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Usage of ./kube-state-metrics:
3232
-h, --help Print Help text
3333
--host string Host to expose metrics on. (default "0.0.0.0")
3434
--kubeconfig string Absolute path to the kubeconfig file
35-
--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"],...)'
35+
--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],...)'
3636
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
3737
--log_dir string If non-empty, write log files in this directory
3838
--log_file string If non-empty, use this log file

pkg/options/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (o *Options) AddFlags() {
9797
o.flags.StringVar(&o.Namespace, "pod-namespace", "", "Name of the namespace of the pod specified by --pod. "+autoshardingNotice)
9898
o.flags.BoolVarP(&o.Version, "version", "", false, "kube-state-metrics build version information")
9999
o.flags.BoolVar(&o.EnableGZIPEncoding, "enable-gzip-encoding", false, "Gzip responses when requested by clients via 'Accept-Encoding: gzip' header.")
100-
o.flags.Var(&o.LabelsAllowList, "labels-metric-allow-list", "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\"],...)'")
100+
o.flags.Var(&o.LabelsAllowList, "labels-metric-allow-list", "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],...)'")
101101
}
102102

103103
// Parse parses the flag definitions from the argument list.

0 commit comments

Comments
 (0)