fix populateDesiredStateOfWorld bug for attach/detach controller

This commit is contained in:
mlmhl 2018-01-01 21:35:13 +08:00
parent cfc1d47397
commit 0e6ac1df76

View File

@ -335,7 +335,7 @@ func (adc *attachDetachController) populateDesiredStateOfWorld() error {
} }
for _, pod := range pods { for _, pod := range pods {
podToAdd := pod podToAdd := pod
adc.podAdd(&podToAdd) adc.podAdd(podToAdd)
for _, podVolume := range podToAdd.Spec.Volumes { for _, podVolume := range podToAdd.Spec.Volumes {
// The volume specs present in the ActualStateOfWorld are nil, let's replace those // The volume specs present in the ActualStateOfWorld are nil, let's replace those
// with the correct ones found on pods. The present in the ASW with no corresponding // with the correct ones found on pods. The present in the ASW with no corresponding