Skip to content

Commit bc7b5b6

Browse files
authored
Merge pull request #1956 from bjorand/version_flag
remove broken --version flag, replace by version command
2 parents 1cda0bf + 57a196b commit bc7b5b6

File tree

3 files changed

+0
-67
lines changed

3 files changed

+0
-67
lines changed

docs/cli-arguments.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ Flags:
7575
--total-shards int The total number of shards. Sharding is disabled when total shards is set to 1. (default 1)
7676
--use-apiserver-cache Sets resourceVersion=0 for ListWatch requests, using cached resources from the apiserver instead of an etcd quorum read.
7777
-v, --v Level number for the log level verbosity
78-
--version kube-state-metrics build version information
7978
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
8079

8180
Use "kube-state-metrics [command] --help" for more information about a command.

pkg/options/options.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ type Options struct {
5555
TelemetryPort int `yaml:"telemetry_port"`
5656
TotalShards int `yaml:"total_shards"`
5757
UseAPIServerCache bool `yaml:"use_api_server_cache"`
58-
Version bool `yaml:"version"`
5958

6059
Config string
6160

@@ -123,7 +122,6 @@ func (o *Options) AddFlags(cmd *cobra.Command) {
123122
o.cmd.Flags().BoolVar(&o.EnableGZIPEncoding, "enable-gzip-encoding", false, "Gzip responses when requested by clients via 'Accept-Encoding: gzip' header.")
124123
o.cmd.Flags().BoolVarP(&o.Help, "help", "h", false, "Print Help text")
125124
o.cmd.Flags().BoolVarP(&o.UseAPIServerCache, "use-apiserver-cache", "", false, "Sets resourceVersion=0 for ListWatch requests, using cached resources from the apiserver instead of an etcd quorum read.")
126-
o.cmd.Flags().BoolVarP(&o.Version, "version", "", false, "kube-state-metrics build version information")
127125
o.cmd.Flags().Int32Var(&o.Shard, "shard", int32(0), "The instances shard nominal (zero indexed) within the total number of shards. (default 0)")
128126
o.cmd.Flags().IntVar(&o.Port, "port", 8080, `Port to expose metrics on.`)
129127
o.cmd.Flags().IntVar(&o.TelemetryPort, "telemetry-port", 8081, `Port to expose kube-state-metrics self metrics on.`)

pkg/version/version.go

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)