mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Fix the kubelet node watch
This commit is contained in:
parent
dbd7b186a0
commit
0e1bd18b3e
@ -179,7 +179,7 @@ func NewMainKubelet(
|
|||||||
if kubeClient != nil {
|
if kubeClient != nil {
|
||||||
// TODO: cache.NewListWatchFromClient is limited as it takes a client implementation rather
|
// TODO: cache.NewListWatchFromClient is limited as it takes a client implementation rather
|
||||||
// than an interface. There is no way to construct a list+watcher using resource name.
|
// than an interface. There is no way to construct a list+watcher using resource name.
|
||||||
fieldSelector := fields.Set{"name": hostname}.AsSelector()
|
fieldSelector := fields.Set{"metadata.name": hostname}.AsSelector()
|
||||||
listWatch := &cache.ListWatch{
|
listWatch := &cache.ListWatch{
|
||||||
ListFunc: func() (runtime.Object, error) {
|
ListFunc: func() (runtime.Object, error) {
|
||||||
// TODO: Use List() with fieldSelector when it is supported.
|
// TODO: Use List() with fieldSelector when it is supported.
|
||||||
|
Loading…
Reference in New Issue
Block a user