mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
pkg/router/istio: use canary.GetAnalysis to prevent nil pointer
This commit is contained in:
+1
-1
@@ -305,7 +305,7 @@ func (ir *IstioRouter) SetRoutes(
|
||||
Host: canaryName,
|
||||
}
|
||||
|
||||
if mw := canary.Spec.Analysis.MirrorWeight; mw > 0 {
|
||||
if mw := canary.GetAnalysis().MirrorWeight; mw > 0 {
|
||||
vsCopy.Spec.Http[0].MirrorPercentage = &istiov1alpha3.Percent{Value: mw}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user