Update gateway identity on gateway mirror endpoints
When the identity annotation on a gateway service is updated, this change is not propagated to the mirror gateway endpoints object.
This is because the annotations are updated on the wrong object and the changes are lost.
@@ -740,7 +740,7 @@ func (rcsw *RemoteClusterServiceWatcher) updateGatewayMirrorService(spec *Gatewa
}
}
- endpoints.Annotations[consts.RemoteGatewayIdentity] = spec.identity
+ updatedEndpoints.Annotations[consts.RemoteGatewayIdentity] = spec.identity
_, err = rcsw.localAPIClient.Client.CoreV1().Services(rcsw.serviceMirrorNamespace).Update(updatedService)
if err != nil {
