kubeadm: print the stack trace of an error for klog level v>=5

- replace all stray calls of os.Exit() to util.CheckError() instead
- CheckError() now checks if the klog verbosity level is >=5
and shows a stack trace of the error
- don't call klog.Fatal in version.go
This commit is contained in:
Lubomir I. Ivanov
2019-08-03 04:47:39 +03:00
parent 2af52db689
commit 2fc19136c1
6 changed files with 35 additions and 15 deletions

View File

@@ -17,13 +17,10 @@ limitations under the License.
package main
import (
"os"
"k8s.io/kubernetes/cmd/kubeadm/app"
"k8s.io/kubernetes/cmd/kubeadm/app/util"
)
func main() {
if err := app.Run(); err != nil {
os.Exit(1)
}
util.CheckErr(app.Run())
}