Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for PodUpdate (0.17 sec)

  1. pkg/kubelet/config/apiserver_test.go

    	}
    	update := got.(kubetypes.PodUpdate)
    	// Make sure that we get both pods.  Catches bug #2294.
    	if !(len(update.Pods) == 2) {
    		t.Errorf("Expected %d, Got %d", 2, len(update.Pods))
    	}
    
    	// Delete pod1
    	fakeWatch.Delete(&pod1)
    	got, ok = <-ch
    	if !ok {
    		t.Errorf("Unable to read from channel when expected")
    	}
    	update = got.(kubetypes.PodUpdate)
    	if !(len(update.Pods) == 1) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 22 18:31:03 UTC 2017
    - 5.6K bytes
    - Viewed (0)
  2. pkg/kubelet/config/config_test.go

    		// should register an empty PodUpdate operation
    		podUpdate := CreatePodUpdate(kubetypes.SET, TestSource)
    		channel <- podUpdate
    		expectPodUpdate(t, ch, CreatePodUpdate(test.op, TestSource))
    
    		// should ignore following empty sets
    		podUpdate = CreatePodUpdate(kubetypes.SET, TestSource)
    		channel <- podUpdate
    		podUpdate = CreatePodUpdate(kubetypes.ADD, TestSource, CreateValidPod("foo", "new"))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. pkg/controller/tainteviction/taint_eviction.go

    }
    
    func (tc *Controller) handlePodUpdate(ctx context.Context, podUpdate podUpdateItem) {
    	pod, err := tc.podLister.Pods(podUpdate.podNamespace).Get(podUpdate.podName)
    	logger := klog.FromContext(ctx)
    	if err != nil {
    		if apierrors.IsNotFound(err) {
    			// Delete
    			podNamespacedName := types.NamespacedName{Namespace: podUpdate.podNamespace, Name: podUpdate.podName}
    			logger.V(4).Info("Noticed pod deletion", "pod", podNamespacedName)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  4. pkg/kubelet/config/config.go

    	}
    
    	s.pods[source] = pods
    
    	adds = &kubetypes.PodUpdate{Op: kubetypes.ADD, Pods: copyPods(addPods), Source: source}
    	updates = &kubetypes.PodUpdate{Op: kubetypes.UPDATE, Pods: copyPods(updatePods), Source: source}
    	deletes = &kubetypes.PodUpdate{Op: kubetypes.DELETE, Pods: copyPods(deletePods), Source: source}
    	removes = &kubetypes.PodUpdate{Op: kubetypes.REMOVE, Pods: copyPods(removePods), Source: source}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  5. pkg/kubelet/config/file_linux_test.go

    }
    
    func TestUpdateOnNonExistentFile(t *testing.T) {
    	ch := make(chan interface{})
    	NewSourceFile("random_non_existent_path", "localhost", time.Millisecond, ch)
    	select {
    	case got := <-ch:
    		update := got.(kubetypes.PodUpdate)
    		expected := CreatePodUpdate(kubetypes.SET, kubetypes.FileSource)
    		if !apiequality.Semantic.DeepDerivative(expected, update) {
    			t.Fatalf("expected %#v, Got %#v", expected, update)
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 14 09:38:23 UTC 2022
    - 12.3K bytes
    - Viewed (0)
  6. pkg/scheduler/internal/queue/events.go

    	// ForceActivate is the event when a pod is moved from unschedulablePods/backoffQ
    	// to activeQ. Usually it's triggered by plugin implementations.
    	ForceActivate = "ForceActivate"
    	// PodUpdate is the event when a pod is updated
    	PodUpdate = "PodUpdate"
    )
    
    var (
    	// AssignedPodAdd is the event when a pod is added that causes pods with matching affinity terms
    	// to be more schedulable.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. pkg/kubelet/config/http.go

    		return fmt.Errorf("%v: %v", s.url, resp.Status)
    	}
    	if len(data) == 0 {
    		// Emit an update with an empty PodList to allow HTTPSource to be marked as seen
    		s.updates <- kubetypes.PodUpdate{Pods: []*v1.Pod{}, Op: kubetypes.SET, Source: kubetypes.HTTPSource}
    		return fmt.Errorf("zero-length data received from %v", s.url)
    	}
    	// Short circuit if the data has not changed since the last time it was read.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 01 07:19:44 UTC 2021
    - 4.1K bytes
    - Viewed (0)
  8. pkg/kubelet/config/file.go

    	send := func(objs []interface{}) {
    		var pods []*v1.Pod
    		for _, o := range objs {
    			pods = append(pods, o.(*v1.Pod))
    		}
    		updates <- kubetypes.PodUpdate{Pods: pods, Op: kubetypes.SET, Source: kubetypes.FileSource}
    	}
    	store := cache.NewUndeltaStore(send, cache.MetaNamespaceKeyFunc)
    	return &sourceFile{
    		path:           path,
    		nodeName:       nodeName,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 01 07:19:44 UTC 2021
    - 6.2K bytes
    - Viewed (0)
  9. pkg/kubelet/config/file_test.go

    	ch := make(chan interface{}, 1)
    	lw := newSourceFile(dirName, "localhost", time.Millisecond, ch)
    	err = lw.listConfig()
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    
    	update, ok := (<-ch).(kubetypes.PodUpdate)
    	if !ok {
    		t.Fatalf("unexpected type: %#v", update)
    	}
    	expected := CreatePodUpdate(kubetypes.SET, kubetypes.FileSource)
    	if !apiequality.Semantic.DeepEqual(expected, update) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 30 03:35:26 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  10. pkg/kubelet/config/http_test.go

    	nodeName := "different-value"
    
    	grace := int64(30)
    	enableServiceLinks := v1.DefaultEnableServiceLinks
    	var testCases = []struct {
    		desc     string
    		pods     runtime.Object
    		expected kubetypes.PodUpdate
    	}{
    		{
    			desc: "Single pod",
    			pods: &v1.Pod{
    				TypeMeta: metav1.TypeMeta{
    					Kind:       "Pod",
    					APIVersion: "",
    				},
    				ObjectMeta: metav1.ObjectMeta{
    					Name:      "foo",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 14 09:38:23 UTC 2022
    - 11.2K bytes
    - Viewed (0)
Back to top