Merge pull request #99756 from robscott/endpointslicemirroring-tracker

Updating EndpointSliceMirroring controller to wait for cache to be updated
This commit is contained in:
Kubernetes Prow Robot
2021-03-04 13:39:22 -08:00
committed by GitHub
6 changed files with 381 additions and 173 deletions

View File

@@ -125,13 +125,13 @@ func newClientset() *fake.Clientset {
endpointSlice.ObjectMeta.Name = fmt.Sprintf("%s-%s", endpointSlice.ObjectMeta.GenerateName, rand.String(8))
endpointSlice.ObjectMeta.GenerateName = ""
}
endpointSlice.ObjectMeta.ResourceVersion = "100"
endpointSlice.ObjectMeta.Generation = 1
return false, endpointSlice, nil
}))
client.PrependReactor("update", "endpointslices", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) {
endpointSlice := action.(k8stesting.CreateAction).GetObject().(*discovery.EndpointSlice)
endpointSlice.ObjectMeta.ResourceVersion = "200"
endpointSlice.ObjectMeta.Generation++
return false, endpointSlice, nil
}))