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