[ECS-Plugin]: Implement ECS_TRAFFIC_ROUTING stage#6613
Open
armistcxy wants to merge 2 commits intopipe-cd:masterfrom
Open
[ECS-Plugin]: Implement ECS_TRAFFIC_ROUTING stage#6613armistcxy wants to merge 2 commits intopipe-cd:masterfrom
armistcxy wants to merge 2 commits intopipe-cd:masterfrom
Conversation
Contributor
Author
Signed-off-by: Hoang Ngo <adlehoang118@gmail.com>
Signed-off-by: Hoang Ngo <adlehoang118@gmail.com>
5bb1965 to
c8937cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this PR does: Implement ECS_TRAFFIC_ROUTING stage
Why we need it: This stage modifies the ALB listener's forward rules to set the desired weight between the primary and canary target groups, making it the bridge between task set management (what runs) and traffic control (what users hit).
sequenceDiagram participant Plugin as ECSTrafficRoutingStage participant Store as Metadata Store participant Provider as ECS Client participant ELB as AWS ALB Plugin->>Store: PutDeploymentPluginMetadata(canary-target-group-arn) alt Save canary ARN error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Saved Plugin->>Provider: Create ECS client alt Client creation error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Client ready Plugin->>Store: PutDeploymentPluginMetadataMulti(primary%, canary%) alt Save percentage error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Saved Plugin->>Store: GetDeploymentPluginMetadata(current-listeners) alt Get error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Listener ARNs cached Plugin->>Plugin: Use cached listener ARNs else Not cached Plugin->>ELB: GetListenerArns(primaryTargetGroup) alt GetListenerArns error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else ARNs fetched Plugin->>Plugin: Use fetched listener ARNs end end Plugin->>Store: PutDeploymentPluginMetadata(current-listeners) alt Save listeners error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Saved Plugin->>ELB: ModifyListeners(listenerArns, primary:X%, canary:Y%) alt ModifyListeners error Plugin->>Plugin: Log error Plugin-->>Plugin: StageStatusFailure else Modified Plugin->>Plugin: Log "Modified N listener rules" Plugin-->>Plugin: StageStatusSuccess end end end end endWhich issue(s) this PR fixes: Part of #6443
Does this PR introduce a user-facing change?: