Merge branch 'master' into stop_ticker
This commit is contained in:
@@ -190,8 +190,7 @@ func (p *MockProvider) GetPod(ctx context.Context, namespace, name string) (pod
|
||||
if pod, ok := p.pods[key]; ok {
|
||||
return pod, nil
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
return nil, strongerrors.NotFound(fmt.Errorf("pod \"%s/%s\" is not known to the provider", namespace, name))
|
||||
}
|
||||
|
||||
// GetContainerLogs retrieves the logs of a container by name from the provider.
|
||||
@@ -255,7 +254,7 @@ func (p *MockProvider) GetPodStatus(ctx context.Context, namespace, name string)
|
||||
|
||||
pod, err := p.GetPod(ctx, namespace, name)
|
||||
if err != nil {
|
||||
return status, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, container := range pod.Spec.Containers {
|
||||
|
||||
@@ -29,7 +29,6 @@ type Server struct {
|
||||
provider providers.Provider
|
||||
resourceManager *manager.ResourceManager
|
||||
podSyncWorkers int
|
||||
podCh chan *podNotification
|
||||
podInformer corev1informers.PodInformer
|
||||
}
|
||||
|
||||
@@ -54,11 +53,6 @@ type APIConfig struct {
|
||||
Addr string
|
||||
}
|
||||
|
||||
type podNotification struct {
|
||||
pod *corev1.Pod
|
||||
ctx context.Context
|
||||
}
|
||||
|
||||
// New creates a new virtual-kubelet server.
|
||||
func New(ctx context.Context, cfg Config) (s *Server, retErr error) {
|
||||
s = &Server{
|
||||
@@ -69,7 +63,6 @@ func New(ctx context.Context, cfg Config) (s *Server, retErr error) {
|
||||
resourceManager: cfg.ResourceManager,
|
||||
provider: cfg.Provider,
|
||||
podSyncWorkers: cfg.PodSyncWorkers,
|
||||
podCh: make(chan *podNotification, cfg.PodSyncWorkers),
|
||||
podInformer: cfg.PodInformer,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user