provider_test.go: use existing method instead of own copy of it.

Also:
- rename variables according to its meaning
- improve godoc comment
This commit is contained in:
Slava Semushin
2017-08-09 17:50:04 +02:00
parent 6a0d3c7494
commit 93a9186e8e
2 changed files with 5 additions and 24 deletions

View File

@@ -324,7 +324,7 @@ func (s *simpleProvider) ValidateContainerSecurityContext(pod *api.Pod, containe
return allErrs
}
// hasHostPort checks the port definitions on the container for HostPort > 0.
// hasInvalidHostPort checks whether the port definitions on the container fall outside of the ranges allowed by the PSP.
func (s *simpleProvider) hasInvalidHostPort(container *api.Container, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
for _, cp := range container.Ports {