Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 102 for PodList (0.16 sec)

  1. pkg/controller/podautoscaler/replica_calculator.go

    	podList, err := c.podLister.Pods(namespace).List(selector)
    	if err != nil {
    		return 0, fmt.Errorf("unable to get pods while calculating replica count: %v", err)
    	}
    
    	if len(podList) == 0 {
    		return 0, fmt.Errorf("no pods returned by selector while calculating replica count")
    	}
    
    	readyPodCount := 0
    
    	for _, pod := range podList {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 19 03:31:34 UTC 2023
    - 20.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/printers/jsonpath_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	objects := map[string]runtime.Object{
    		"pod":             &v1.Pod{ObjectMeta: om("pod")},
    		"emptyPodList":    &v1.PodList{},
    		"nonEmptyPodList": &v1.PodList{Items: []v1.Pod{{}}},
    		"endpoints": &v1.Endpoints{
    			Subsets: []v1.EndpointSubset{{
    				Addresses: []v1.EndpointAddress{{IP: "127.0.0.1"}, {IP: "localhost"}},
    				Ports:     []v1.EndpointPort{{Port: 8080}},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 15 21:58:20 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  3. pkg/kubelet/userns/userns_manager_switch_test.go

    	testUserNsPodsManager := &testUserNsPodsManager{
    		podDir: t.TempDir(),
    		// List the same pods we will record, so the second time we create the userns
    		// manager, it will find these pods on disk with userns data.
    		podList: pods,
    	}
    	m, err := MakeUserNsManager(testUserNsPodsManager)
    	require.NoError(t, err)
    
    	// Record the pods on disk.
    	for _, podUID := range pods {
    		pod := v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/pkg/printers/managedfields_test.go

    					},
    				},
    			},
    			expected: &v1.Pod{
    				ObjectMeta: metav1.ObjectMeta{Name: "pod1"},
    			},
    		},
    		{
    			name: "pod list",
    			object: &v1.PodList{
    				Items: []v1.Pod{
    					{
    						ObjectMeta: metav1.ObjectMeta{
    							Name:          "pod1",
    							ManagedFields: []metav1.ManagedFieldsEntry{},
    						},
    					},
    					{
    						ObjectMeta: metav1.ObjectMeta{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 16 14:52:03 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  5. istioctl/pkg/util/handlers/handlers.go

    		return []string{podName}, namespace, err
    	}
    
    	options := metav1.ListOptions{LabelSelector: selector}
    	podList, err := client.Pods(namespace).List(context.TODO(), options)
    	if err != nil {
    		return []string{}, "", err
    	}
    	pods := []string{}
    	for i := range podList.Items {
    		pods = append(pods, podList.Items[i].Name)
    	}
    
    	return pods, namespace, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Feb 06 15:01:41 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/util_test.go

    		storage := etcd3.New(server.V3Client, apitesting.TestCodec(codecs, examplev1.SchemeGroupVersion, example2v1.SchemeGroupVersion), func() runtime.Object { return &example.Pod{} }, func() runtime.Object { return &example.PodList{} }, prefix, "/pods", schema.GroupResource{Resource: "pods"}, identity.NewEncryptCheckTransformer(), etcd3.NewDefaultLeaseManagerConfig())
    		return server, storage
    	}
    	server, etcdStorage := newEtcdTestStorage(t, "")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 11 12:07:39 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/config/cluster.go

    	if err != nil {
    		return "", errors.Wrap(err, "could not retrieve list of pods to determine api server endpoints")
    	}
    	if len(podList.Items) != 1 {
    		return "", errors.Errorf("API server pod for node name %q has %d entries, only one was expected", nodeName, len(podList.Items))
    	}
    	if apiServerEndpoint, ok := podList.Items[0].Annotations[constants.KubeAPIServerAdvertiseAddressEndpointAnnotationKey]; ok {
    		return apiServerEndpoint, nil
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. staging/src/k8s.io/cli-runtime/pkg/printers/template_test.go

    	// Template printer should succeed on these resources.
    	om := func(name string) metav1.ObjectMeta { return metav1.ObjectMeta{Name: name} }
    	objects := []runtime.Object{
    		&v1.Pod{ObjectMeta: om("pod")},
    		&v1.PodList{},
    		&v1.PodList{Items: []v1.Pod{{}}},
    		&v1.Endpoints{
    			Subsets: []v1.EndpointSubset{{
    				Addresses: []v1.EndpointAddress{{IP: "127.0.0.1"}, {IP: "localhost"}},
    				Ports:     []v1.EndpointPort{{Port: 8080}},
    			}}},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 22 23:10:00 UTC 2019
    - 7.1K bytes
    - Viewed (0)
  9. pkg/kubelet/config/apiserver_test.go

    		ObjectMeta: metav1.ObjectMeta{Name: "q"},
    		Spec:       v1.PodSpec{Containers: []v1.Container{{Image: "image/blah"}}}}
    
    	// Setup fake api client.
    	fakeWatch := watch.NewFake()
    	lw := fakePodLW{
    		listResp:  &v1.PodList{Items: []v1.Pod{*pod1v1}},
    		watchResp: fakeWatch,
    	}
    
    	ch := make(chan interface{})
    
    	newSourceApiserverFromLW(lw, ch)
    
    	got, ok := <-ch
    	if !ok {
    		t.Errorf("Unable to read from channel when expected")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 22 18:31:03 UTC 2017
    - 5.6K bytes
    - Viewed (0)
  10. pkg/controller/deployment/recreate.go

    	if oldPods := util.GetActualReplicaCountForReplicaSets(oldRSs); oldPods > 0 {
    		return true
    	}
    	for rsUID, podList := range podMap {
    		// If the pods belong to the new ReplicaSet, ignore.
    		if newRS != nil && newRS.UID == rsUID {
    			continue
    		}
    		for _, pod := range podList {
    			switch pod.Status.Phase {
    			case v1.PodFailed, v1.PodSucceeded:
    				// Don't count pods in terminal state.
    				continue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 13 20:32:13 UTC 2021
    - 4.2K bytes
    - Viewed (0)
Back to top