mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Merge pull request #745 from Nerja/delegate
Fix for VirtualService delegation when analysis is enabled
This commit is contained in:
@@ -215,6 +215,12 @@ func (ir *IstioRouter) reconcileVirtualService(canary *flaggerv1.Canary) error {
|
||||
return fmt.Errorf("VirtualService %s.%s get query error %v", apexName, canary.Namespace, err)
|
||||
}
|
||||
|
||||
if canary.Spec.Service.Delegation {
|
||||
// delegate VirtualService requires the hosts and gateway empty.
|
||||
virtualService.Spec.Gateways = []string{}
|
||||
virtualService.Spec.Hosts = []string{}
|
||||
}
|
||||
|
||||
// update service but keep the original destination weights and mirror
|
||||
if virtualService != nil {
|
||||
if diff := cmp.Diff(
|
||||
|
||||
@@ -70,7 +70,6 @@ spec:
|
||||
targetPort: 9898
|
||||
portDiscovery: true
|
||||
delegation: true
|
||||
skipAnalysis: true
|
||||
analysis:
|
||||
interval: 15s
|
||||
threshold: 15
|
||||
|
||||
Reference in New Issue
Block a user