Change:
Apparently volumes with are incorrectly to : /sig storage /assign
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
RestartPolicy: v1.RestartPolicyOnFailure, }, } <del> var volumeMounts = make([]v1.VolumeMount, len(pvclaims)) var volumes = make([]v1.Volume, len(pvclaims)) for index, pvclaim := range pvclaims { volumename := fmt.Sprintf("volume%v", index+1) volumeMounts[index] = v1.VolumeMount{Name: volumename, MountPath: "/mnt/" + volumename} volumes[index] = v1.Volume{Name: volumename, VolumeSource: v1.VolumeSource{PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ClaimName: pvclaim.Name, ReadOnly: false}}} } podSpec.Spec.Containers[0].VolumeMounts = volumeMounts podSpec.Spec.Volumes = volumes </del> <ins> setVolumes(&podSpec.Spec, pvclaims, nil /*inline volume sources*/, false /*PVCs readonly*/) </ins> if nodeSelector != nil { podSpec.Spec.NodeSelector = nodeSelector }

podSpec.SecurityContext.FSGroupChangePolicy = podConfig.PodFSGroupChangePolicy } <ins> setVolumes(podSpec, podConfig.PVCs, podConfig.InlineVolumeSources, podConfig.PVCsReadOnly) SetNodeSelection(podSpec, podConfig.NodeSelection) return podSpec } func setVolumes(podSpec *v1.PodSpec, pvcs []*v1.PersistentVolumeClaim, inlineVolumeSources []*v1.VolumeSource, pvcsReadOnly bool) { </ins> var volumeMounts = make([]v1.VolumeMount, 0) var volumeDevices = make([]v1.VolumeDevice, 0) <del> var volumes = make([]v1.Volume, len(podConfig.PVCs)+len(podConfig.InlineVolumeSources)) </del> <ins> var volumes = make([]v1.Volume, len(pvcs)+len(inlineVolumeSources)) </ins> volumeIndex := 0 <del> for _, pvclaim := range podConfig.PVCs { </del> <ins> for _, pvclaim := range pvcs { </ins> volumename := fmt.Sprintf("volume%v", volumeIndex+1) if pvclaim.Spec.VolumeMode != nil && *pvclaim.Spec.VolumeMode == v1.PersistentVolumeBlock { volumeDevices = append(volumeDevices, v1.VolumeDevice{Name: volumename, DevicePath: "/mnt/" + volumename}) } else { volumeMounts = append(volumeMounts, v1.VolumeMount{Name: volumename, MountPath: "/mnt/" + volumename}) } <del> volumes[volumeIndex] = v1.Volume{Name: volumename, VolumeSource: v1.VolumeSource{PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ClaimName: pvclaim.Name, ReadOnly: podConfig.PVCsReadOnly}}} </del> <ins> volumes[volumeIndex] = v1.Volume{ Name: volumename, VolumeSource: v1.VolumeSource{ PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ ClaimName: pvclaim.Name, ReadOnly:  pvcsReadOnly, }, }, } </ins> volumeIndex++ } <del> for _, src := range podConfig.InlineVolumeSources { </del> <ins> for _, src := range inlineVolumeSources { </ins> volumename := fmt.Sprintf("volume%v", volumeIndex+1) // In-line volumes can be only filesystem, not block. volumeMounts = append(volumeMounts, v1.VolumeMount{Name: volumename, MountPath: "/mnt/" + volumename}) volumes[volumeIndex] = v1.Volume{Name: volumename, VolumeSource: *src} volumeIndex++ } podSpec.Containers[0].VolumeMounts = volumeMounts podSpec.Containers[0].VolumeDevices = volumeDevices podSpec.Volumes = volumes <del> SetNodeSelection(podSpec, podConfig.NodeSelection) return podSpec </del> }