Merge pull request #113129 from chaunceyjiang/pr_remove_redundant_conversion

Remove redundant type conversion
This commit is contained in:
Kubernetes Prow Robot 2022-10-18 10:23:19 -07:00 committed by GitHub
commit 23721935d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -143,9 +143,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
}