Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 5,237 for GetPod (0.2 sec)

  1. pkg/controller/serviceaccount/tokengetter.go

    		return serviceAccount, nil
    	}
    	return c.client.CoreV1().ServiceAccounts(namespace).Get(context.TODO(), name, metav1.GetOptions{})
    }
    
    func (c clientGetter) GetPod(namespace, name string) (*v1.Pod, error) {
    	if pod, err := c.podLister.Pods(namespace).Get(name); err == nil {
    		return pod, nil
    	}
    	return c.client.CoreV1().Pods(namespace).Get(context.TODO(), name, metav1.GetOptions{})
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 21:15:10 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. pkg/registry/core/pod/strategy.go

    }
    
    // ResourceGetter is an interface for retrieving resources by ResourceLocation.
    type ResourceGetter interface {
    	Get(context.Context, string, *metav1.GetOptions) (runtime.Object, error)
    }
    
    func getPod(ctx context.Context, getter ResourceGetter, name string) (*api.Pod, error) {
    	obj, err := getter.Get(ctx, name, &metav1.GetOptions{})
    	if err != nil {
    		return nil, err
    	}
    	pod := obj.(*api.Pod)
    	if pod == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 17:51:48 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  3. pkg/scheduler/internal/cache/cache_test.go

    			if !tc.assumePod {
    				if err := cache.UpdatePod(logger, tc.pod, tc.podToUpdate); err != nil {
    					t.Fatalf("UpdatePod failed: %v", err)
    				}
    			}
    
    			cachedPod, err := cache.GetPod(tc.pod)
    			if err != nil {
    				t.Fatalf("GetPod failed: %v", err)
    			}
    			if diff := cmp.Diff(tc.podToUpdate, cachedPod); diff != "" {
    				t.Fatalf("Unexpected pod (-want, +got):\n%s", diff)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 01:38:03 UTC 2023
    - 63.8K bytes
    - Viewed (0)
  4. pkg/registry/core/pod/storage/eviction.go

    		// if the original options included a resourceVersion precondition, don't retry
    		shouldRetry = func(err error) bool { return false }
    	}
    
    	err = retry.OnError(EvictionsRetry, shouldRetry, func() error {
    		pod, err = getPod(r, ctx, eviction.Name)
    		if err != nil {
    			return err
    		}
    
    		// Evicting a terminal pod should result in direct deletion of pod as it already caused disruption by the time we are evicting.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 08 11:58:48 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  5. pkg/volume/util/recyclerclient/recycler_client_test.go

    	if c.pod == nil {
    		c.pod = pod
    		return c.pod, nil
    	}
    	// Simulate "already exists" error
    	return nil, errors.NewAlreadyExists(api.Resource("pods"), pod.Name)
    }
    
    func (c *mockRecyclerClient) GetPod(name, namespace string) (*v1.Pod, error) {
    	if c.pod != nil {
    		return c.pod, nil
    	}
    	return nil, fmt.Errorf("pod does not exist")
    }
    
    func (c *mockRecyclerClient) DeletePod(name, namespace string) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 31 14:16:53 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  6. pkg/kubelet/cm/memorymanager/memory_manager_test.go

    type mockPodStatusProvider struct {
    	podStatus v1.PodStatus
    	found     bool
    }
    
    func (psp mockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool) {
    	return psp.podStatus, psp.found
    }
    
    func getPod(podUID string, containerName string, requirements *v1.ResourceRequirements) *v1.Pod {
    	return &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			UID: types.UID(podUID),
    		},
    		Spec: v1.PodSpec{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 05 13:01:40 UTC 2023
    - 70.2K bytes
    - Viewed (0)
  7. pkg/scheduler/eventhandlers_test.go

    			sched.updatePodInCache(tt.oldObj, tt.newObj)
    
    			if tt.oldObj.(*v1.Pod).UID != tt.newObj.(*v1.Pod).UID {
    				if pod, err := sched.Cache.GetPod(tt.oldObj.(*v1.Pod)); err == nil {
    					t.Errorf("Get pod UID %v from cache but it should not happen", pod.UID)
    				}
    			}
    			pod, err := sched.Cache.GetPod(tt.newObj.(*v1.Pod))
    			if err != nil {
    				t.Errorf("Failed to get pod from scheduler: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 10 14:38:54 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  8. pkg/serviceaccount/jwt.go

    )
    
    // ServiceAccountTokenGetter defines functions to retrieve a named service account and secret
    type ServiceAccountTokenGetter interface {
    	GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
    	GetPod(namespace, name string) (*v1.Pod, error)
    	GetSecret(namespace, name string) (*v1.Secret, error)
    	GetNode(name string) (*v1.Node, error)
    }
    
    type TokenGenerator interface {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 22:16:08 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  9. pkg/serviceaccount/claims.go

    		}
    	}
    
    	var podName, podUID string
    	if podref != nil {
    		// Make sure token hasn't been invalidated by deletion of the pod
    		pod, err := v.getter.GetPod(namespace, podref.Name)
    		if err != nil {
    			klog.V(4).Infof("Could not retrieve bound pod %s/%s for service account %s/%s: %v", namespace, podref.Name, namespace, saref.Name, err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 21:15:10 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  10. pkg/scheduler/internal/cache/cache.go

    	}
    
    	cache.mu.RLock()
    	defer cache.mu.RUnlock()
    
    	return cache.assumedPods.Has(key), nil
    }
    
    // GetPod might return a pod for which its node has already been deleted from
    // the main cache. This is useful to properly process pod update events.
    func (cache *cacheImpl) GetPod(pod *v1.Pod) (*v1.Pod, error) {
    	key, err := framework.GetPodKey(pod)
    	if err != nil {
    		return nil, err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 09:56:48 UTC 2023
    - 24.9K bytes
    - Viewed (0)
Back to top