Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: verify AWS TargetGroup after updating active/stable services #1348

Merged
merged 2 commits into from
Aug 26, 2021

Conversation

jessesuen
Copy link
Member

@jessesuen jessesuen commented Jul 14, 2021

Implements approach 1 in #1283.

During a blue-green update, the rollout controller will verify the AWS target group for the active service is correctly targeting the correct pod endpoints of the new replicaset after the active service has switched to point to new revision. This is executed/verified before postPromotionAnalysis runs.

During a canary update with ALB traffic routing, the rollout controller will verify the AWS target group of the stable service after modifying the selector, before attaching the scaleDownDelay annotation to the ReplicaSet, thereby preventing scaledown of the old ReplicaSet until targets have been verified.

One major changes done as part of this PR is: the injection of the scale-down-deadline annotation is now performed in followup reconciliations, as opposed the the point in time when the stable is promoted. This change is imperceivable to users, but affected assumptions of many tests.

Signed-off-by: Jesse Suen [email protected]

@jessesuen jessesuen force-pushed the verify-targetgroups branch 2 times, most recently from 37a550f to 070fb1d Compare July 31, 2021 01:49
@jessesuen jessesuen changed the title feat: ability to verify AWS TargetGroup after blue-green cutover feat: ability to verify AWS TargetGroup after blue-green cutover / canary stable update Aug 5, 2021
@jessesuen jessesuen changed the title feat: ability to verify AWS TargetGroup after blue-green cutover / canary stable update feat: verify AWS TargetGroup after change to blue-green active/canary stable services Aug 5, 2021
@jessesuen jessesuen changed the title feat: verify AWS TargetGroup after change to blue-green active/canary stable services feat: verify AWS TargetGroup after updating blue-green active/canary stable services Aug 5, 2021
@jessesuen jessesuen force-pushed the verify-targetgroups branch 2 times, most recently from 9009511 to 9658ec9 Compare August 5, 2021 12:43
Copy link
Contributor

@khhirani khhirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jessesuen jessesuen force-pushed the verify-targetgroups branch from 9658ec9 to 2ac6e69 Compare August 24, 2021 00:58
@jessesuen jessesuen changed the title feat: verify AWS TargetGroup after updating blue-green active/canary stable services feat: verify AWS TargetGroup after updating active/stable services Aug 24, 2021
@jessesuen jessesuen force-pushed the verify-targetgroups branch 4 times, most recently from 27d4fd3 to 3acbe72 Compare August 25, 2021 09:49
@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #1348 (2bf6d80) into master (6141685) will decrease coverage by 0.16%.
The diff coverage is 76.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1348      +/-   ##
==========================================
- Coverage   81.54%   81.37%   -0.17%     
==========================================
  Files         108      108              
  Lines       10104    14450    +4346     
==========================================
+ Hits         8239    11759    +3520     
- Misses       1304     2077     +773     
- Partials      561      614      +53     
Impacted Files Coverage Δ
rollout/context.go 90.41% <ø> (+1.04%) ⬆️
utils/conditions/conditions.go 80.76% <ø> (+1.82%) ⬆️
rollout/bluegreen.go 66.79% <40.00%> (-4.13%) ⬇️
utils/aws/aws.go 68.59% <70.00%> (+6.59%) ⬆️
rollout/trafficrouting/alb/alb.go 80.79% <72.72%> (-1.35%) ⬇️
rollout/analysis.go 79.59% <75.00%> (-1.17%) ⬇️
rollout/service.go 76.06% <75.00%> (-2.61%) ⬇️
rollout/canary.go 74.83% <77.77%> (-1.58%) ⬇️
rollout/replicaset.go 70.68% <80.00%> (+2.25%) ⬆️
utils/rollout/rolloututil.go 87.93% <94.44%> (-0.31%) ⬇️
... and 116 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6141685...2bf6d80. Read the comment docs.

@jessesuen jessesuen force-pushed the verify-targetgroups branch 6 times, most recently from 67374ec to cf03dcf Compare August 26, 2021 07:54
@jessesuen jessesuen marked this pull request as ready for review August 26, 2021 07:55
@jessesuen jessesuen force-pushed the verify-targetgroups branch from cf03dcf to a5239bf Compare August 26, 2021 08:10
@jessesuen jessesuen force-pushed the verify-targetgroups branch from a5239bf to 2bf6d80 Compare August 26, 2021 18:38
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 35 Security Hotspots
Code Smell A 13 Code Smells

No Coverage information No Coverage information
6.1% 6.1% Duplication

@jessesuen jessesuen merged commit 2565c87 into argoproj:master Aug 26, 2021
@jessesuen jessesuen deleted the verify-targetgroups branch August 26, 2021 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants