mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Updating EndpointSliceMirroring controller to wait for cache to be updated
This matches the recent updates to the EndpointSliceTracker for the EndpointSlice controller in #99345 that accomplished the same thing.
This commit is contained in:
		@@ -172,13 +172,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
 | 
			
		||||
	}))
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user