Skip to content

Commit

Permalink
Fix klog flag parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 23, 2019
1 parent efd614f commit 8ce4ab8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require (
k8s.io/kube-aggregator v0.0.0-20190314000639-da8327669ac5
k8s.io/kube-openapi v0.0.0-20190502190224-411b2483e503
k8s.io/kubernetes v1.14.0
kmodules.xyz/client-go v0.0.0-20191023014104-b4d8f6cd8cb5
kmodules.xyz/client-go v0.0.0-20191023042933-b12d1ccfaf57
kmodules.xyz/constants v0.0.0-20191009183447-fbd33067b8a6
kmodules.xyz/custom-resources v0.0.0-20190927035424-65fe358bb045
kmodules.xyz/objectstore-api v0.0.0-20191014210450-ac380fa650a3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ k8s.io/kubernetes v1.14.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/utils v0.0.0-20190514214443-0a167cbac756 h1:2XBbostlqrw13zVYimyqcj/Om2P4B26oMzv+m2cj//k=
k8s.io/utils v0.0.0-20190514214443-0a167cbac756/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
kmodules.xyz/client-go v0.0.0-20190808141354-bbb9e14f60ab/go.mod h1:1GI6h5D31op/2D+Hrn9DhXW6iUd5wsHBQRoLeY7fndM=
kmodules.xyz/client-go v0.0.0-20191023014104-b4d8f6cd8cb5 h1:gjTt06FdWbXakzkDBU4UTgLHqNWwZkc16cbXpIJpd8Y=
kmodules.xyz/client-go v0.0.0-20191023014104-b4d8f6cd8cb5/go.mod h1:BChXGI3zd3lNSjUUfDcGmvufMdqrofLI/nrndcZ4LUo=
kmodules.xyz/client-go v0.0.0-20191023042933-b12d1ccfaf57 h1:4IsITvsVOl0W8IRABEMOqEMyJYwTCmhmfpJVIpwD4lM=
kmodules.xyz/client-go v0.0.0-20191023042933-b12d1ccfaf57/go.mod h1:BChXGI3zd3lNSjUUfDcGmvufMdqrofLI/nrndcZ4LUo=
kmodules.xyz/constants v0.0.0-20191009183447-fbd33067b8a6 h1:JEerfubBfd98TetzNFn9xOgkVUGuQrbrR/iwkxjenIo=
kmodules.xyz/constants v0.0.0-20191009183447-fbd33067b8a6/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
kmodules.xyz/custom-resources v0.0.0-20190927035424-65fe358bb045 h1:DuvD64ouPDbv3egAUUCy5rBqs/vc218DeVVivcqfa+U=
Expand Down
4 changes: 3 additions & 1 deletion vendor/kmodules.xyz/client-go/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ func ParseFlags() {
f2 := klogFlags.Lookup(f1.Name)
if f2 != nil {
value := f1.Value.String()
utilruntime.Must(f2.Value.Set(value))
// Ignore error. klog's -log_backtrace_at flag throws error when set to empty string.
// Unfortunately, there is no way to tell if a flag was set to empty string or left unset on command line.
_ = f2.Value.Set(value)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ k8s.io/utils/integer
k8s.io/utils/buffer
k8s.io/utils/trace
k8s.io/utils/pointer
# kmodules.xyz/client-go v0.0.0-20191023014104-b4d8f6cd8cb5
# kmodules.xyz/client-go v0.0.0-20191023042933-b12d1ccfaf57
kmodules.xyz/client-go/logs
kmodules.xyz/client-go/apiextensions/v1beta1
kmodules.xyz/client-go/meta
Expand Down

0 comments on commit 8ce4ab8

Please sign in to comment.