From 5f610cea1f30a81c2945d5b0f26210cccbd325d3 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Thu, 20 Jun 2019 13:18:45 +0200 Subject: [PATCH] Sample controller: Init flags Without this, the flags to make klog log to stdout are not even shown. Figuring out the `InitFlags()` is not very intuitive for ppl new to the project, which is the target audience of the sample-controller. --- staging/src/k8s.io/sample-controller/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/src/k8s.io/sample-controller/main.go b/staging/src/k8s.io/sample-controller/main.go index e8574a24577..44f8504ba35 100644 --- a/staging/src/k8s.io/sample-controller/main.go +++ b/staging/src/k8s.io/sample-controller/main.go @@ -38,6 +38,7 @@ var ( ) func main() { + klog.InitFlags(nil) flag.Parse() // set up signals so we handle the first shutdown signal gracefully