Add status.podIP as a valid downward API target

Getting the public IP a container is supposed to use is O(hard),
and usually involves ugly gyrations in python or with interfaces.
Using the downward API means that the IP Kube is announcing to
other endpoints is also visible inside the container for pods to
identify themselves.
This commit is contained in:
Clayton Coleman
2015-08-12 14:14:49 -04:00
parent b29311ba2b
commit 01f3785426
8 changed files with 30 additions and 5 deletions

View File

@@ -680,7 +680,7 @@ func validateEnvVarValueFrom(ev api.EnvVar) errs.ValidationErrorList {
return allErrs
}
var validFieldPathExpressions = util.NewStringSet("metadata.name", "metadata.namespace")
var validFieldPathExpressions = util.NewStringSet("metadata.name", "metadata.namespace", "status.podIP")
func validateObjectFieldSelector(fs *api.ObjectFieldSelector) errs.ValidationErrorList {
allErrs := errs.ValidationErrorList{}