Merge pull request #104499 from liggitt/visitor-source

Propagate source to list items when flattening
This commit is contained in:
Kubernetes Prow Robot 2021-10-01 09:45:23 -07:00 committed by GitHub
commit d3b37e1f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -430,6 +430,10 @@ func (v FlattenListVisitor) Visit(fn VisitorFunc) error {
if len(info.ResourceVersion) != 0 {
item.ResourceVersion = info.ResourceVersion
}
// propagate list source to items source
if len(info.Source) != 0 {
item.Source = info.Source
}
if err := fn(item, nil); err != nil {
errs = append(errs, err)
}