mirror of https://github.com/k3s-io/k3s
improve serviceaccount projected volume validation error info by providing source index info
parent
23111ad414
commit
c72491aee7
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue