Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for ByIndex (0.18 sec)

  1. staging/src/k8s.io/apimachinery/third_party/forked/golang/json/fields.go

    	}
    	if x[i].tag != x[j].tag {
    		return x[i].tag
    	}
    	return byIndex(x).Less(i, j)
    }
    
    // byIndex sorts field by index sequence.
    type byIndex []field
    
    func (x byIndex) Len() int { return len(x) }
    
    func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
    
    func (x byIndex) Less(i, j int) bool {
    	for k, xik := range x[i].index {
    		if k >= len(x[j].index) {
    			return false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 13.1K bytes
    - Viewed (0)
  2. pkg/controller/volume/ephemeral/controller.go

    	// an ephemeral volume, then we should re-create the PVC.
    	// The common indexer does some prefiltering for us by
    	// limiting the list to those pods which reference
    	// the PVC.
    	objs, err := ec.podIndexer.ByIndex(common.PodPVCIndex, fmt.Sprintf("%s/%s", pvc.Namespace, pvc.Name))
    	if err != nil {
    		runtime.HandleError(fmt.Errorf("listing pods from cache: %v", err))
    		return
    	}
    	for _, obj := range objs {
    		ec.enqueuePod(obj)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  3. pkg/controller/resourceclaim/controller.go

    		logger.V(6).Info("not enqueing deleted claim", "claim", klog.KObj(claim))
    	}
    
    	// Also check whether this causes work for any of the currently
    	// known pods which use the ResourceClaim.
    	objs, err := ec.podIndexer.ByIndex(podResourceClaimIndex, fmt.Sprintf("%s/%s", claim.Namespace, claim.Name))
    	if err != nil {
    		logger.Error(err, "listing pods from cache")
    		return
    	}
    	if len(objs) == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 03:34:25 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  4. pkg/controller/volume/pvcprotection/pvc_protection_controller.go

    	logger.V(4).Info("Looking for Pods using PVC in the Informer's cache", "PVC", klog.KObj(pvc))
    
    	// The indexer is used to find pods which might use the PVC.
    	objs, err := c.podIndexer.ByIndex(common.PodPVCIndex, fmt.Sprintf("%s/%s", pvc.Namespace, pvc.Name))
    	if err != nil {
    		return false, fmt.Errorf("cache-based list of pods failed while processing %s/%s: %s", pvc.Namespace, pvc.Name, err.Error())
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 14K bytes
    - Viewed (0)
  5. pkg/controller/tainteviction/taint_eviction.go

    		nodeLister:       nodeInformer.Lister(),
    		nodeListerSynced: nodeInformer.Informer().HasSynced,
    		getPodsAssignedToNode: func(nodeName string) ([]*v1.Pod, error) {
    			objs, err := podIndexer.ByIndex("spec.nodeName", nodeName)
    			if err != nil {
    				return nil, err
    			}
    			pods := make([]*v1.Pod, 0, len(objs))
    			for _, obj := range objs {
    				pod, ok := obj.(*v1.Pod)
    				if !ok {
    					continue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  6. pkg/controller/serviceaccount/tokens_controller.go

    // reference the given service account's name and uid
    func (e *TokensController) listTokenSecrets(serviceAccount *v1.ServiceAccount) ([]*v1.Secret, error) {
    	namespaceSecrets, err := e.updatedSecrets.ByIndex("namespace", serviceAccount.Namespace)
    	if err != nil {
    		return nil, err
    	}
    
    	items := []*v1.Secret{}
    	for _, obj := range namespaceSecrets {
    		secret := obj.(*v1.Secret)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

    		// TODO: if multiple indexes match, return the one with the fewest items, so as to do as much filtering as possible.
    		for _, matchValue := range matchValues {
    			if result, err := w.store.ByIndex(matchValue.IndexName, matchValue.Value); err == nil {
    				return result, w.resourceVersion, matchValue.IndexName, nil
    			}
    		}
    		return w.store.List(), w.resourceVersion, "", nil
    	}()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 10:20:57 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  8. pkg/controller/volume/attachdetach/attach_detach_controller.go

    		return nil
    	}
    	if err != nil {
    		return err
    	}
    
    	if pvc.Status.Phase != v1.ClaimBound || pvc.Spec.VolumeName == "" {
    		// Skip unbound PVCs.
    		return nil
    	}
    
    	objs, err := adc.podIndexer.ByIndex(common.PodPVCIndex, key)
    	if err != nil {
    		return err
    	}
    	for _, obj := range objs {
    		pod, ok := obj.(*v1.Pod)
    		if !ok {
    			continue
    		}
    		// we are only interested in active pods with nodeName set
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.6K bytes
    - Viewed (0)
  9. pkg/controller/replicaset/replica_set.go

    	controllerRef := metav1.GetControllerOf(rs)
    	if controllerRef == nil {
    		utilruntime.HandleError(fmt.Errorf("ReplicaSet has no controller: %v", rs))
    		return nil
    	}
    
    	objects, err := rsc.rsIndexer.ByIndex(controllerUIDIndex, string(controllerRef.UID))
    	if err != nil {
    		utilruntime.HandleError(err)
    		return nil
    	}
    	relatedRSs := make([]*apps.ReplicaSet, 0, len(objects))
    	for _, obj := range objects {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go

    			return nil, statusError(logger, fmt.Errorf("get class parameters %s: %v", klog.KRef(class.Namespace, class.ParametersRef.Name), err))
    		}
    		return parameters, nil
    	}
    
    	objs, err := pl.classParametersIndexer.ByIndex(generatedFromIndex, classParametersReferenceKeyFunc(class.ParametersRef))
    	if err != nil {
    		return nil, statusError(logger, fmt.Errorf("listing class parameters failed: %v", err))
    	}
    	switch len(objs) {
    	case 0:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 15:22:37 UTC 2024
    - 75.9K bytes
    - Viewed (0)
Back to top