Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getPersistentVolumeClaims (0.3 sec)

  1. pkg/controller/statefulset/stateful_pod_control_test.go

    }
    
    func TestStatefulPodControlCreatePodExists(t *testing.T) {
    	recorder := record.NewFakeRecorder(10)
    	set := newStatefulSet(3)
    	pod := newStatefulSetPod(set, 0)
    	fakeClient := &fake.Clientset{}
    	pvcs := getPersistentVolumeClaims(set, pod)
    	pvcIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
    	for k := range pvcs {
    		pvc := pvcs[k]
    		pvcIndexer.Add(&pvc)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 35.5K bytes
    - Viewed (0)
  2. pkg/controller/statefulset/stateful_pod_control.go

    	if policy.WhenScaled == apps.RetainPersistentVolumeClaimRetentionPolicyType {
    		// PVCs are meant to be reused and so can't be stale.
    		return false, nil
    	}
    	for _, claim := range getPersistentVolumeClaims(set, pod) {
    		pvc, err := spc.objectMgr.GetClaim(claim.Namespace, claim.Name)
    		switch {
    		case apierrors.IsNotFound(err):
    			// If the claim doesn't exist yet, it can't be stale.
    			continue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  3. pkg/controller/statefulset/stateful_set_utils.go

    	}
    
    	return append(refs, *metav1.NewControllerRef(owner, gvk))
    }
    
    // getPersistentVolumeClaims gets a map of PersistentVolumeClaims to their template names, as defined in set. The
    // returned PersistentVolumeClaims are each constructed with a the name specific to the Pod. This name is determined
    // by getPersistentVolumeClaimName.
    func getPersistentVolumeClaims(set *apps.StatefulSet, pod *v1.Pod) map[string]v1.PersistentVolumeClaim {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  4. pkg/controller/statefulset/stateful_set_utils_test.go

    func TestGetPersistentVolumeClaims(t *testing.T) {
    
    	// nil inherits statefulset labels
    	pod := newPod()
    	statefulSet := newStatefulSet(1)
    	statefulSet.Spec.Selector.MatchLabels = nil
    	claims := getPersistentVolumeClaims(statefulSet, pod)
    	pvc := newPVC("datadir-foo-0")
    	resultClaims := map[string]v1.PersistentVolumeClaim{"datadir": pvc}
    
    	if !reflect.DeepEqual(claims, resultClaims) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 50.9K bytes
    - Viewed (0)
Back to top