Merge pull request #34533 from yuexiao-wang/fix-commends

Automatic merge from submit-queue

Update function name for public function in commend

**What this PR does / why we need it**:
Update function name for public function in commend and fix some typos in log information.

Signed-off-by: yuexiao-wang wang.yuexiao@zte.com.cn
This commit is contained in:
Kubernetes Submit Queue
2017-01-30 09:05:22 -08:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error)
return accessor.GetNamespace(), nil
}
return "", fmt.Errorf("Unsupported fieldPath: %v", fieldPath)
return "", fmt.Errorf("unsupported fieldPath: %v", fieldPath)
}
// TODO: move the functions below to pkg/api/util/resources
@@ -146,7 +146,7 @@ func InternalExtractContainerResourceValue(fs *api.ResourceFieldSelector, contai
return convertResourceMemoryToString(container.Resources.Requests.Memory(), divisor)
}
return "", fmt.Errorf("Unsupported container resource : %v", fs.Resource)
return "", fmt.Errorf("unsupported container resource : %v", fs.Resource)
}
// findContainerInPod finds a container by its name in the provided pod
@@ -159,7 +159,7 @@ func findContainerInPod(pod *v1.Pod, containerName string) (*v1.Container, error
return nil, fmt.Errorf("container %s not found", containerName)
}
// convertResourceCPUTOString converts cpu value to the format of divisor and returns
// convertResourceCPUToString converts cpu value to the format of divisor and returns
// ceiling of the value.
func convertResourceCPUToString(cpu *resource.Quantity, divisor resource.Quantity) (string, error) {
c := int64(math.Ceil(float64(cpu.MilliValue()) / float64(divisor.MilliValue())))