code: func updateStorage(set *apps.StatefulSet, pod *v1.Pod) {
  	currentVolumes := pod.Spec.Volumes
  	claims := getPersistentVolumeClaims(set, pod)
  	newVolumes := make([]v1.Volume, 0, len(claims))
  	for name, claim := range claims {
  		newVolumes = append(newVolumes, v1.Volume{
  			Name: name,
  			VolumeSource: v1.VolumeSource{
  				PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{
  					ClaimName: claim.Name,
  					// TODO: Use source definition to set this value when we have one.
  					ReadOnly: false,
  				},
  			},
  		})
  	}
  	for i := range currentVolumes {
  		if _, ok := claims[currentVolumes[i].Name]; !ok {
  			newVolumes = append(newVolumes, currentVolumes[i])
  		}
  	}
  	pod.Spec.Volumes = newVolumes
  }
docs: // updateStorage updates pod's Volumes to conform with the PersistentVolumeClaim of set's templates. If pod has
  // conflicting local Volumes these are replaced with Volumes that conform to the set's templates.