From b701d213d71a0e7cbb9bd606d4dfc0464de895c9 Mon Sep 17 00:00:00 2001 From: mitchell amihod <4623+meeech@users.noreply.github.com> Date: Tue, 30 May 2023 21:45:13 -0400 Subject: [PATCH] Apply stable selectors on canary service on rollout abort #2781 Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com> --- rollout/service.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rollout/service.go b/rollout/service.go index de63f527b3..8cd50c372b 100644 --- a/rollout/service.go +++ b/rollout/service.go @@ -257,7 +257,13 @@ func (c *rolloutContext) reconcileStableAndCanaryService() error { if err != nil { return err } - err = c.ensureSVCTargets(c.rollout.Spec.Strategy.Canary.CanaryService, c.newRS, true) + + canaryRS := c.newRS + if c.pauseContext.IsAborted() { + canaryRS = c.stableRS + } + + err = c.ensureSVCTargets(c.rollout.Spec.Strategy.Canary.CanaryService, canaryRS, true) if err != nil { return err }