mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Avoid mesh gateway duplicates
This commit is contained in:
@@ -167,7 +167,17 @@ func (c *CanaryRouter) syncVirtualService(cd *flaggerv1.Canary) error {
|
||||
targetName := cd.Spec.TargetRef.Name
|
||||
primaryName := fmt.Sprintf("%s-primary", targetName)
|
||||
hosts := append(cd.Spec.Service.Hosts, targetName)
|
||||
gateways := append(cd.Spec.Service.Gateways, "mesh")
|
||||
gateways := cd.Spec.Service.Gateways
|
||||
var hasMeshGateway bool
|
||||
for _, g := range gateways {
|
||||
if g == "mesh" {
|
||||
hasMeshGateway = true
|
||||
}
|
||||
}
|
||||
if !hasMeshGateway {
|
||||
gateways = append(gateways, "mesh")
|
||||
}
|
||||
|
||||
route := []istiov1alpha3.DestinationWeight{
|
||||
{
|
||||
Destination: istiov1alpha3.Destination{
|
||||
|
||||
Reference in New Issue
Block a user