mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Remove redundant type conversion
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
parent
64b98495ec
commit
d2b372e029
@ -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:
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user