Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for GetCSIAttachLimitKey (0.22 sec)

  1. pkg/volume/util/attach_limit.go

    	CSIAttachLimitPrefix = "attachable-volumes-csi-"
    
    	// ResourceNameLengthLimit stores maximum allowed Length for a ResourceName
    	ResourceNameLengthLimit = 63
    )
    
    // GetCSIAttachLimitKey returns limit key used for CSI volumes
    func GetCSIAttachLimitKey(driverName string) string {
    	csiPrefixLength := len(CSIAttachLimitPrefix)
    	totalkeyLength := csiPrefixLength + len(driverName)
    	if totalkeyLength >= ResourceNameLengthLimit {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 10 17:25:30 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  2. pkg/volume/util/attach_limit_test.go

    	// When driverName is less than 39 characters
    	csiLimitKey := GetCSIAttachLimitKey("com.amazon.ebs")
    	if csiLimitKey != "attachable-volumes-csi-com.amazon.ebs" {
    		t.Errorf("Expected com.amazon.ebs got %s", csiLimitKey)
    	}
    
    	// When driver is longer than 39 chars
    	longDriverName := "com.amazon.kubernetes.eks.ec2.ebs/csi-driver"
    	csiLimitKeyLonger := GetCSIAttachLimitKey(longDriverName)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 05 16:29:00 UTC 2018
    - 1.7K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/nodevolumelimits/csi.go

    		for i := range csiNode.Spec.Drivers {
    			d := csiNode.Spec.Drivers[i]
    			if d.Allocatable != nil && d.Allocatable.Count != nil {
    				// TODO: drop GetCSIAttachLimitKey once we don't get values from Node object (v1.18)
    				k := v1.ResourceName(volumeutil.GetCSIAttachLimitKey(d.Name))
    				nodeVolumeLimits[k] = int64(*d.Allocatable.Count)
    			}
    		}
    	}
    	return nodeVolumeLimits
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 18:07:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. pkg/volume/csi/nodeinfomanager/nodeinfomanager_test.go

    						v1.ResourceCPU: *resource.NewScaledQuantity(4, -3),
    						v1.ResourceName(util.GetCSIAttachLimitKey("com.example.csi/driver1")): *resource.NewQuantity(10, resource.DecimalSI),
    					},
    					Allocatable: v1.ResourceList{
    						v1.ResourceCPU: *resource.NewScaledQuantity(4, -3),
    						v1.ResourceName(util.GetCSIAttachLimitKey("com.example.csi/driver1")): *resource.NewQuantity(10, resource.DecimalSI),
    					},
    				},
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 17 02:02:59 UTC 2022
    - 34.3K bytes
    - Viewed (0)
  5. pkg/volume/csi/nodeinfomanager/nodeinfomanager.go

    	return err // do not wrap error
    
    }
    
    func removeMaxAttachLimit(driverName string) nodeUpdateFunc {
    	return func(node *v1.Node) (*v1.Node, bool, error) {
    		limitKey := v1.ResourceName(util.GetCSIAttachLimitKey(driverName))
    
    		capacityExists := false
    		if node.Status.Capacity != nil {
    			_, capacityExists = node.Status.Capacity[limitKey]
    		}
    
    		allocatableExists := false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 09:02:45 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/nodevolumelimits/csi_test.go

    		return v1.ResourceName(volumeutil.AzureVolumeLimitKey)
    	case cinderVolumeFilterType:
    		return v1.ResourceName(volumeutil.CinderVolumeLimitKey)
    	default:
    		return v1.ResourceName(volumeutil.GetCSIAttachLimitKey(filterType))
    	}
    }
    
    func TestCSILimits(t *testing.T) {
    	runningPod := st.MakePod().PVC("csi-ebs.csi.aws.com-3").Obj()
    	pendingVolumePod := st.MakePod().PVC("csi-4").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)
Back to top