mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	update structured log for fake_cpu_manager.go
This commit is contained in:
		@@ -32,36 +32,36 @@ type fakeManager struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) Start(activePods ActivePodsFunc, sourcesReady config.SourcesReady, podStatusProvider status.PodStatusProvider, containerRuntime runtimeService, initialContainers containermap.ContainerMap) error {
 | 
			
		||||
	klog.Info("[fake cpumanager] Start()")
 | 
			
		||||
	klog.Info("Start()")
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) Policy() Policy {
 | 
			
		||||
	klog.Info("[fake cpumanager] Policy()")
 | 
			
		||||
	klog.InfoS("Policy()")
 | 
			
		||||
	return NewNonePolicy()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) Allocate(pod *v1.Pod, container *v1.Container) error {
 | 
			
		||||
	klog.Infof("[fake cpumanager] Allocate (pod: %s, container: %s", pod.Name, container.Name)
 | 
			
		||||
	klog.InfoS("Allocate", "pod", klog.KObj(pod), "containerName", container.Name)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) AddContainer(pod *v1.Pod, container *v1.Container, containerID string) {
 | 
			
		||||
	klog.Infof("[fake cpumanager] AddContainer (pod: %s, container: %s, container id: %s)", pod.Name, container.Name, containerID)
 | 
			
		||||
	klog.InfoS("AddContainer", "pod", klog.KObj(pod), "containerName", container.Name, "containerID", containerID)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) RemoveContainer(containerID string) error {
 | 
			
		||||
	klog.Infof("[fake cpumanager] RemoveContainer (container id: %s)", containerID)
 | 
			
		||||
	klog.InfoS("RemoveContainer", "containerID", containerID)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) GetTopologyHints(pod *v1.Pod, container *v1.Container) map[string][]topologymanager.TopologyHint {
 | 
			
		||||
	klog.Infof("[fake cpumanager] Get Container Topology Hints")
 | 
			
		||||
	klog.InfoS("Get Container Topology Hints")
 | 
			
		||||
	return map[string][]topologymanager.TopologyHint{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) GetPodTopologyHints(pod *v1.Pod) map[string][]topologymanager.TopologyHint {
 | 
			
		||||
	klog.Infof("[fake cpumanager] Get Pod Topology Hints")
 | 
			
		||||
	klog.InfoS("Get Pod Topology Hints")
 | 
			
		||||
	return map[string][]topologymanager.TopologyHint{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -70,12 +70,12 @@ func (m *fakeManager) State() state.Reader {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) GetCPUs(podUID, containerName string) cpuset.CPUSet {
 | 
			
		||||
	klog.Infof("[fake cpumanager] GetCPUs(podUID: %s, containerName: %s)", podUID, containerName)
 | 
			
		||||
	klog.InfoS("GetCPUs", "podUID", podUID, "containerName", container.Name)
 | 
			
		||||
	return cpuset.CPUSet{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *fakeManager) GetAllocatableCPUs() cpuset.CPUSet {
 | 
			
		||||
	klog.Infof("[fake cpumanager] Get Allocatable Cpus")
 | 
			
		||||
	klog.InfoS("Get Allocatable Cpus")
 | 
			
		||||
	return cpuset.CPUSet{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user