func CollectData ¶
func CollectData(items v1.DownwardAPIVolumeFile, pod *v1.Pod, host volume.VolumeHost, defaultMode *int32) (map[string]volumeutil.FileProjection, error)
CollectData collects requested downwardAPI in data map. Map's key is the requested name of file to dump Map's value is the (sorted) content of the field to be dumped in the file.
Note: this function is exported so that it can be called from the projection volume driver