afzal442 commented on code in PR #1814:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/1814#discussion_r1179348621


##########
pkg/providers/gateway/gateway.go:
##########
@@ -206,6 +207,49 @@ func (c *gatewayController) onAdd(obj interface{}) {
 }
 
 func (c *gatewayController) onUpdate(oldObj, newObj interface{}) {
+       oldGateway, ok := oldObj.(*gatewayv1beta1.Gateway)
+       if !ok {
+               log.Errorw("failed to convert old object to gateway",
+                       zap.Any("obj", oldObj),
+               )
+               return
+       }
+
+       newGateway, ok := newObj.(*gatewayv1beta1.Gateway)
+       if !ok {
+               log.Errorw("failed to convert new object to gateway",
+                       zap.Any("new obj", newObj),
+               )
+               return
+       }
+
+       if reflect.DeepEqual(oldGateway.Spec, newGateway.Spec) {

Review Comment:
   ```suggestion
        if oldHTTPRoute.ResourceVersion >= newHTTPRoute.ResourceVersion {
   ```
   I just wanted to know if we can change it to this one or previous one is 
okay.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to