Merge pull request #124131 from zyjhtangtang/master

Correct variable names in EndpointSliceMirroring controller
This commit is contained in:
Kubernetes Prow Robot 2024-05-05 14:40:13 -07:00 committed by GitHub
commit d83cd48e5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -464,8 +464,8 @@ func (c *Controller) onEndpointSliceAdd(obj interface{}) {
// version in the endpointSliceTracker or the managed-by value of the
// EndpointSlice has changed from or to this controller.
func (c *Controller) onEndpointSliceUpdate(logger klog.Logger, prevObj, obj interface{}) {
prevEndpointSlice := obj.(*discovery.EndpointSlice)
endpointSlice := prevObj.(*discovery.EndpointSlice)
endpointSlice := obj.(*discovery.EndpointSlice)
prevEndpointSlice := prevObj.(*discovery.EndpointSlice)
if endpointSlice == nil || prevEndpointSlice == nil {
utilruntime.HandleError(fmt.Errorf("onEndpointSliceUpdated() expected type discovery.EndpointSlice, got %T, %T", prevObj, obj))
return