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

Expose template list and other execution errors to logs #166

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

adammw
Copy link
Contributor

@adammw adammw commented Dec 17, 2020

Upon deploying v0.17 to our environment, rollingupgrades were silently failing with no decernable error messages. From tracing the possible error points, we deduced it was due to new launchtemplate requests that the serviceaccount did not have permission for.

This PR adds an explicit error message when launchtemplate fetching fails similar to what happens in the other populate methods, as well as changing the signature of the private finishExecution method to accept an error instead of a status, allowing the error itself to be logged along with the status.

Open question if the error should also be exposed to the kubernetes event as well, or just remain in the controller logs.

@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #166 (96d9a28) into master (757b669) will increase coverage by 0.06%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   68.52%   68.58%   +0.06%     
==========================================
  Files          11       11              
  Lines         934      939       +5     
==========================================
+ Hits          640      644       +4     
- Misses        261      262       +1     
  Partials       33       33              
Flag Coverage Δ
unittests 68.58% <50.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
controllers/rollingupgrade_controller.go 68.06% <50.00%> (+0.10%) ⬆️

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 757b669...96d9a28. Read the comment docs.

@adammw adammw force-pushed the adammw/debugging branch 4 times, most recently from c804e27 to 6d19c0d Compare December 21, 2020 20:17
Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
@adammw
Copy link
Contributor Author

adammw commented Dec 29, 2020

@shrinandj any more blockers to merge?

