Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for UpdateAllocatedDevices (0.24 sec)

  1. pkg/kubelet/apis/podresources/testing/provider_mock.go

    }
    
    // UpdateAllocatedDevices mocks base method.
    func (m *MockDevicesProvider) UpdateAllocatedDevices() {
    	m.ctrl.T.Helper()
    	m.ctrl.Call(m, "UpdateAllocatedDevices")
    }
    
    // UpdateAllocatedDevices indicates an expected call of UpdateAllocatedDevices.
    func (mr *MockDevicesProviderMockRecorder) UpdateAllocatedDevices() *gomock.Call {
    	mr.mock.ctrl.T.Helper()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  2. pkg/kubelet/apis/podresources/server_v1_test.go

    			mockDynamicResourcesProvider.EXPECT().GetDynamicResources(pods[0], &containers[0]).Return(tc.dynamicResources).AnyTimes()
    			mockDevicesProvider.EXPECT().UpdateAllocatedDevices().Return().AnyTimes()
    			mockCPUsProvider.EXPECT().GetAllocatableCPUs().Return([]int64{}).AnyTimes()
    			mockDevicesProvider.EXPECT().GetAllocatableDevices().Return([]*podresourcesapi.ContainerDevices{}).AnyTimes()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 45.9K bytes
    - Viewed (0)
  3. pkg/kubelet/apis/podresources/types.go

    )
    
    // DevicesProvider knows how to provide the devices used by the given container
    type DevicesProvider interface {
    	// UpdateAllocatedDevices frees any Devices that are bound to terminated pods.
    	UpdateAllocatedDevices()
    	// GetDevices returns information about the devices assigned to pods and containers
    	GetDevices(podUID, containerName string) []*podresourcesapi.ContainerDevices
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 17:33:04 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/devicemanager/types.go

    	// and is consulted to make Topology aware resource alignments per Pod
    	GetPodTopologyHints(pod *v1.Pod) map[string][]topologymanager.TopologyHint
    
    	// UpdateAllocatedDevices frees any Devices that are bound to terminated pods.
    	UpdateAllocatedDevices()
    }
    
    // DeviceRunContainerOptions contains the combined container runtime settings to consume its allocated devices.
    type DeviceRunContainerOptions struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 5K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/fake_container_manager.go

    	return topologymanager.NewFakeManager()
    }
    
    func (cm *FakeContainerManager) UpdateAllocatedDevices() {
    	cm.Lock()
    	defer cm.Unlock()
    	cm.CalledFunctions = append(cm.CalledFunctions, "UpdateAllocatedDevices")
    	return
    }
    
    func (cm *FakeContainerManager) GetCPUs(_, _ string) []int64 {
    	cm.Lock()
    	defer cm.Unlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 17:33:04 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  6. pkg/kubelet/apis/podresources/server_v1alpha1_test.go

    			mockPodsProvider.EXPECT().GetPods().Return(tc.pods).AnyTimes()
    			mockDevicesProvider.EXPECT().GetDevices(string(podUID), containerName).Return(tc.devices).AnyTimes()
    			mockDevicesProvider.EXPECT().UpdateAllocatedDevices().Return().AnyTimes()
    
    			providers := PodResourcesProviders{
    				Pods:    mockPodsProvider,
    				Devices: mockDevicesProvider,
    			}
    			server := NewV1alpha1PodResourcesServer(providers)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. pkg/kubelet/apis/podresources/server_v1alpha1.go

    	metrics.PodResourcesEndpointRequestsTotalCount.WithLabelValues("v1alpha1").Inc()
    	pods := p.podsProvider.GetPods()
    	podResources := make([]*v1alpha1.PodResources, len(pods))
    	p.devicesProvider.UpdateAllocatedDevices()
    
    	for i, pod := range pods {
    		pRes := v1alpha1.PodResources{
    			Name:       pod.Name,
    			Namespace:  pod.Namespace,
    			Containers: make([]*v1alpha1.ContainerResources, len(pod.Spec.Containers)),
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 17:33:01 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/devicemanager/topology_hints.go

    	// being cleaned before the admission ended
    	m.setPodPendingAdmission(pod)
    
    	// Garbage collect any stranded device resources before providing TopologyHints
    	m.UpdateAllocatedDevices()
    
    	// Loop through all device resources and generate TopologyHints for them.
    	deviceHints := make(map[string][]topologymanager.TopologyHint)
    	accumulatedResourceRequests := m.getContainerDeviceRequest(container)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jan 27 02:10:25 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/container_manager_stub.go

    }
    
    func (cm *containerManagerStub) GetAllocateResourcesPodAdmitHandler() lifecycle.PodAdmitHandler {
    	return topologymanager.NewFakeManager()
    }
    
    func (cm *containerManagerStub) UpdateAllocatedDevices() {
    	return
    }
    
    func (cm *containerManagerStub) GetCPUs(_, _ string) []int64 {
    	return nil
    }
    
    func (cm *containerManagerStub) GetAllocatableCPUs() []int64 {
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 15 02:26:59 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  10. pkg/kubelet/apis/podresources/server_v1.go

    	metrics.PodResourcesEndpointRequestsListCount.WithLabelValues("v1").Inc()
    
    	pods := p.podsProvider.GetPods()
    	podResources := make([]*podresourcesv1.PodResources, len(pods))
    	p.devicesProvider.UpdateAllocatedDevices()
    
    	for i, pod := range pods {
    		pRes := podresourcesv1.PodResources{
    			Name:       pod.Name,
    			Namespace:  pod.Namespace,
    			Containers: make([]*podresourcesv1.ContainerResources, 0, len(pod.Spec.Containers)),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 21 13:00:09 UTC 2024
    - 6.2K bytes
    - Viewed (0)
Back to top