Skip to content

Commit

Permalink
Adding status.alb.canaryTargetGroup.fullName for ALB
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Smirnov <[email protected]>
  • Loading branch information
danil-smirnov committed Feb 18, 2023
1 parent 9f28159 commit f02d1e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rollout/trafficrouting/alb/alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"strconv"
"strings"

rolloututil "github.com/argoproj/argo-rollouts/utils/rollout"

Expand Down Expand Up @@ -241,6 +242,7 @@ func (r *Reconciler) VerifyWeight(desiredWeight int32, additionalDestinations ..
if tg.Tags[aws.AWSLoadBalancerV2TagKeyResourceID] == canaryResourceID {
r.cfg.Status.ALB.CanaryTargetGroup.Name = *tg.TargetGroupName
r.cfg.Status.ALB.CanaryTargetGroup.ARN = *tg.TargetGroupArn
r.cfg.Status.ALB.CanaryTargetGroup.FullName = strings.Join(strings.Split(*tg.TargetGroupArn, "/")[1:], "/")
if tg.Weight != nil {
logCtx := logCtx.WithField("tg", *tg.TargetGroupArn)
logCtx.Infof("canary weight of %s (desired: %d, current: %d)", canaryResourceID, desiredWeight, *tg.Weight)
Expand All @@ -267,6 +269,7 @@ func (r *Reconciler) VerifyWeight(desiredWeight int32, additionalDestinations ..
} else if tg.Tags[aws.AWSLoadBalancerV2TagKeyResourceID] == stableResourceID {
r.cfg.Status.ALB.StableTargetGroup.Name = *tg.TargetGroupName
r.cfg.Status.ALB.StableTargetGroup.ARN = *tg.TargetGroupArn
r.cfg.Status.ALB.StableTargetGroup.FullName = strings.Join(strings.Split(*tg.TargetGroupArn, "/")[1:], "/")
}
}
}
Expand Down

0 comments on commit f02d1e3

Please sign in to comment.