mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Don't rewrite device health
This commit is contained in:
parent
a19f6d147c
commit
dc5384a139
@ -115,16 +115,8 @@ func (m *Stub) Register(kubeletEndpoint, resourceName string) error {
|
|||||||
// ListAndWatch lists devices and update that list according to the Update call
|
// ListAndWatch lists devices and update that list according to the Update call
|
||||||
func (m *Stub) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error {
|
func (m *Stub) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error {
|
||||||
log.Println("ListAndWatch")
|
log.Println("ListAndWatch")
|
||||||
var devs []*pluginapi.Device
|
|
||||||
|
|
||||||
for _, d := range m.devs {
|
s.Send(&pluginapi.ListAndWatchResponse{Devices: m.devs})
|
||||||
devs = append(devs, &pluginapi.Device{
|
|
||||||
ID: d.ID,
|
|
||||||
Health: pluginapi.Healthy,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
s.Send(&pluginapi.ListAndWatchResponse{Devices: devs})
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
Loading…
Reference in New Issue
Block a user