mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
move pod-check forward
This commit is contained in:
parent
d6cabaf706
commit
6e50240ce1
@ -328,6 +328,10 @@ func (vm *volumeManager) MarkVolumesAsReportedInUse(
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (vm *volumeManager) WaitForAttachAndMount(pod *v1.Pod) error {
|
func (vm *volumeManager) WaitForAttachAndMount(pod *v1.Pod) error {
|
||||||
|
if pod == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
expectedVolumes := getExpectedVolumes(pod)
|
expectedVolumes := getExpectedVolumes(pod)
|
||||||
if len(expectedVolumes) == 0 {
|
if len(expectedVolumes) == 0 {
|
||||||
// No volumes to verify
|
// No volumes to verify
|
||||||
@ -402,9 +406,6 @@ func filterUnmountedVolumes(mountedVolumes sets.String, expectedVolumes []string
|
|||||||
// consider the volume setup step for this pod satisfied.
|
// consider the volume setup step for this pod satisfied.
|
||||||
func getExpectedVolumes(pod *v1.Pod) []string {
|
func getExpectedVolumes(pod *v1.Pod) []string {
|
||||||
expectedVolumes := []string{}
|
expectedVolumes := []string{}
|
||||||
if pod == nil {
|
|
||||||
return expectedVolumes
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, podVolume := range pod.Spec.Volumes {
|
for _, podVolume := range pod.Spec.Volumes {
|
||||||
expectedVolumes = append(expectedVolumes, podVolume.Name)
|
expectedVolumes = append(expectedVolumes, podVolume.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user