Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for GetLocalPersistentVolumeNodeNames (0.35 sec)

  1. pkg/volume/util/util.go

    func IsLocalEphemeralVolume(volume v1.Volume) bool {
    	return volume.GitRepo != nil ||
    		(volume.EmptyDir != nil && volume.EmptyDir.Medium == v1.StorageMediumDefault) ||
    		volume.ConfigMap != nil
    }
    
    // GetLocalPersistentVolumeNodeNames returns the node affinity node name(s) for
    // local PersistentVolumes. nil is returned if the PV does not have any
    // specific node affinity node selector terms and match expressions.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 12:32:15 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  2. pkg/volume/util/util_test.go

    			},
    			expectedNodeNames: []string{
    				"node1",
    				"node2",
    			},
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			nodeNames := GetLocalPersistentVolumeNodeNames(test.pv)
    			if diff := cmp.Diff(test.expectedNodeNames, nodeNames); diff != "" {
    				t.Errorf("Unexpected nodeNames (-want, +got):\n%s", diff)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 12:32:15 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/volumebinding/binder.go

    			errs = append(errs, err)
    			continue
    		}
    
    		// if the PersistentVolume is local and has node affinity matching specific node(s),
    		// add them to the eligible nodes
    		nodeNames := util.GetLocalPersistentVolumeNodeNames(pv)
    		if len(nodeNames) != 0 {
    			// on the first found list of eligible nodes for the local PersistentVolume,
    			// insert to the eligible node set.
    			if eligibleNodes == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 14:55:34 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top