add version flag to tiller binary (#2965)

add version flag to tiller binary

* TODO comment on tiller.go
pull/3071/head
Yagnesh Mistry 7 years ago committed by Matthew Fisher
parent a31e2d5d66
commit 441758b206

@ -77,6 +77,7 @@ var (
certFile = flag.String("tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file")
caCertFile = flag.String("tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA")
maxHistory = flag.Int("history-max", historyMaxFromEnv(), "maximum number of releases kept in release history, with 0 meaning no limit")
printVersion = flag.Bool("version", false, "print the version number")
// rootServer is the root gRPC server.
//
@ -92,8 +93,14 @@ var (
)
func main() {
// TODO: use spf13/cobra for tiller instead of flags
flag.Parse()
if *printVersion {
fmt.Println(version.GetVersion())
os.Exit(0)
}
if *enableTracing {
log.SetFlags(log.Lshortfile)
}

Loading…
Cancel
Save