Remove redundant type conversion

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
chaunceyjiang 2022-10-18 14:37:40 +08:00
parent 64b98495ec
commit d2b372e029
2 changed files with 3 additions and 3 deletions

View File

@ -147,9 +147,9 @@ func (gcc *PodGCController) gcTerminating(ctx context.Context, pods []*v1.Pod) {
terminatingPods := []*v1.Pod{}
for _, pod := range pods {
if isPodTerminating(pod) {
node, err := gcc.nodeLister.Get(string(pod.Spec.NodeName))
node, err := gcc.nodeLister.Get(pod.Spec.NodeName)
if err != nil {
klog.Errorf("failed to get node %s : %s", string(pod.Spec.NodeName), err)
klog.Errorf("failed to get node %s : %s", pod.Spec.NodeName, err)
continue
}
// Add this pod to terminatingPods list only if the following conditions are met:

View File

@ -523,7 +523,7 @@ func (m *manager) updateContainerCPUSet(containerID string, cpus cpuset.CPUSet)
}
func (m *manager) GetExclusiveCPUs(podUID, containerName string) cpuset.CPUSet {
if result, ok := m.state.GetCPUSet(string(podUID), containerName); ok {
if result, ok := m.state.GetCPUSet(podUID, containerName); ok {
return result
}