mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
Remove synchronous assignPod call from create pod
This commit is contained in:
@@ -25,10 +25,9 @@ import (
|
||||
)
|
||||
|
||||
type PodRegistry struct {
|
||||
Err error
|
||||
Machine string
|
||||
Pod *api.Pod
|
||||
Pods []api.Pod
|
||||
Err error
|
||||
Pod *api.Pod
|
||||
Pods []api.Pod
|
||||
sync.Mutex
|
||||
|
||||
mux *watch.Mux
|
||||
@@ -66,10 +65,9 @@ func (r *PodRegistry) GetPod(podId string) (*api.Pod, error) {
|
||||
return r.Pod, r.Err
|
||||
}
|
||||
|
||||
func (r *PodRegistry) CreatePod(machine string, pod api.Pod) error {
|
||||
func (r *PodRegistry) CreatePod(pod api.Pod) error {
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
r.Machine = machine
|
||||
r.Pod = &pod
|
||||
r.mux.Action(watch.Added, &pod)
|
||||
return r.Err
|
||||
|
Reference in New Issue
Block a user