@@ -24,9 +24,8 @@ import (
2424 "strconv"
2525 "syscall"
2626
27- "github.com/golang/glog"
28-
2927 "k8s.io/client-go/tools/clientcmd"
28+ "k8s.io/klog"
3029
3130 "volcano.sh/volcano/cmd/admission/app"
3231 "volcano.sh/volcano/cmd/admission/app/options"
@@ -55,13 +54,13 @@ func main() {
5554 http .HandleFunc (admission .MutateJobPath , serveMutateJobs )
5655
5756 if err := config .CheckPortOrDie (); err != nil {
58- glog .Fatalf ("Configured port is invalid: %v" , err )
57+ klog .Fatalf ("Configured port is invalid: %v" , err )
5958 }
6059 addr := ":" + strconv .Itoa (config .Port )
6160
6261 restConfig , err := clientcmd .BuildConfigFromFlags (config .Master , config .Kubeconfig )
6362 if err != nil {
64- glog .Fatalf ("Unable to build k8s config: %v" , err )
63+ klog .Fatalf ("Unable to build k8s config: %v" , err )
6564 }
6665
6766 admission .VolcanoClientSet = app .GetVolcanoClient (restConfig )
@@ -70,12 +69,12 @@ func main() {
7069
7170 caBundle , err := ioutil .ReadFile (config .CaCertFile )
7271 if err != nil {
73- glog .Fatalf ("Unable to read cacert file: %v" , err )
72+ klog .Fatalf ("Unable to read cacert file: %v" , err )
7473 }
7574
7675 err = options .RegisterWebhooks (config , app .GetClient (restConfig ), caBundle )
7776 if err != nil {
78- glog .Fatalf ("Unable to register webhook configs: %v" , err )
77+ klog .Fatalf ("Unable to register webhook configs: %v" , err )
7978 }
8079
8180 stopChannel := make (chan os.Signal )
@@ -89,15 +88,15 @@ func main() {
8988 go func () {
9089 err = server .ListenAndServeTLS ("" , "" )
9190 if err != nil && err != http .ErrServerClosed {
92- glog .Fatalf ("ListenAndServeTLS for admission webhook failed: %v" , err )
91+ klog .Fatalf ("ListenAndServeTLS for admission webhook failed: %v" , err )
9392 close (webhookServeError )
9493 }
9594 }()
9695
9796 select {
9897 case <- stopChannel :
9998 if err := server .Close (); err != nil {
100- glog .Fatalf ("Close admission server failed: %v" , err )
99+ klog .Fatalf ("Close admission server failed: %v" , err )
101100 }
102101 return
103102 case <- webhookServeError :
0 commit comments