Add /pods HTTP endpoint
This commit is contained in:
@@ -164,8 +164,8 @@ func (f *Framework) WaitUntilPodEventWithReason(pod *corev1.Pod, reason string)
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetRunningPods gets the running pods from the provider of the virtual kubelet
|
||||
func (f *Framework) GetRunningPods() (*corev1.PodList, error) {
|
||||
// GetRunningPodsFromProvider gets the running pods from the provider of the virtual kubelet
|
||||
func (f *Framework) GetRunningPodsFromProvider() (*corev1.PodList, error) {
|
||||
result := &corev1.PodList{}
|
||||
|
||||
err := f.KubeClient.CoreV1().
|
||||
@@ -181,6 +181,23 @@ func (f *Framework) GetRunningPods() (*corev1.PodList, error) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
// GetRunningPodsFromProvider gets the running pods from the provider of the virtual kubelet
|
||||
func (f *Framework) GetRunningPodsFromKubernetes() (*corev1.PodList, error) {
|
||||
result := &corev1.PodList{}
|
||||
|
||||
err := f.KubeClient.CoreV1().
|
||||
RESTClient().
|
||||
Get().
|
||||
Resource("nodes").
|
||||
Name(f.NodeName).
|
||||
SubResource("proxy").
|
||||
Suffix("pods").
|
||||
Do().
|
||||
Into(result)
|
||||
|
||||
return result, err
|
||||
}
|
||||
|
||||
// stripParentTestName strips out the parent's test name from the input (in the form of 'TestParent/TestChild').
|
||||
// Some test cases use their name as the pod name for testing purpose, and sometimes it might exceed 63
|
||||
// characters (Kubernetes's limit for pod name). This function ensures that we strip out the parent's
|
||||
|
||||
Reference in New Issue
Block a user