mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Add a default value to PodConfigNotificationMode
This commit is contained in:
parent
50d805110a
commit
6908790410
@ -39,9 +39,12 @@ import (
|
|||||||
type PodConfigNotificationMode int
|
type PodConfigNotificationMode int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// PodConfigNotificationUnknown is the default value for
|
||||||
|
// PodConfigNotificationMode when uninitialized.
|
||||||
|
PodConfigNotificationUnknown = iota
|
||||||
// PodConfigNotificationSnapshot delivers the full configuration as a SET whenever
|
// PodConfigNotificationSnapshot delivers the full configuration as a SET whenever
|
||||||
// any change occurs.
|
// any change occurs.
|
||||||
PodConfigNotificationSnapshot = iota
|
PodConfigNotificationSnapshot
|
||||||
// PodConfigNotificationSnapshotAndUpdates delivers an UPDATE message whenever pods are
|
// PodConfigNotificationSnapshotAndUpdates delivers an UPDATE message whenever pods are
|
||||||
// changed, and a SET message if there are any additions or removals.
|
// changed, and a SET message if there are any additions or removals.
|
||||||
PodConfigNotificationSnapshotAndUpdates
|
PodConfigNotificationSnapshotAndUpdates
|
||||||
@ -178,6 +181,8 @@ func (s *podStorage) Merge(source string, change interface{}) error {
|
|||||||
s.updates <- kubelet.PodUpdate{Pods: s.MergedState().([]*api.Pod), Op: kubelet.SET, Source: source}
|
s.updates <- kubelet.PodUpdate{Pods: s.MergedState().([]*api.Pod), Op: kubelet.SET, Source: source}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PodConfigNotificationUnknown:
|
||||||
|
fallthrough
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unsupported PodConfigNotificationMode: %#v", s.mode))
|
panic(fmt.Sprintf("unsupported PodConfigNotificationMode: %#v", s.mode))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user