Skip to content

Commit

Permalink
Fix the issue of istio VirtualService not supporting multiple domain …
Browse files Browse the repository at this point in the history
…names when using SRDS (#917)
  • Loading branch information
johnlanni authored Apr 22, 2024
1 parent f1cadcb commit 29baf85
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions istio/1.12/patches/istio/20240422-fix-copyvs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/gateway.go istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go
--- istio/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-04-22 18:08:26.000000000 +0800
+++ istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-04-22 18:07:46.000000000 +0800
@@ -581,13 +581,13 @@
continue
}
if len(virtualService.Spec.(*networking.VirtualService).Hosts) > 1 {
- copiedVS := &networking.VirtualService{}
- copiedVS = virtualService.Spec.(*networking.VirtualService)
+ copiedVS := networking.VirtualService{}
+ copiedVS = *(virtualService.Spec.(*networking.VirtualService))
copiedVS.Hosts = []string{selectHost}
selectedVirtualServices = append(selectedVirtualServices, virtualServiceContext{
virtualService: config.Config{
Meta: virtualService.Meta,
- Spec: copiedVS,
+ Spec: &copiedVS,
Status: virtualService.Status,
},
server: vsCtx.server,

0 comments on commit 29baf85

Please sign in to comment.