Pass ctx to BindPodVolumes.

This commit is contained in:
kidddddddddddddddddddddd
2022-07-05 20:23:07 +08:00
parent 89aaf7c02d
commit c62479a6f1
4 changed files with 15 additions and 11 deletions

View File

@@ -16,7 +16,11 @@ limitations under the License.
package volumebinding
import v1 "k8s.io/api/core/v1"
import (
"context"
v1 "k8s.io/api/core/v1"
)
// FakeVolumeBinderConfig holds configurations for fake volume binder.
type FakeVolumeBinderConfig struct {
@@ -62,7 +66,7 @@ func (b *FakeVolumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string,
func (b *FakeVolumeBinder) RevertAssumedPodVolumes(_ *PodVolumes) {}
// BindPodVolumes implements SchedulerVolumeBinder.BindPodVolumes.
func (b *FakeVolumeBinder) BindPodVolumes(assumedPod *v1.Pod, podVolumes *PodVolumes) error {
func (b *FakeVolumeBinder) BindPodVolumes(ctx context.Context, assumedPod *v1.Pod, podVolumes *PodVolumes) error {
b.BindCalled = true
return b.config.BindErr
}