Merge pull request #102344 from smarterclayton/keep_pod_worker
Prevent Kubelet from incorrectly interpreting "not yet started" pods as "ready to terminate pods" by unifying responsibility for pod lifecycle into pod worker
This commit is contained in:
@@ -19,11 +19,13 @@ package testing
|
||||
|
||||
import (
|
||||
kubelettypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
)
|
||||
import mock "github.com/stretchr/testify/mock"
|
||||
|
||||
import types "k8s.io/apimachinery/pkg/types"
|
||||
import v1 "k8s.io/api/core/v1"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// MockManager is an autogenerated mock type for the Manager type
|
||||
type MockManager struct {
|
||||
@@ -77,6 +79,20 @@ func (_m *MockManager) GetOrphanedMirrorPodNames() []string {
|
||||
return r0
|
||||
}
|
||||
|
||||
func (_m *MockManager) GetOrphanedMirrorPodNamesAndUIDs() map[string]kubelettypes.ResolvedPodUID {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 map[string]kubelettypes.ResolvedPodUID
|
||||
if rf, ok := ret.Get(0).(func() map[string]kubelettypes.ResolvedPodUID); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(map[string]kubelettypes.ResolvedPodUID)
|
||||
}
|
||||
}
|
||||
return r0
|
||||
}
|
||||
|
||||
// DeletePod provides a mock function with given fields: _a0
|
||||
func (_m *MockManager) DeletePod(_a0 *v1.Pod) {
|
||||
_m.Called(_a0)
|
||||
|
Reference in New Issue
Block a user