elvis-cai opened a new issue #645:
URL: https://github.com/apache/apisix-ingress-controller/issues/645


   ### Issue description
   Hi, trying to configure apisix ingress controller with multiple external url 
traffic splitting or failover, not sure if current approach is correct, if 
there's other workaround, please correct me, thanks. 
   Here's two features I am looking at:
   - if `bar.com` is down, apisix should point to `foo.com` as failover
   - if `bar.com` and `foo.com` are both active, traffic will be splitting to 
these two urls.
   
   ```apiVersion: apisix.apache.org/v2alpha1
   kind: ApisixRoute
   metadata:
     name: httpserver-route
   spec:
     http:
     - name: rule1
       match:
         hosts:
         - local.httpbin.org
         paths:
         - /*
       backends:
         - serviceName: apple-service
           servicePort: 80
           weight: 100
           resolveGranularity: service
         - serviceName: banana-service
           servicePort: 80
           weight: 50
           resolveGranularity: service
   ---
   kind: Service
   apiVersion: v1
   metadata:
     name: banana-service
   spec:
     type: ExternalName
     externalName: foo.com
     ports:
     - name: http
       port: 80
       protocol: TCP
       targetPort: 80
   ---
   kind: Service
   apiVersion: v1
   metadata:
     name: apple-service
   spec:
     type: ExternalName
     externalName: bar.com
     ports:
     - name: http
       port: 80
       protocol: TCP
       targetPort: 80
   ```
   After applying this file, I get   `Warning  ResourceSyncAborted  1s (x5 over 
3s)  ApisixIngress  ApisixIngress synced failed, with error: conflict headless 
service and backend resolve granularity`, seems backend service could not be 
`type: ExternalName`
   
   
   
   ### Environment
   
   * your apisix-ingress-controller version (output of 
`apisix-ingress-controller version --long`);
   deploy with this doc 
https://apisix.apache.org/docs/ingress-controller/deployments/gke/
   version: `apache/apisix-ingress-controller:1.0.0`
   
   * your Kubernetes cluster version (output of `kubectl version`);
   Server Version: version.Info{Major:"1", Minor:"19+", 
GitVersion:"v1.19.10-gke.1600", 
GitCommit:"7b8e568a7fb4c9d199c2ba29a5f7d76f6b4341c2", GitTreeState:"clean", 
BuildDate:"2021-05-07T09:18:53Z", GoVersion:"go1.15.10b5", Compiler:"gc", 
Platform:"linux/amd64"}
   
   * if you run apisix-ingress-controller in Bare-metal environment, also show 
your OS version (`uname -a`).
   N/A


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