Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ClaimPods (0.12 sec)

  1. pkg/controller/controller_ref_manager_test.go

    				pods:    []*v1.Pod{pod1, pod2},
    				claimed: []*v1.Pod{pod1, pod2},
    				patches: 2,
    			}
    		}(),
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			claimed, err := test.manager.ClaimPods(context.TODO(), test.pods)
    			if err != nil {
    				t.Fatalf("Unexpected error: %v", err)
    			}
    			if diff := cmp.Diff(test.claimed, claimed); diff != "" {
    				t.Errorf("Claimed wrong pods (-want,+got):\n%s", diff)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 10 17:19:26 UTC 2021
    - 10.6K bytes
    - Viewed (0)
  2. pkg/controller/controller_ref_manager.go

    			Controller:   controller,
    			Selector:     selector,
    			CanAdoptFunc: canAdopt,
    		},
    		controllerKind: controllerKind,
    		podControl:     podControl,
    		finalizers:     finalizers,
    	}
    }
    
    // ClaimPods tries to take ownership of a list of Pods.
    //
    // It will reconcile the following:
    //   - Adopt orphans if the selector matches.
    //   - Release owned objects if the selector no longer matches.
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 12 12:57:29 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  3. pkg/controller/replicaset/replica_set.go

    	filteredPods := controller.FilterActivePods(logger, allPods)
    
    	// NOTE: filteredPods are pointing to objects from cache - if you need to
    	// modify them, you need to copy it first.
    	filteredPods, err = rsc.claimPods(ctx, rs, selector, filteredPods)
    	if err != nil {
    		return err
    	}
    
    	var manageReplicasErr error
    	if rsNeedsSync && rs.DeletionTimestamp == nil {
    		manageReplicasErr = rsc.manageReplicas(ctx, filteredPods, rs)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  4. pkg/controller/statefulset/stateful_set.go

    		return isMemberOf(set, pod)
    	}
    
    	cm := controller.NewPodControllerRefManager(ssc.podControl, set, selector, controllerKind, ssc.canAdoptFunc(ctx, set))
    	return cm.ClaimPods(ctx, pods, filter)
    }
    
    // If any adoptions are attempted, we should first recheck for deletion with
    // an uncached quorum read sometime after listing Pods/ControllerRevisions (see #42639).
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  5. pkg/controller/daemon/daemon_controller.go

    		}
    		return fresh, nil
    	})
    
    	// Use ControllerRefManager to adopt/orphan as needed.
    	cm := controller.NewPodControllerRefManager(dsc.podControl, ds, selector, controllerKind, dsNotDeleted)
    	return cm.ClaimPods(ctx, pods)
    }
    
    // getNodesToDaemonPods returns a map from nodes to daemon pods (corresponding to ds) created for the nodes.
    // This also reconciles ControllerRef by adopting/orphaning.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 51.3K bytes
    - Viewed (0)
  6. pkg/controller/job/job_controller.go

    	})
    	cm := controller.NewPodControllerRefManager(jm.podControl, j, selector, controllerKind, canAdoptFunc, batch.JobTrackingFinalizer)
    	// When adopting Pods, this operation adds an ownerRef and finalizers.
    	pods, err = cm.ClaimPods(ctx, pods)
    	if err != nil {
    		return pods, err
    	}
    	// Set finalizer on adopted pods for the remaining calculations.
    	for i, p := range pods {
    		adopted := true
    		for _, r := range p.OwnerReferences {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 23:56:37 UTC 2024
    - 77.6K bytes
    - Viewed (0)
Back to top