Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 85167f7

Browse files
authored
Merge pull request #49 from helayoty/get-pod
fear: Add GetPod func
2 parents 9ec37a4 + 3121ccc commit 85167f7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

manager/resource.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ func NewResourceManager(podLister corev1listers.PodLister,
5050
return &rm, nil
5151
}
5252

53+
// GetPod retrieves the specified pod from Kubernetes.
54+
func (rm *ResourceManager) GetPod(name, namespace string) (*v1.Pod, error) {
55+
return rm.podLister.Pods(namespace).Get(name)
56+
}
57+
5358
// GetPods returns a list of all known pods assigned to this virtual node.
5459
func (rm *ResourceManager) GetPods() []*v1.Pod {
5560
l, err := rm.podLister.List(labels.Everything())

0 commit comments

Comments
 (0)