runtime/kubernetes: fix streaming logs error handling (#1919)
This commit is contained in:
parent
fdce953c15
commit
593b543230
@ -165,6 +165,9 @@ func (k *klog) Stream() (runtime.LogStream, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if len(pods) == 0 {
|
||||||
|
return nil, errors.NotFound("runtime.logs", "no such service")
|
||||||
|
}
|
||||||
|
|
||||||
stream := &kubeStream{
|
stream := &kubeStream{
|
||||||
stream: make(chan runtime.LogRecord),
|
stream: make(chan runtime.LogRecord),
|
||||||
|
Loading…
Reference in New Issue
Block a user