@shrinandj shrinandj merged commit 391b2fb into keikoproj:master Jan 4, 2021
tekenstam pushed a commit that referenced this pull request Jan 28, 2021
* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve error log message and return statement

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolving PR comments

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix typo in README.md. (#125)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore the terminated instance during upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Added WARNING prefix in the logging

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Apply suggestions from code review

Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Capitalize sprintf to Sprintf

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Upgrade to Go 1.15 (#128)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix few typos and simplify error returns, remove redundant types (#131)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Readiness gates implementation for eager mode (#130)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validation step to check Nodes and ASG launch configs (#112)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes (#120)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

* Terminate unjoined nodes

* Resolving PR comments

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug when switching to launch templates (#136)

* Update rollingupgrade_controller.go

* Update rollingupgrade_controller.go

Signed-off-by: Eytan Avisror <eytan_avisror@intuit.com>

* spacing fixes

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Extract script runner to a separate type; fix work with env. variables (#132)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.15 (#137)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.16-dev.

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Propagate parent env variables to allow to talk with API Server (#144)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump Golang CI action to fix failed CI run (#146)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify (#145)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add Expiration to cache and do not refresh ASG if cache is not expired (#143)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix documentation for uniform across AZ Update strategy and fix typos (#147)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move cluster state from package level to a cluster state impl (#148)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify work with intstr type. (#149)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* If instance is in standby mode already, just return (#138)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Handle terminated instances gracefully. (#150)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Template version comparison fix (#155)

* get template version

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* fix tests

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.16 (#157)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version to 0.17-dev (#158)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set (#151)

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Test node uncordon when postDrain / postDrainWait script fails

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Abort on strategy failure instead of continuing (#152)

* Abort on strategy failure instead of continuing

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Remove unformatted error message placeholder

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Explictly specify strategy for tests

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use NamespacedName (#160)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.17 (#161)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.18-dev (#162)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move constants to types so that they can be reused (#167)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Remove separate module for pkg/log (#168)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump dependencies. (#169)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use standard fmt.Errorf to format error message; unify error format (#171)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix namespaced name order (#170)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add instance id to the logs (#173)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump golang and busybox (#172)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Expose template list and other execution errors to logs (#166)

* Log and return wrapped launchtemplate error

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Expose execution error in logs

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* output can contain other messages from API Server, so be more relaxed (#174)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* validate() function

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* basic script_runner without any modifications

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the vet related errors

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
shreyas-badiger added a commit that referenced this pull request Jul 21, 2021
* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Implemented RollingUpgrade object validation. (#176)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the "make vet" errors in Controller V2 branch. (#177)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve error log message and return statement

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolving PR comments

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix typo in README.md. (#125)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore the terminated instance during upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Added WARNING prefix in the logging

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Apply suggestions from code review

Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Capitalize sprintf to Sprintf

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Upgrade to Go 1.15 (#128)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix few typos and simplify error returns, remove redundant types (#131)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Readiness gates implementation for eager mode (#130)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validation step to check Nodes and ASG launch configs (#112)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes (#120)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

* Terminate unjoined nodes

* Resolving PR comments

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug when switching to launch templates (#136)

* Update rollingupgrade_controller.go

* Update rollingupgrade_controller.go

Signed-off-by: Eytan Avisror <eytan_avisror@intuit.com>

* spacing fixes

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Extract script runner to a separate type; fix work with env. variables (#132)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.15 (#137)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.16-dev.

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Propagate parent env variables to allow to talk with API Server (#144)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump Golang CI action to fix failed CI run (#146)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify (#145)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add Expiration to cache and do not refresh ASG if cache is not expired (#143)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix documentation for uniform across AZ Update strategy and fix typos (#147)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move cluster state from package level to a cluster state impl (#148)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify work with intstr type. (#149)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* If instance is in standby mode already, just return (#138)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Handle terminated instances gracefully. (#150)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Template version comparison fix (#155)

* get template version

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* fix tests

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.16 (#157)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version to 0.17-dev (#158)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set (#151)

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Test node uncordon when postDrain / postDrainWait script fails

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Abort on strategy failure instead of continuing (#152)

* Abort on strategy failure instead of continuing

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Remove unformatted error message placeholder

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Explictly specify strategy for tests

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use NamespacedName (#160)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.17 (#161)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.18-dev (#162)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move constants to types so that they can be reused (#167)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Remove separate module for pkg/log (#168)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump dependencies. (#169)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use standard fmt.Errorf to format error message; unify error format (#171)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix namespaced name order (#170)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add instance id to the logs (#173)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump golang and busybox (#172)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Expose template list and other execution errors to logs (#166)

* Log and return wrapped launchtemplate error

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Expose execution error in logs

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* output can contain other messages from API Server, so be more relaxed (#174)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* validate() function

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* basic script_runner without any modifications

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the vet related errors

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Controller v2: Implementation of Instance termination (#178)

* fix make vet errors.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate instances and run v2 for first time.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing more review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Log error message

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* error handling for instance tagging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Migrate Script Runner (#179)

* Basic script runner

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* Update upgrade.go

Signed-off-by: Eytan Avisror <Eytan_Avisror@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Implemented node drain. (#181)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Eager mode implementation (#183)

* Eager mode implementation

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Metrics features (#189)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Process the batch rotation in parallel (#192)

* Process the batch rotation in parallel

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Refine metrics implementation to support goroutines (#196)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore generated code  (#201)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug in deleting the entry in syncMap (#203)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Unit tests for controller-v2 (#215)

* Unit tests

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* minor change in accessing the namespace name

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move helper functions to a differnt file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgradeContext (#234)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve compile errors caused by merge conflict. (#235)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis (#239)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* metricsMutex should be initialized (#240)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Load test fixes (#245)

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* load test fixes

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* handle scaling group not found

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Update upgrade.go

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log one level up

* remove double logging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* final push before RC release. (#254)

* support IgnoreDrainFailures flag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add else condition

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* set min for maxUnavailable

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* calculateMaxUnavailable function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add a new coloumn (completePercentage)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* disable debug logs by default

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics collecting issue (#249)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Revert "Fix metrics collecting issue (#249)" (#256)

This reverts commit f5dd1cb.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics calculation issue (#258)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add mutex for InProcessingNode deleting

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add a mock for test and update version in Makefile (#262)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* and CR end time (#264)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: expose totalProcessing time and other metrics (#265)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait (#270)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Add nodeEvents handler instead of a watch handler (#272)

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add watch event for cluster nodes instead of API calls

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upon node deletion, remove it from syncMap as well

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add nodeEvents handler instead of watch handler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore Reconciles on nodeEvents

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Process next batch while waiting on nodeInterval period. (#273)

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add watch event for cluster nodes instead of API calls

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upon node deletion, remove it from syncMap as well

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add nodeEvents handler instead of watch handler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore Reconciles on nodeEvents

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set nextbatch to standBy while waiting for terminate

* Avoid parallel reconcile operation per ASG

* add default requeue time

Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* fix unit tests

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Sheldon Shao <shaoxt@gmail.com>
Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
shreyas-badiger added a commit that referenced this pull request Jul 21, 2021
* upgrade-manager-v2: Fix unit tests (#275)

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Implemented RollingUpgrade object validation. (#176)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the "make vet" errors in Controller V2 branch. (#177)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve error log message and return statement

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolving PR comments

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix typo in README.md. (#125)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore the terminated instance during upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Added WARNING prefix in the logging

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Apply suggestions from code review

Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Capitalize sprintf to Sprintf

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Upgrade to Go 1.15 (#128)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix few typos and simplify error returns, remove redundant types (#131)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Readiness gates implementation for eager mode (#130)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validation step to check Nodes and ASG launch configs (#112)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes (#120)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

* Terminate unjoined nodes

* Resolving PR comments

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug when switching to launch templates (#136)

* Update rollingupgrade_controller.go

* Update rollingupgrade_controller.go

Signed-off-by: Eytan Avisror <eytan_avisror@intuit.com>

* spacing fixes

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Extract script runner to a separate type; fix work with env. variables (#132)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.15 (#137)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.16-dev.

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Propagate parent env variables to allow to talk with API Server (#144)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump Golang CI action to fix failed CI run (#146)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify (#145)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add Expiration to cache and do not refresh ASG if cache is not expired (#143)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix documentation for uniform across AZ Update strategy and fix typos (#147)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move cluster state from package level to a cluster state impl (#148)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify work with intstr type. (#149)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* If instance is in standby mode already, just return (#138)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Handle terminated instances gracefully. (#150)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Template version comparison fix (#155)

* get template version

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* fix tests

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.16 (#157)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version to 0.17-dev (#158)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set (#151)

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Test node uncordon when postDrain / postDrainWait script fails

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Abort on strategy failure instead of continuing (#152)

* Abort on strategy failure instead of continuing

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Remove unformatted error message placeholder

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Explictly specify strategy for tests

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use NamespacedName (#160)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.17 (#161)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.18-dev (#162)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move constants to types so that they can be reused (#167)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Remove separate module for pkg/log (#168)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump dependencies. (#169)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use standard fmt.Errorf to format error message; unify error format (#171)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix namespaced name order (#170)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add instance id to the logs (#173)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump golang and busybox (#172)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Expose template list and other execution errors to logs (#166)

* Log and return wrapped launchtemplate error

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Expose execution error in logs

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* output can contain other messages from API Server, so be more relaxed (#174)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* validate() function

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* basic script_runner without any modifications

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the vet related errors

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Controller v2: Implementation of Instance termination (#178)

* fix make vet errors.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate instances and run v2 for first time.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing more review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Log error message

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* error handling for instance tagging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Migrate Script Runner (#179)

* Basic script runner

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* Update upgrade.go

Signed-off-by: Eytan Avisror <Eytan_Avisror@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Implemented node drain. (#181)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Eager mode implementation (#183)

* Eager mode implementation

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Metrics features (#189)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Process the batch rotation in parallel (#192)

* Process the batch rotation in parallel

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Refine metrics implementation to support goroutines (#196)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore generated code  (#201)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug in deleting the entry in syncMap (#203)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Unit tests for controller-v2 (#215)

* Unit tests

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* minor change in accessing the namespace name

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move helper functions to a differnt file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgradeContext (#234)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve compile errors caused by merge conflict. (#235)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis (#239)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* metricsMutex should be initialized (#240)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Load test fixes (#245)

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* load test fixes

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* handle scaling group not found

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Update upgrade.go

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log one level up

* remove double logging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* final push before RC release. (#254)

* support IgnoreDrainFailures flag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add else condition

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* set min for maxUnavailable

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* calculateMaxUnavailable function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add a new coloumn (completePercentage)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* disable debug logs by default

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics collecting issue (#249)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Revert "Fix metrics collecting issue (#249)" (#256)

This reverts commit f5dd1cb.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics calculation issue (#258)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add mutex for InProcessingNode deleting

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add a mock for test and update version in Makefile (#262)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* and CR end time (#264)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: expose totalProcessing time and other metrics (#265)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait (#270)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Add nodeEvents handler instead of a watch handler (#272)

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add watch event for cluster nodes instead of API calls

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upon node deletion, remove it from syncMap as well

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add nodeEvents handler instead of watch handler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore Reconciles on nodeEvents

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Process next batch while waiting on nodeInterval period. (#273)

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add watch event for cluster nodes instead of API calls

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upon node deletion, remove it from syncMap as well

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add nodeEvents handler instead of watch handler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore Reconciles on nodeEvents

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set nextbatch to standBy while waiting for terminate

* Avoid parallel reconcile operation per ASG

* add default requeue time

Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* fix unit tests

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Sheldon Shao <shaoxt@gmail.com>
Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add ci.yaml file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* test commit to trigger ci build

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move ci.yaml inside workflows

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete ci.yaml file from previous place

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* address lint issues

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Update ci.yaml

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* generate coverage.txt file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* fix golang lint errors

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Delete delete-me.file

* generate coverage.txt file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Sheldon Shao <shaoxt@gmail.com>
Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>
eytan-avisror added a commit that referenced this pull request Feb 23, 2022
)

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* Implemented RollingUpgrade object validation. (#176)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>

* Fix all the "make vet" errors in Controller V2 branch. (#177)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve error log message and return statement

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolving PR comments

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix typo in README.md. (#125)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore the terminated instance during upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Added WARNING prefix in the logging

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Apply suggestions from code review

Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Capitalize sprintf to Sprintf

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Upgrade to Go 1.15 (#128)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix few typos and simplify error returns, remove redundant types (#131)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Readiness gates implementation for eager mode (#130)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validation step to check Nodes and ASG launch configs (#112)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes (#120)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

* Terminate unjoined nodes

* Resolving PR comments

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug when switching to launch templates (#136)

* Update rollingupgrade_controller.go

* Update rollingupgrade_controller.go

Signed-off-by: Eytan Avisror <eytan_avisror@intuit.com>

* spacing fixes

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Extract script runner to a separate type; fix work with env. variables (#132)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.15 (#137)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.16-dev.

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Propagate parent env variables to allow to talk with API Server (#144)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump Golang CI action to fix failed CI run (#146)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify (#145)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add Expiration to cache and do not refresh ASG if cache is not expired (#143)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix documentation for uniform across AZ Update strategy and fix typos (#147)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move cluster state from package level to a cluster state impl (#148)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify work with intstr type. (#149)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* If instance is in standby mode already, just return (#138)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Handle terminated instances gracefully. (#150)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Template version comparison fix (#155)

* get template version

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* fix tests

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.16 (#157)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version to 0.17-dev (#158)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set (#151)

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Test node uncordon when postDrain / postDrainWait script fails

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Abort on strategy failure instead of continuing (#152)

* Abort on strategy failure instead of continuing

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Remove unformatted error message placeholder

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Explictly specify strategy for tests

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use NamespacedName (#160)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.17 (#161)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.18-dev (#162)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move constants to types so that they can be reused (#167)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Remove separate module for pkg/log (#168)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump dependencies. (#169)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use standard fmt.Errorf to format error message; unify error format (#171)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix namespaced name order (#170)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add instance id to the logs (#173)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump golang and busybox (#172)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Expose template list and other execution errors to logs (#166)

* Log and return wrapped launchtemplate error

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Expose execution error in logs

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* output can contain other messages from API Server, so be more relaxed (#174)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* validate() function

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* basic script_runner without any modifications

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the vet related errors

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>

* Controller v2: Implementation of Instance termination (#178)

* fix make vet errors.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate instances and run v2 for first time.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing more review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Log error message

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* error handling for instance tagging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Migrate Script Runner (#179)

* Basic script runner

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* Update upgrade.go

Signed-off-by: Eytan Avisror <Eytan_Avisror@intuit.com>

* Implemented node drain. (#181)

* Eager mode implementation (#183)

* Eager mode implementation

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Metrics features (#189)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Process the batch rotation in parallel (#192)

* Process the batch rotation in parallel

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Refine metrics implementation to support goroutines (#196)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code  (#201)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix bug in deleting the entry in syncMap (#203)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Unit tests for controller-v2 (#215)

* Unit tests

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* minor change in accessing the namespace name

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move helper functions to a differnt file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* Create RollingUpgradeContext (#234)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>

* Resolve compile errors caused by merge conflict. (#235)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* add missing parenthesis (#239)

* metricsMutex should be initialized (#240)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* upgrade-manager-v2: Load test fixes (#245)

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* load test fixes

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* handle scaling group not found

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Update upgrade.go

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log one level up

* remove double logging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* final push before RC release. (#254)

* support IgnoreDrainFailures flag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add else condition

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* set min for maxUnavailable

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* calculateMaxUnavailable function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add a new coloumn (completePercentage)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* disable debug logs by default

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics collecting issue (#249)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Revert "Fix metrics collecting issue (#249)" (#256)

This reverts commit f5dd1cb5f76f2b78cb15c53daed14032a2a4c6ec.

* Fix metrics calculation issue (#258)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add mutex for InProcessingNode deleting

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add a mock for test and update version in Makefile (#262)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* and CR end time (#264)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: expose totalProcessing time and other metrics (#265)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait (#270)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Add nodeEvents handler instead of a watch handler (#272)

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add watch event for cluster nodes instead of API calls

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upon node deletion, remove it from syncMap as well

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add nodeEvents handler instead of watch handler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore Reconciles on nodeEvents

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>

* upgrade-manager-v2: Process next batch while waiting on nodeInterval period. (#273)

* upgrade-manager-v2: remove function duplicate declaration. (#266)

* and CR end time

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* expose totalProcessing time and other metrics

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* remove function duplication

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Carry the metrics status in RollingUpgrade CR (#267)

* Update metrics status at same time

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Update metrics status when terminating instance

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add terminated step

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move cloud discovery after nodeInterval / drainInterval wait

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add watch event for cluster nodes instead of API calls

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upon node deletion, remove it from syncMap as well

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add nodeEvents handler instead of watch handler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore Reconciles on nodeEvents

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set nextbatch to standBy while waiting for terminate

* Avoid parallel reconcile operation per ASG

* add default requeue time

Co-authored-by: Sheldon Shao <Sheldon_Shao@intuit.com>

* upgrade-manager-v2: Fix unit tests (#275)

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Implemented RollingUpgrade object validation. (#176)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the "make vet" errors in Controller V2 branch. (#177)

* Validation step to check Nodes and ASG launch configs

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validating launch definition after a rolling upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve error log message and return statement

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolving PR comments

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix typo in README.md. (#125)

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore the terminated instance during upgrade

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Added WARNING prefix in the logging

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Apply suggestions from code review

Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Capitalize sprintf to Sprintf

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Upgrade to Go 1.15 (#128)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix few typos and simplify error returns, remove redundant types (#131)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Readiness gates implementation for eager mode (#130)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Adding Functional Test (#113)

* Adding BDD, workflow and badge

* Changing CI workflow job name

* Adding make manifests

* Clarifying cron time zone comment

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Validation step to check Nodes and ASG launch configs (#112)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.13 (#115)

* release 0.13

* Update CHANGELOG.md

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version (#116)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Repo selection for CI and BDD workflows & CI step for releases (#117)

* CI-BDD not on forks & Step for releases (#2)

* Testing CI-BDD not on forks & Step for releases

* Adding step for image with tag git-tag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate unjoined nodes (#120)

* Validation step to check Nodes and ASG launch configs

* Validating launch definition after a rolling upgrade

* Resolve error log message and return statement

* Terminate unjoined nodes

* Resolving PR comments

Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version 0.14. (#121)

Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to 0.15-dev.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug when switching to launch templates (#136)

* Update rollingupgrade_controller.go

* Update rollingupgrade_controller.go

Signed-off-by: Eytan Avisror <eytan_avisror@intuit.com>

* spacing fixes

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Extract script runner to a separate type; fix work with env. variables (#132)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.15 (#137)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.16-dev.

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Propagate parent env variables to allow to talk with API Server (#144)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump Golang CI action to fix failed CI run (#146)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify (#145)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add Expiration to cache and do not refresh ASG if cache is not expired (#143)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix documentation for uniform across AZ Update strategy and fix typos (#147)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move cluster state from package level to a cluster state impl (#148)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Simplify work with intstr type. (#149)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* If instance is in standby mode already, just return (#138)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Handle terminated instances gracefully. (#150)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Template version comparison fix (#155)

* get template version

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* fix tests

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* release 0.16 (#157)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* bump version to 0.17-dev (#158)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set (#151)

* Don't uncordon node on failure to run postDrain script when IgnoreDrainFailures set

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Test node uncordon when postDrain / postDrainWait script fails

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Abort on strategy failure instead of continuing (#152)

* Abort on strategy failure instead of continuing

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Remove unformatted error message placeholder

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Explictly specify strategy for tests

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use NamespacedName (#160)

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Set version and update CHANGELOG for version v0.17 (#161)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump version to v0.18-dev (#162)

Signed-off-by: Shri Javadekar <shrinand@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move constants to types so that they can be reused (#167)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Remove separate module for pkg/log (#168)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump dependencies. (#169)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use standard fmt.Errorf to format error message; unify error format (#171)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix namespaced name order (#170)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add instance id to the logs (#173)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Bump golang and busybox (#172)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>

Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Expose template list and other execution errors to logs (#166)

* Log and return wrapped launchtemplate error

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>

* Expose execution error in logs

Signed-off-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* output can contain other messages from API Server, so be more relaxed (#174)

Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Delete README.md

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* delete all

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add API

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial code

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add more scaffolding

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Add kubernetes API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* aws API calls

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* AWS API calls & Drift detection

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* validate() function

Signed-off-by: shreyas-badiger <shreyasbm@outlook.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* modified validate()

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initial rotation logic

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* basic script_runner without any modifications

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix all the vet related errors

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Alfredo Garo <44888596+garomonegro@users.noreply.github.com>
Co-authored-by: Eytan Avisror <eytan.avisror@hotmail.com>
Co-authored-by: Shri Javadekar <shrinandj@users.noreply.github.com>
Co-authored-by: Shri Javadekar <shrinand_javadekar@intuit.com>
Co-authored-by: Shri Javadekar <shrinand@gmail.com>
Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Kevin Downey <kevdowney@gmail.com>
Co-authored-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
Co-authored-by: Shreyas Badiger <7680410+hard-fault@users.noreply.github.com>
Co-authored-by: Adam Malcontenti-Wilson <adman.com@gmail.com>
Co-authored-by: Adam Malcontenti-Wilson <amalcontenti-wilson@zendesk.com>
Co-authored-by: Eytan Avisror <eytan_avisror@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Controller v2: Implementation of Instance termination (#178)

* fix make vet errors.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Terminate instances and run v2 for first time.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing more review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Log error message

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* error handling for instance tagging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Migrate Script Runner (#179)

* Basic script runner

Signed-off-by: Eytan Avisror <Eytan_Avisror@hotmail.com>

* Update upgrade.go

Signed-off-by: Eytan Avisror <Eytan_Avisror@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Implemented node drain. (#181)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Eager mode implementation (#183)

* Eager mode implementation

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Metrics features (#189)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Process the batch rotation in parallel (#192)

* Process the batch rotation in parallel

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* addressing review comments

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Refine metrics implementation to support goroutines (#196)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Ignore generated code  (#201)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix bug in deleting the entry in syncMap (#203)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Unit tests for controller-v2 (#215)

* Unit tests

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* minor change in accessing the namespace name

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move helper functions to a differnt file

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgradeContext (#234)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Resolve compile errors caused by merge conflict. (#235)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis (#239)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* metricsMutex should be initialized (#240)

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* upgrade-manager-v2: Load test fixes (#245)

* upgrade-manager-v2: Move DrainManager back to Reconciler (#236)

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log cloud discovery failure

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Create RollingUpgrade Context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rollingupgrade context

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: rollup CR statistic metrics in v2 (#218)

* #2285: rollup CR statistic metrics in v2

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>

* #2285: updated metric flags

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2285: renamed some methods related to metrics (#224)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* #2286: removed version from metric namespace (#227)

Signed-off-by: sbadla1 <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* resolve compile errors due to merge conflict

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* move drain-manager to reconciler

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* initialize RollingUpgrade object

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* use bool instead of count for standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* refactor in-progress and standby code

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* rename instance standby function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* DrainManager changes in unit test files

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* V2 controller metrics concurrency fix (#231)

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Refine the metrics status

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix test case error

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use group instead of ASG

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Ignore generated code

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Fix the concurrent issue

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into RollingUpgradeContext

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into upgrade_metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Move metrics related functions into metrics.go

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add missing parenthesis

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* load test fixes

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* handle scaling group not found

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Update upgrade.go

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* log one level up

* remove double logging

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* final push before RC release. (#254)

* support IgnoreDrainFailures flag

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add else condition

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* set min for maxUnavailable

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* calculateMaxUnavailable function

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* add a new coloumn (completePercentage)

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* disable debug logs by default

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics collecting issue (#249)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Revert "Fix metrics collecting issue (#249)" (#256)

This reverts commit f5dd1cb5f76f2b78cb15c53daed14032a2a4c6ec.

Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* Fix metrics calculation issue (#258)

* metricsMutex should be initialized

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Use InProcessingNode instead of Stringp[] so that it can have the status of steps

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Make the change backward compatible

Signed-off-by: xshao <Sheldon_Shao@intuit.com>

* Add mutex for InProcessingNode deleting

Signed-off-by: xshao <Sheldon_Shao@intuit.com>
Signed-off-by: sbadiger <shreyas_badiger@intuit.com>

* …
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.

3 participants