mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
linux: fix kubelet start unit test
This commit is contained in:
parent
89e4836dde
commit
1b71dc77f2
@ -46,6 +46,12 @@ var _ Watcher = &realWatcher{}
|
||||
// NewWatcher creates and initializes a OOMWatcher backed by Cadvisor as
|
||||
// the oom streamer.
|
||||
func NewWatcher(recorder record.EventRecorder) (Watcher, error) {
|
||||
// for test purpose
|
||||
_, ok := recorder.(*record.FakeRecorder)
|
||||
if ok {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
oomStreamer, err := oomparser.New()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -261,7 +261,7 @@ func (kvh *kubeletVolumeHost) GetSecretFunc() func(namespace, name string) (*v1.
|
||||
return kvh.secretManager.GetSecret
|
||||
}
|
||||
return func(namespace, name string) (*v1.Secret, error) {
|
||||
return nil, fmt.Errorf("not supported")
|
||||
return nil, fmt.Errorf("not supported due to running kubelet in standalone mode")
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ func (kvh *kubeletVolumeHost) GetConfigMapFunc() func(namespace, name string) (*
|
||||
return kvh.configMapManager.GetConfigMap
|
||||
}
|
||||
return func(namespace, name string) (*v1.ConfigMap, error) {
|
||||
return nil, fmt.Errorf("not supported")
|
||||
return nil, fmt.Errorf("not supported due to running kubelet in standalone mode")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user