Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for podKeys (0.34 sec)

  1. pkg/controller/replicaset/replica_set.go

    	}
    	return controller.ActivePodsWithRanks{Pods: podsToRank, Rank: ranks, Now: metav1.Now()}
    }
    
    func getPodKeys(pods []*v1.Pod) []string {
    	podKeys := make([]string, 0, len(pods))
    	for _, pod := range pods {
    		podKeys = append(podKeys, controller.PodKey(pod))
    	}
    	return podKeys
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  2. pkg/controller/replicaset/replica_set_test.go

    		},
    	}
    
    	for _, test := range tests {
    		podKeys := getPodKeys(test.pods)
    		if len(podKeys) != len(test.expectedPodKeys) {
    			t.Errorf("%s: unexpected keys for pods to delete, expected %v, got %v", test.name, test.expectedPodKeys, podKeys)
    		}
    		for i := 0; i < len(podKeys); i++ {
    			if podKeys[i] != test.expectedPodKeys[i] {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 69.2K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/types.go

    // String returns representation of human readable format of this NodeInfo.
    func (n *NodeInfo) String() string {
    	podKeys := make([]string, len(n.Pods))
    	for i, p := range n.Pods {
    		podKeys[i] = p.Pod.Name
    	}
    	return fmt.Sprintf("&NodeInfo{Pods:%v, RequestedResource:%#v, NonZeroRequest: %#v, UsedPort: %#v, AllocatableResource:%#v}",
    		podKeys, n.Requested, n.NonZeroRequested, n.UsedPorts, n.Allocatable)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 19:28:17 UTC 2024
    - 36.7K bytes
    - Viewed (0)
  4. pkg/controller/volume/ephemeral/controller_test.go

    			expectedMetrics: expectedMetrics{1, 0},
    		},
    		{
    			name:   "no-such-pod",
    			podKey: podKey(testPodWithEphemeral),
    		},
    		{
    			name: "pod-deleted",
    			pods: func() []*v1.Pod {
    				deleted := metav1.Now()
    				pods := []*v1.Pod{testPodWithEphemeral.DeepCopy()}
    				pods[0].DeletionTimestamp = &deleted
    				return pods
    			}(),
    			podKey: podKey(testPodWithEphemeral),
    		},
    		{
    			name:   "no-volumes",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. pkg/controller/resourceclaim/controller_test.go

    			pods:          []*v1.Pod{testPodWithResource},
    			templates:     nil,
    			key:           podKey(testPodWithResource),
    			expectedError: true,
    		},
    		{
    			name:           "find-existing-claim-by-label",
    			pods:           []*v1.Pod{testPodWithResource},
    			key:            podKey(testPodWithResource),
    			claims:         []*resourcev1alpha2.ResourceClaim{generatedTestClaim},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 06 08:56:16 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  6. tools/bug-report/pkg/cluster/cluster.go

    				if c.Name == inject.ProxyContainerName {
    					out.insertContainer(p.Namespace, deployment, p.Name, c.Name)
    				}
    			}
    		}
    
    		out.Labels[PodKey(p.Namespace, p.Name)] = p.Labels
    		out.Annotations[PodKey(p.Namespace, p.Name)] = p.Annotations
    		out.Pod[PodKey(p.Namespace, p.Name)] = &pods.Items[i]
    	}
    
    	return out, nil
    }
    
    // Resources defines a tree of cluster resource names.
    type Resources struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 14 02:11:31 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/kube/controller/pod.go

    	return pmap
    }
    
    // deleteIP returns true if the pod and ip are really deleted.
    func (pc *PodCache) deleteIP(ip string, podKey types.NamespacedName) bool {
    	pc.Lock()
    	defer pc.Unlock()
    	if pc.podsByIP[ip].Contains(podKey) {
    		sets.DeleteCleanupLast(pc.podsByIP, ip, podKey)
    		delete(pc.IPByPods, podKey)
    		return true
    	}
    	return false
    }
    
    func (pc *PodCache) addPod(pod *v1.Pod, ip string, key types.NamespacedName) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. pkg/scheduler/internal/cache/cache.go

    			logger.V(5).Info("Could not expire cache for pod as binding is still in progress", "podKey", key, "pod", klog.KObj(ps.pod))
    			continue
    		}
    		if cache.ttl != 0 && now.After(*ps.deadline) {
    			logger.Info("Pod expired", "podKey", key, "pod", klog.KObj(ps.pod))
    			if err := cache.removePod(logger, ps.pod); err != nil {
    				logger.Error(err, "ExpirePod failed", "podKey", key, "pod", klog.KObj(ps.pod))
    			}
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 09:56:48 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/nodevolumelimits/csi_test.go

    		})
    	}
    }
    
    func TestCSILimitsQHint(t *testing.T) {
    	podEbs := st.MakePod().PVC("csi-ebs.csi.aws.com-2")
    
    	tests := []struct {
    		newPod                 *v1.Pod
    		deletedPod             *v1.Pod
    		deletedPodNotScheduled bool
    		test                   string
    		wantQHint              framework.QueueingHint
    	}{
    		{
    			newPod:     podEbs.Obj(),
    			deletedPod: st.MakePod().PVC("placeholder").Obj(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 18:07:11 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  10. pkg/controller/volume/ephemeral/controller.go

    			return nil
    		}
    		logger.V(5).Info("Error getting pod from informer", "pod", klog.KObj(pod), "podUID", pod.UID, "err", err)
    		return err
    	}
    
    	// Ignore pods which are already getting deleted.
    	if pod.DeletionTimestamp != nil {
    		logger.V(5).Info("Ephemeral: nothing to do for pod, it is marked for deletion", "podKey", key)
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 9.2K bytes
    - Viewed (0)
Back to top