// PodHandler r := mux.NewRouter() r.HandleFunc("/pods", HandleRunningPods(p.GetPodsFromKubernetes)).Methods("GET")--> HandleRunningPods pods, err := getPods(ctx) // p.GetPodsFromKubernetes --> pods.List(labels.Everything()) data, err := runtime.Encode(codec, podList) w.Header().Set("Content-Type", "application/json") cm.Run()--> go n.pc.Run(ctx, n.workers)--> r"> // PodHandler r := mux.NewRouter() r.HandleFunc("/pods", HandleRunningPods(p.GetPodsFromKubernetes)).Methods("GET")--> HandleRunningPods pods, err := getPods(ctx) // p.GetPodsFromKubernetes --> pods.List(labels.Everything()) data, err := runtime.Encode(codec, podList) w.Header().Set("Content-Type", "application/json") cm.Run()--> go n.pc.Run(ctx, n.workers)--> r"> // PodHandler r := mux.NewRouter() r.HandleFunc("/pods", HandleRunningPods(p.GetPodsFromKubernetes)).Methods("GET")--> HandleRunningPods pods, err := getPods(ctx) // p.GetPodsFromKubernetes --> pods.List(labels.Everything()) data, err := runtime.Encode(codec, podList) w.Header().Set("Content-Type", "application/json") cm.Run()--> go n.pc.Run(ctx, n.workers)--> r">
manager.NewResourceManager(cfg.Pods, cfg.Secrets, cfg.ConfigMaps, cfg.Services)
p.ConfigureNode(ctx, cfg.Node)--> // cmd/virtual-kubelet/internal/provider/mock/mock.go:ConfigureNode(ctx context.Context, n *v1.Node) {
n.Status.Capacity = p.capacity()
n.Status.Allocatable = p.capacity()
n.Status.Conditions = p.nodeConditions()
n.Status.Addresses = p.nodeAddresses()
n.Status.DaemonEndpoints = p.nodeDaemonEndpoints()
cm, err := nodeutil.NewNode(c.NodeName, newProvider, func(cfg *nodeutil.NodeConfig)-->
cfg.HTTPListenAddr = apiConfig.Addr
nodeutil.AttachProviderRoutes(mux)-->
mux.Handle("/", api.PodHandler)--> // PodHandler
r := mux.NewRouter()
r.HandleFunc("/pods", HandleRunningPods(p.GetPodsFromKubernetes)).Methods("GET")--> HandleRunningPods
pods, err := getPods(ctx) // p.GetPodsFromKubernetes --> pods.List(labels.Everything())
data, err := runtime.Encode(codec, podList)
w.Header().Set("Content-Type", "application/json")
cm.Run()-->
go n.pc.Run(ctx, n.workers)-->
runProvider = wrapped.run
go runProvider(ctx)-->
p.syncPodStatuses(ctx)
pc.syncPodsFromKubernetes.Run(ctx, podSyncWorkers)--> // pc.syncPodFromKubernetesHandler
pc.syncPodInProvider(ctx, pod, key)-->
pc.createOrUpdatePod(ctx, pod)-->
pc.provider.CreatePod(ctx, podForProvider)-->
p.pods[key] = pod
p.notifier(pod)-->