mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Be able to specify the timeout to wait for pod for kubectl logs/attach
This commit is contained in:
@@ -376,7 +376,7 @@ func (f *FakeFactory) LabelsForObject(runtime.Object) (map[string]string, error)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (f *FakeFactory) LogsForObject(object, options runtime.Object) (*restclient.Request, error) {
|
||||
func (f *FakeFactory) LogsForObject(object, options runtime.Object, timeout time.Duration) (*restclient.Request, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ func (f *FakeFactory) CanBeAutoscaled(schema.GroupKind) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *FakeFactory) AttachablePodForObject(ob runtime.Object) (*api.Pod, error) {
|
||||
func (f *FakeFactory) AttachablePodForObject(ob runtime.Object, timeout time.Duration) (*api.Pod, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -613,7 +613,7 @@ func (f *fakeAPIFactory) Printer(mapping *meta.RESTMapping, options printers.Pri
|
||||
return f.tf.Printer, f.tf.Err
|
||||
}
|
||||
|
||||
func (f *fakeAPIFactory) LogsForObject(object, options runtime.Object) (*restclient.Request, error) {
|
||||
func (f *fakeAPIFactory) LogsForObject(object, options runtime.Object, timeout time.Duration) (*restclient.Request, error) {
|
||||
c, err := f.ClientSet()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -635,7 +635,7 @@ func (f *fakeAPIFactory) LogsForObject(object, options runtime.Object) (*restcli
|
||||
}
|
||||
}
|
||||
|
||||
func (f *fakeAPIFactory) AttachablePodForObject(object runtime.Object) (*api.Pod, error) {
|
||||
func (f *fakeAPIFactory) AttachablePodForObject(object runtime.Object, timeout time.Duration) (*api.Pod, error) {
|
||||
switch t := object.(type) {
|
||||
case *api.Pod:
|
||||
return t, nil
|
||||
|
||||
Reference in New Issue
Block a user