From 1be1b9d77b4f32b392451357f9c97f848f7b54c5 Mon Sep 17 00:00:00 2001 From: vikkyomkar Date: Sat, 14 Mar 2020 14:32:12 +0530 Subject: [PATCH] Renamed --namespace flag to --namespaces --- docs/cli-arguments.md | 2 +- pkg/options/options.go | 2 +- pkg/options/options_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/cli-arguments.md b/docs/cli-arguments.md index 1ca8b44ed4..5a053514f0 100644 --- a/docs/cli-arguments.md +++ b/docs/cli-arguments.md @@ -39,7 +39,7 @@ Usage of ./kube-state-metrics: --logtostderr log to standard error instead of files (default true) --metric-allowlist string 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. --metric-denylist string Comma-separated list of metrics not to be enabled. This list comprises of exact metric names and/or regex patterns. The allowlist and denylist are mutually exclusive. - --namespace string Comma-separated list of namespaces to be enabled. Defaults to "" + --namespaces string Comma-separated list of namespaces to be enabled. Defaults to "" --pod string Name of the pod that contains the kube-state-metrics container. When set, it is expected that --pod and --pod-namespace are both set. Most likely this should be passed via the downward API. This is used for auto-detecting sharding. If set, this has preference over statically configured sharding. This is experimental, it may be removed without notice. --pod-namespace string Name of the namespace of the pod specified by --pod. When set, it is expected that --pod and --pod-namespace are both set. Most likely this should be passed via the downward API. This is used for auto-detecting sharding. If set, this has preference over statically configured sharding. This is experimental, it may be removed without notice. --port int Port to expose metrics on. (default 8080) diff --git a/pkg/options/options.go b/pkg/options/options.go index e8edeeb4d2..522b315ec4 100644 --- a/pkg/options/options.go +++ b/pkg/options/options.go @@ -83,7 +83,7 @@ func (o *Options) AddFlags() { 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.Var(&o.Resources, "resources", fmt.Sprintf("Comma-separated list of Resources to be enabled. Defaults to %q", &DefaultResources)) - o.flags.Var(&o.Namespaces, "namespace", fmt.Sprintf("Comma-separated list of namespaces to be enabled. Defaults to %q", &DefaultNamespaces)) + 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.") o.flags.Var(&o.MetricDenylist, "metric-denylist", "Comma-separated list of metrics not to be enabled. This list comprises of exact metric names and/or regex patterns. The allowlist and denylist are mutually exclusive.") o.flags.Int32Var(&o.Shard, "shard", int32(0), "The instances shard nominal (zero indexed) within the total number of shards. (default 0)") diff --git a/pkg/options/options_test.go b/pkg/options/options_test.go index e6f0bf0a8c..1a6f5c7304 100644 --- a/pkg/options/options_test.go +++ b/pkg/options/options_test.go @@ -36,8 +36,8 @@ func TestOptionsParse(t *testing.T) { RecoverInvoked: false, }, { - Desc: "namespace command line argument", - Args: []string{"./kube-state-metrics", "--namespace=default,kube-system"}, + Desc: "namespaces command line argument", + Args: []string{"./kube-state-metrics", "--namespaces=default,kube-system"}, RecoverInvoked: false, }, }