Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 314 for pvc0 (0.12 sec)

  1. pkg/scheduler/internal/cache/snapshot_test.go

    	}
    	podsWithPVCs := []*v1.Pod{
    		st.MakePod().Name("foo").Namespace("foo").Node("node-0").PVC("pvc0").Obj(),
    		st.MakePod().Name("bar").Namespace("bar").Node("node-1").PVC("pvc1").Obj(),
    		st.MakePod().Name("baz").Namespace("baz").Node("node-2").PVC("pvc2").Obj(),
    	}
    	testCases := []struct {
    		name                         string
    		pods                         []*v1.Pod
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 05 08:00:25 UTC 2023
    - 12K bytes
    - Viewed (0)
  2. plugin/pkg/auth/authorizer/node/node_authorizer_test.go

    			expect: authorizer.DecisionAllow,
    		},
    		{
    			name:   "allowed shared secret via pvc",
    			attrs:  authorizer.AttributesRecord{User: node0, ResourceRequest: true, Verb: "get", Resource: "secrets", Name: "secret-pv0-pod0-node0-ns0", Namespace: "ns0"},
    			expect: authorizer.DecisionAllow,
    		},
    		{
    			name:   "allowed pvc",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/volumebinding/assume_cache_test.go

    	pvc := makeClaim(pvcName, "1", pvcNamespace)
    	assumecache.AddTestObject(cache.AssumeCache, pvc)
    	if err := verifyPVC(cache, getPVCName(pvc), pvc); err != nil {
    		t.Fatalf("failed to get PVC: %v", err)
    	}
    
    	// Assume PVC
    	newPVC := pvc.DeepCopy()
    	newPVC.Annotations[volume.AnnSelectedNode] = "test-node"
    	if err := cache.Assume(newPVC); err != nil {
    		t.Fatalf("failed to assume PVC: %v", err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 09:46:58 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  4. pkg/scheduler/internal/cache/cache_test.go

    		podsWithAffinity = append(podsWithAffinity, pod)
    	}
    
    	// Add a few of pods with PVC
    	var podsWithPVC []*v1.Pod
    	for i := 0; i < 8; i++ {
    		pod := st.MakePod().Name(fmt.Sprintf("p-pvc-%v", i)).Namespace("test-ns").UID(fmt.Sprintf("puid-pvc-%v", i)).
    			PVC(fmt.Sprintf("test-pvc%v", i%4)).Node(fmt.Sprintf("test-node%v", i%2)).Obj()
    		podsWithPVC = append(podsWithPVC, pod)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 01:38:03 UTC 2023
    - 63.8K bytes
    - Viewed (0)
  5. plugin/pkg/admission/storage/persistentvolume/resize/admission.go

    		return admission.NewForbidden(a, fmt.Errorf("only dynamically provisioned pvc can be resized and "+
    			"the storageclass that provisions the pvc must support resize"))
    	}
    
    	return nil
    }
    
    // Growing Persistent volumes is only allowed for PVCs for which their StorageClass
    // explicitly allows it.
    func (pvcr *persistentVolumeClaimResize) allowResize(pvc, oldPvc *api.PersistentVolumeClaim) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 20 15:11:00 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  6. pkg/scheduler/util/assumecache/assume_cache_test.go

    		expectErr error
    	}{
    		"success-same-version": {
    			oldObj: makeObj("pvc1", "5", ""),
    			newObj: makeObj("pvc1", "5", ""),
    		},
    		"success-new-higher-version": {
    			oldObj: makeObj("pvc1", "5", ""),
    			newObj: makeObj("pvc1", "6", ""),
    		},
    		"fail-old-not-found": {
    			oldObj:    makeObj("pvc2", "5", ""),
    			newObj:    makeObj("pvc1", "5", ""),
    			expectErr: ErrNotFound,
    		},
    		"fail-new-lower-version": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 09:46:58 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. pkg/volume/util/resize_util_test.go

    			pvc := tc.pvc
    			kubeClient := fake.NewSimpleClientset(pvc)
    
    			var err error
    
    			pvc, err = tc.testFunc(pvc, kubeClient, resource.MustParse("10Gi"))
    			if err != nil {
    				t.Errorf("Expected no error but got %v", err)
    			}
    			realStatus := pvc.Status.AllocatedResourceStatuses
    			expectedStatus := tc.expectedPVC.Status.AllocatedResourceStatuses
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/volumebinding/test_utils.go

    		},
    	}}
    }
    
    func (pvcb pvcBuilder) withBoundPV(pvName string) pvcBuilder {
    	pvcb.PersistentVolumeClaim.Spec.VolumeName = pvName
    	metav1.SetMetaDataAnnotation(&pvcb.PersistentVolumeClaim.ObjectMeta, volume.AnnBindCompleted, "true")
    	return pvcb
    }
    
    func (pvcb pvcBuilder) withRequestStorage(request resource.Quantity) pvcBuilder {
    	pvcb.PersistentVolumeClaim.Spec.Resources = v1.VolumeResourceRequirements{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 13 07:42:19 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/volumebinding/binder_test.go

    				pvc := pvcs[0]
    				// Delete PVC will fail check
    				if err := testEnv.client.CoreV1().PersistentVolumeClaims(pvc.Namespace).Delete(ctx, pvc.Name, metav1.DeleteOptions{}); err != nil {
    					t.Errorf("failed to delete PVC %q: %v", pvc.Name, err)
    				}
    			},
    			shouldFail: true,
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 09:46:58 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  10. pkg/controller/volume/ephemeral/controller_test.go

    		Controller:         &isController,
    		BlockOwnerDeletion: &isTrue,
    	}
    }
    
    func sortPVCs(pvcs []v1.PersistentVolumeClaim) []v1.PersistentVolumeClaim {
    	sort.Slice(pvcs, func(i, j int) bool {
    		return pvcs[i].Namespace < pvcs[j].Namespace ||
    			pvcs[i].Name < pvcs[j].Name
    	})
    	return pvcs
    }
    
    func createTestClient(objects ...runtime.Object) *fake.Clientset {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top