improve serviceaccount projected volume validation error info by providing source index info

pull/8/head
WanLinghao 2018-08-02 15:51:13 +08:00
parent 23111ad414
commit c72491aee7
1 changed files with 1 additions and 1 deletions

View File

@ -1022,7 +1022,7 @@ func validateProjectionSources(projection *core.ProjectedVolumeSource, projectio
}
}
}
if projPath := fldPath.Child("serviceAccountToken"); source.ServiceAccountToken != nil {
if projPath := srcPath.Child("serviceAccountToken"); source.ServiceAccountToken != nil {
numSources++
if !utilfeature.DefaultFeatureGate.Enabled(features.TokenRequestProjection) {
allErrs = append(allErrs, field.Forbidden(projPath, "TokenRequestProjection feature is not enabled"))