Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nitya Dhanushkodi <[email protected]>
  • Loading branch information
andrewstucki and ndhanushkodi authored Apr 11, 2022
1 parent 5edbd65 commit 21a88a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion control-plane/connect-inject/endpoints_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (r *EndpointsController) Reconcile(ctx context.Context, req ctrl.Request) (
serviceName, ok := pod.Annotations[annotationKubernetesService]
if ok && serviceEndpoints.Name != serviceName {
r.Log.Info("ignoring endpoint because it doesn't match explicit service annotation", "name", serviceEndpoints.Name, "ns", serviceEndpoints.Namespace)
// deregistration happens later because we don't add this pod to the endpointAddressMap
// deregistration for service instances that don't match the annotation happens later because we don't add this pod to the endpointAddressMap.
continue
}

Expand Down
2 changes: 1 addition & 1 deletion control-plane/connect-inject/endpoints_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,7 @@ func TestReconcile_podSpecifiesExplicitService(t *testing.T) {

// Run the reconcile again with the service we want to register.
serviceName = endpoint.Name
namespacedName = types.NamespacedName{Namespace: badEndpoint.Namespace, Name: serviceName}
namespacedName = types.NamespacedName{Namespace: endpoint.Namespace, Name: serviceName}
resp, err = ep.Reconcile(context.Background(), ctrl.Request{NamespacedName: namespacedName})
require.NoError(t, err)
require.False(t, resp.Requeue)
Expand Down

0 comments on commit 21a88a8

Please sign in to comment.