tao12345666333 commented on code in PR #1193:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/1193#discussion_r932454788


##########
pkg/kube/translation/translator.go:
##########
@@ -388,3 +398,27 @@ func (t *translator) TranslateIngress(ing kube.Ingress, 
args ...bool) (*Translat
                return nil, fmt.Errorf("translator: source group version not 
supported: %s", ing.GroupVersion())
        }
 }
+
+func (t *translator) TranslateOldRoute(ar kube.ApisixRoute) 
(*TranslateContext, error) {
+       switch ar.GroupVersion() {
+       case config.ApisixV2:
+               return t.translateOldRouteV2(ar.V2())
+       case config.ApisixV2beta3:
+               return t.translateOldRouteV2beta3(ar.V2beta3())
+       case config.ApisixV2beta2:
+               return DefaultEmptyTranslateContext(), nil
+       default:
+               return nil, fmt.Errorf("translator: source group version not 
supported: %s", ar.GroupVersion())
+       }
+}
+
+func (t *translator) TranslateOldIngress(ing kube.Ingress) (*TranslateContext, 
error) {
+       switch ing.GroupVersion() {
+       case kube.IngressV1:
+               return t.translateOldIngressV1(ing.V1())
+       case kube.IngressV1beta1:
+               return t.translateOldIngressV1beta1(ing.V1beta1())
+       default:
+               return nil, fmt.Errorf("translator: source group version not 
supported: %s", ing.GroupVersion())
+       }

Review Comment:
   Currently we have not removed support for IngressExtensionsV1beta1, still 
need to deal with it



-- 
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