Change EnvVarSource.FieldPath -> FieldRef and add example

This commit is contained in:
Paul Morie
2015-05-04 13:31:36 -04:00
parent b0129089da
commit e949a623ff
18 changed files with 88 additions and 36 deletions

View File

@@ -591,9 +591,9 @@ func validateEnvVarValueFrom(ev api.EnvVar) errs.ValidationErrorList {
numSources := 0
switch {
case ev.ValueFrom.FieldPath != nil:
case ev.ValueFrom.FieldRef != nil:
numSources++
allErrs = append(allErrs, validateObjectFieldSelector(ev.ValueFrom.FieldPath).Prefix("fieldPath")...)
allErrs = append(allErrs, validateObjectFieldSelector(ev.ValueFrom.FieldRef).Prefix("fieldRef")...)
}
if ev.Value != "" && numSources != 0 {