TIS1104 - Host Subset Combination Already Referenced in Another Route Destination
The specified host-subset combination is already referenced in another route destination within the VirtualService
.
To prevent conflicts and ensure predictable routing behavior, ensure each host-subset combination is only referenced once per RouteDestination
. Consolidate duplicates or use unique subsets for different versions of the service.
Examples
-
VirtualService
with Duplicate Host-Subset CombinationsapiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
hosts:
- "my-app.example.com"
http:
- route:
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v1"
weight: 50
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v1"
weight: 50Explanation: The
VirtualService
has twoRouteDestination
entries that reference the same host (my-app-service.example-namespace.svc.cluster.local
) and subset (v1
). Having multiple references to the same host-subset combination can lead to unpredictable routing behavior and configuration conflicts.
Recommendation
Ensure there is only one reference to the same host-subset combination for each RouteDestination
.
-
Consolidate Duplicate Host-Subset References
Remove the duplicate
RouteDestination
to avoid conflicts, and if needed, adjust the weight accordingly.apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
hosts:
- "my-app.example.com"
http:
- route:
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v1"
weight: 100Explanation: Consolidating the duplicate entries ensures that each host-subset combination is referenced only once, preventing conflicts and ensuring that routing is handled as intended.
-
Define Unique Subsets for Different Versions
If the intention is to distribute traffic across multiple versions, define unique subsets for each version to ensure proper routing.
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtual-service
namespace: example-namespace
spec:
hosts:
- "my-app.example.com"
http:
- route:
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v1"
weight: 50
- destination:
host: "my-app-service.example-namespace.svc.cluster.local"
subset: "v2"
weight: 50Explanation: Using different subsets for different versions allows traffic to be distributed correctly between the subsets, enabling load balancing or canary deployment scenarios.