Add httpHeaders to httpGet liveness probe

Also update existing documentation and try to steer users away from 'host'.
Add validation.
This commit is contained in:
Rudi Chiarito
2016-02-02 10:03:50 -05:00
parent faa0fc3d8c
commit a2d1bb7acf
27 changed files with 30025 additions and 28798 deletions

View File

@@ -1128,6 +1128,11 @@ func validateHTTPGetAction(http *api.HTTPGetAction, fldPath *field.Path) field.E
if !supportedSchemes.Has(string(http.Scheme)) {
allErrors = append(allErrors, field.Invalid(fldPath.Child("scheme"), http.Scheme, fmt.Sprintf("must be one of %v", supportedSchemes.List())))
}
for _, header := range http.HTTPHeaders {
if !validation.IsHTTPHeaderName(header.Name) {
allErrors = append(allErrors, field.Invalid(fldPath.Child("httpHeaders"), header.Name, fmt.Sprintf("name must match %s", validation.HTTPHeaderNameFmt)))
}
}
return allErrors
}