Skip to content

Commit 167e10b

Browse files
shreyas-badigerEytan Avisrorgaromonegroeytan-avisrorshrinandj
authored
EOL of upgrade-manager-v0 and make upgrade-manager-v1 the default. (keikoproj#319)
* Delete README.md Signed-off-by: Eytan Avisror <[email protected]> * delete all Signed-off-by: Eytan Avisror <[email protected]> * scaffolding Signed-off-by: Eytan Avisror <[email protected]> * add API Signed-off-by: Eytan Avisror <[email protected]> * initial code Signed-off-by: Eytan Avisror <[email protected]> * add more scaffolding Signed-off-by: Eytan Avisror <[email protected]> * Add kubernetes API calls Signed-off-by: Eytan Avisror <[email protected]> * aws API calls Signed-off-by: Eytan Avisror <[email protected]> * AWS API calls & Drift detection Signed-off-by: Eytan Avisror <[email protected]> * initial rotation logic Signed-off-by: Eytan Avisror <[email protected]> * Implemented RollingUpgrade object validation. (#176) * Validation step to check Nodes and ASG launch configs Signed-off-by: shreyas-badiger <[email protected]> * Validating launch definition after a rolling upgrade Signed-off-by: shreyas-badiger <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Validating launch definition after a rolling upgrade Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Resolve error log message and return statement Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * release 0.13 (#115) * release 0.13 * Update CHANGELOG.md Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * bump version (#116) Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Terminate unjoined nodes Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Resolving PR comments Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version 0.14. (#121) Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to 0.15-dev. Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix typo in README.md. (#125) Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Ignore the terminated instance during upgrade Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Added WARNING prefix in the logging Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Apply suggestions from code review Co-authored-by: Kevin Downey <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Capitalize sprintf to Sprintf Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Upgrade to Go 1.15 (#128) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix few typos and simplify error returns, remove redundant types (#131) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Readiness gates implementation for eager mode (#130) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * release 0.13 (#115) * release 0.13 * Update CHANGELOG.md Signed-off-by: sbadiger <[email protected]> * bump version (#116) Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version 0.14. (#121) Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to 0.15-dev. Signed-off-by: sbadiger <[email protected]> * Fix bug when switching to launch templates (#136) * Update rollingupgrade_controller.go * Update rollingupgrade_controller.go Signed-off-by: Eytan Avisror <[email protected]> * spacing fixes Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Extract script runner to a separate type; fix work with env. variables (#132) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version v0.15 (#137) Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to v0.16-dev. Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Propagate parent env variables to allow to talk with API Server (#144) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump Golang CI action to fix failed CI run (#146) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Simplify (#145) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add Expiration to cache and do not refresh ASG if cache is not expired (#143) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix documentation for uniform across AZ Update strategy and fix typos (#147) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Move cluster state from package level to a cluster state impl (#148) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Simplify work with intstr type. (#149) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * If instance is in standby mode already, just return (#138) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Handle terminated instances gracefully. (#150) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Template version comparison fix (#155) * get template version Signed-off-by: Eytan Avisror <[email protected]> * fix tests Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * release 0.16 (#157) Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * bump version to 0.17-dev (#158) Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * Test node uncordon when postDrain / postDrainWait script fails Signed-off-by: Adam Malcontenti-Wilson <[email protected]> Signed-off-by: sbadiger <[email protected]> * Abort on strategy failure instead of continuing (#152) * Abort on strategy failure instead of continuing Signed-off-by: Adam Malcontenti-Wilson <[email protected]> * Remove unformatted error message placeholder Signed-off-by: Adam Malcontenti-Wilson <[email protected]> * Explictly specify strategy for tests Signed-off-by: Adam Malcontenti-Wilson <[email protected]> Signed-off-by: sbadiger <[email protected]> * use NamespacedName (#160) Signed-off-by: Eytan Avisror <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version v0.17 (#161) Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to v0.18-dev (#162) Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Move constants to types so that they can be reused (#167) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Remove separate module for pkg/log (#168) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump dependencies. (#169) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * use standard fmt.Errorf to format error message; unify error format (#171) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix namespaced name order (#170) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add instance id to the logs (#173) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump golang and busybox (#172) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Expose template list and other execution errors to logs (#166) * Log and return wrapped launchtemplate error Signed-off-by: Adam Malcontenti-Wilson <[email protected]> * Expose execution error in logs Signed-off-by: Adam Malcontenti-Wilson <[email protected]> Signed-off-by: sbadiger <[email protected]> * output can contain other messages from API Server, so be more relaxed (#174) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Delete README.md Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * delete all Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * scaffolding Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * add API Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * initial code Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * add more scaffolding Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add kubernetes API calls Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * aws API calls Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * AWS API calls & Drift detection Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * validate() function Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * modified validate() Signed-off-by: sbadiger <[email protected]> * modified validate() Signed-off-by: sbadiger <[email protected]> * initial rotation logic Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * basic script_runner without any modifications Signed-off-by: sbadiger <[email protected]> * Fix all the vet related errors Signed-off-by: sbadiger <[email protected]> Co-authored-by: Alfredo Garo <[email protected]> Co-authored-by: Eytan Avisror <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Co-authored-by: Craig Robson <[email protected]> Co-authored-by: Kevin Downey <[email protected]> Co-authored-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shreyas Badiger <[email protected]> Co-authored-by: Adam Malcontenti-Wilson <[email protected]> Co-authored-by: Adam Malcontenti-Wilson <[email protected]> Co-authored-by: Eytan Avisror <[email protected]> * Controller v2: Implementation of Instance termination (#178) * fix make vet errors. Signed-off-by: sbadiger <[email protected]> * Terminate instances and run v2 for first time. Signed-off-by: sbadiger <[email protected]> * Addressing review comments Signed-off-by: sbadiger <[email protected]> * addressing more review comments Signed-off-by: sbadiger <[email protected]> * Log error message Signed-off-by: sbadiger <[email protected]> * error handling for instance tagging Signed-off-by: sbadiger <[email protected]> * Migrate Script Runner (#179) * Basic script runner Signed-off-by: Eytan Avisror <[email protected]> * Update upgrade.go Signed-off-by: Eytan Avisror <[email protected]> * Implemented node drain. (#181) * Eager mode implementation (#183) * Eager mode implementation Signed-off-by: sbadiger <[email protected]> * Metrics features (#189) Signed-off-by: xshao <[email protected]> * Process the batch rotation in parallel (#192) * Process the batch rotation in parallel Signed-off-by: sbadiger <[email protected]> * addressing review comments Signed-off-by: sbadiger <[email protected]> * Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195) Signed-off-by: sbadiger <[email protected]> * Refine metrics implementation to support goroutines (#196) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code (#201) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Fix bug in deleting the entry in syncMap (#203) Signed-off-by: sbadiger <[email protected]> * Unit tests for controller-v2 (#215) * Unit tests Signed-off-by: sbadiger <[email protected]> * minor change in accessing the namespace name Signed-off-by: sbadiger <[email protected]> * move helper functions to a differnt file Signed-off-by: sbadiger <[email protected]> * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: renamed some methods related to metrics (#224) Signed-off-by: sbadla1 <[email protected]> * #2286: removed version from metric namespace (#227) Signed-off-by: sbadla1 <[email protected]> * Create RollingUpgradeContext (#234) * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> * 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 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> * resolve compile errors due to merge conflict Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> * 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 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2285: renamed some methods related to metrics (#224) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2286: removed version from metric namespace (#227) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * resolve compile errors due to merge conflict Signed-off-by: sbadiger <[email protected]> * move drain-manager to reconciler Signed-off-by: sbadiger <[email protected]> * initialize RollingUpgrade object Signed-off-by: sbadiger <[email protected]> * use bool instead of count for standby function Signed-off-by: sbadiger <[email protected]> * refactor in-progress and standby code Signed-off-by: sbadiger <[email protected]> * rename instance standby function Signed-off-by: sbadiger <[email protected]> * DrainManager changes in unit test files Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> * V2 controller metrics concurrency fix (#231) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into upgrade_metrics.go Signed-off-by: xshao <[email protected]> * Move metrics related functions into metrics.go Signed-off-by: xshao <[email protected]> * add missing parenthesis (#239) * metricsMutex should be initialized (#240) Signed-off-by: xshao <[email protected]> * 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 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2285: renamed some methods related to metrics (#224) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2286: removed version from metric namespace (#227) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * resolve compile errors due to merge conflict Signed-off-by: sbadiger <[email protected]> * move drain-manager to reconciler Signed-off-by: sbadiger <[email protected]> * initialize RollingUpgrade object Signed-off-by: sbadiger <[email protected]> * use bool instead of count for standby function Signed-off-by: sbadiger <[email protected]> * refactor in-progress and standby code Signed-off-by: sbadiger <[email protected]> * rename instance standby function Signed-off-by: sbadiger <[email protected]> * DrainManager changes in unit test files Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> Signed-off-by: sbadiger <[email protected]> * V2 controller metrics concurrency fix (#231) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into upgrade_metrics.go Signed-off-by: xshao <[email protected]> * Move metrics related functions into metrics.go Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * add missing parenthesis Signed-off-by: sbadiger <[email protected]> * load test fixes Signed-off-by: sbadiger <[email protected]> * handle scaling group not found Signed-off-by: sbadiger <[email protected]> * Update upgrade.go Signed-off-by: sbadiger <[email protected]> * log one level up * remove double logging Signed-off-by: sbadiger <[email protected]> * final push before RC release. (#254) * support IgnoreDrainFailures flag Signed-off-by: sbadiger <[email protected]> * add else condition Signed-off-by: sbadiger <[email protected]> * set min for maxUnavailable Signed-off-by: sbadiger <[email protected]> * calculateMaxUnavailable function Signed-off-by: sbadiger <[email protected]> * add a new coloumn (completePercentage) Signed-off-by: sbadiger <[email protected]> * disable debug logs by default Signed-off-by: sbadiger <[email protected]> * Fix metrics collecting issue (#249) * metricsMutex should be initialized Signed-off-by: xshao <[email protected]> * Use InProcessingNode instead of Stringp[] so that it can have the status of steps Signed-off-by: xshao <[email protected]> * Revert "Fix metrics collecting issue (#249)" (#256) This reverts commit f5dd1cb5f76f2b78cb15c53daed14032a2a4c6ec. * Fix metrics calculation issue (#258) * metricsMutex should be initialized Signed-off-by: xshao <[email protected]> * Use InProcessingNode instead of Stringp[] so that it can have the status of steps Signed-off-by: xshao <[email protected]> * Make the change backward compatible Signed-off-by: xshao <[email protected]> * Make the change backward compatible Signed-off-by: xshao <[email protected]> * Add mutex for InProcessingNode deleting Signed-off-by: xshao <[email protected]> * Add a mock for test and update version in Makefile (#262) Signed-off-by: sbadiger <[email protected]> * and CR end time (#264) Signed-off-by: sbadiger <[email protected]> * upgrade-manager-v2: expose totalProcessing time and other metrics (#265) * and CR end time Signed-off-by: sbadiger <[email protected]> * expose totalProcessing time and other metrics Signed-off-by: sbadiger <[email protected]> * addressing review comments Signed-off-by: sbadiger <[email protected]> * upgrade-manager-v2: remove function duplicate declaration. (#266) * and CR end time Signed-off-by: sbadiger <[email protected]> * expose totalProcessing time and other metrics Signed-off-by: sbadiger <[email protected]> * addressing review comments Signed-off-by: sbadiger <[email protected]> * remove function duplication Signed-off-by: sbadiger <[email protected]> * Carry the metrics status in RollingUpgrade CR (#267) * Update metrics status at same time Signed-off-by: xshao <[email protected]> * Update metrics status when terminating instance Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * move cloud discovery after nodeInterval / drainInterval wait (#270) Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * expose totalProcessing time and other metrics Signed-off-by: sbadiger <[email protected]> * addressing review comments Signed-off-by: sbadiger <[email protected]> * remove function duplication Signed-off-by: sbadiger <[email protected]> * Carry the metrics status in RollingUpgrade CR (#267) * Update metrics status at same time Signed-off-by: xshao <[email protected]> * Update metrics status when terminating instance Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * move cloud discovery after nodeInterval / drainInterval wait Signed-off-by: sbadiger <[email protected]> * Add watch event for cluster nodes instead of API calls Signed-off-by: sbadiger <[email protected]> * upon node deletion, remove it from syncMap as well Signed-off-by: sbadiger <[email protected]> * Add nodeEvents handler instead of watch handler Signed-off-by: sbadiger <[email protected]> * Ignore Reconciles on nodeEvents Signed-off-by: sbadiger <[email protected]> * Add comments Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sheldon Shao <[email protected]> * 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 <[email protected]> * expose totalProcessing time and other metrics Signed-off-by: sbadiger <[email protected]> * addressing review comments Signed-off-by: sbadiger <[email protected]> * remove function duplication Signed-off-by: sbadiger <[email protected]> * Carry the metrics status in RollingUpgrade CR (#267) * Update metrics status at same time Signed-off-by: xshao <[email protected]> * Update metrics status when terminating instance Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> * Add terminated step Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * move cloud discovery after nodeInterval / drainInterval wait Signed-off-by: sbadiger <[email protected]> * Add watch event for cluster nodes instead of API calls Signed-off-by: sbadiger <[email protected]> * upon node deletion, remove it from syncMap as well Signed-off-by: sbadiger <[email protected]> * Add nodeEvents handler instead of watch handler Signed-off-by: sbadiger <[email protected]> * Ignore Reconciles on nodeEvents Signed-off-by: sbadiger <[email protected]> * Add comments Signed-off-by: sbadiger <[email protected]> * Set nextbatch to standBy while waiting for terminate * Avoid parallel reconcile operation per ASG * add default requeue time Co-authored-by: Sheldon Shao <[email protected]> * upgrade-manager-v2: Fix unit tests (#275) * Delete README.md Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * delete all Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * scaffolding Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * add API Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * initial code Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * add more scaffolding Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add kubernetes API calls Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * aws API calls Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * AWS API calls & Drift detection Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * initial rotation logic Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Implemented RollingUpgrade object validation. (#176) * Validation step to check Nodes and ASG launch configs Signed-off-by: shreyas-badiger <[email protected]> * Validating launch definition after a rolling upgrade Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Validating launch definition after a rolling upgrade Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Resolve error log message and return statement Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * release 0.13 (#115) * release 0.13 * Update CHANGELOG.md Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * bump version (#116) Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Terminate unjoined nodes Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Resolving PR comments Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version 0.14. (#121) Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to 0.15-dev. Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix typo in README.md. (#125) Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Ignore the terminated instance during upgrade Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Added WARNING prefix in the logging Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Apply suggestions from code review Co-authored-by: Kevin Downey <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Capitalize sprintf to Sprintf Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Upgrade to Go 1.15 (#128) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix few typos and simplify error returns, remove redundant types (#131) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * Readiness gates implementation for eager mode (#130) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * release 0.13 (#115) * release 0.13 * Update CHANGELOG.md Signed-off-by: sbadiger <[email protected]> * bump version (#116) Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version 0.14. (#121) Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to 0.15-dev. Signed-off-by: sbadiger <[email protected]> * Fix bug when switching to launch templates (#136) * Update rollingupgrade_controller.go * Update rollingupgrade_controller.go Signed-off-by: Eytan Avisror <[email protected]> * spacing fixes Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Extract script runner to a separate type; fix work with env. variables (#132) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version v0.15 (#137) Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to v0.16-dev. Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Propagate parent env variables to allow to talk with API Server (#144) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump Golang CI action to fix failed CI run (#146) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Simplify (#145) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add Expiration to cache and do not refresh ASG if cache is not expired (#143) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix documentation for uniform across AZ Update strategy and fix typos (#147) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Move cluster state from package level to a cluster state impl (#148) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Simplify work with intstr type. (#149) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * If instance is in standby mode already, just return (#138) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Handle terminated instances gracefully. (#150) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Template version comparison fix (#155) * get template version Signed-off-by: Eytan Avisror <[email protected]> * fix tests Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * release 0.16 (#157) Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * bump version to 0.17-dev (#158) Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * Test node uncordon when postDrain / postDrainWait script fails Signed-off-by: Adam Malcontenti-Wilson <[email protected]> Signed-off-by: sbadiger <[email protected]> * Abort on strategy failure instead of continuing (#152) * Abort on strategy failure instead of continuing Signed-off-by: Adam Malcontenti-Wilson <[email protected]> * Remove unformatted error message placeholder Signed-off-by: Adam Malcontenti-Wilson <[email protected]> * Explictly specify strategy for tests Signed-off-by: Adam Malcontenti-Wilson <[email protected]> Signed-off-by: sbadiger <[email protected]> * use NamespacedName (#160) Signed-off-by: Eytan Avisror <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Set version and update CHANGELOG for version v0.17 (#161) Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump version to v0.18-dev (#162) Signed-off-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Move constants to types so that they can be reused (#167) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Remove separate module for pkg/log (#168) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump dependencies. (#169) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * use standard fmt.Errorf to format error message; unify error format (#171) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix namespaced name order (#170) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add instance id to the logs (#173) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Bump golang and busybox (#172) Signed-off-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Signed-off-by: sbadiger <[email protected]> * Expose template list and other execution errors to logs (#166) * Log and return wrapped launchtemplate error Signed-off-by: Adam Malcontenti-Wilson <[email protected]> * Expose execution error in logs Signed-off-by: Adam Malcontenti-Wilson <[email protected]> Signed-off-by: sbadiger <[email protected]> * output can contain other messages from API Server, so be more relaxed (#174) Signed-off-by: Oleg Atamanenko <[email protected]> Signed-off-by: sbadiger <[email protected]> * Delete README.md Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * delete all Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * scaffolding Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * add API Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * initial code Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * add more scaffolding Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Add kubernetes API calls Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * aws API calls Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * AWS API calls & Drift detection Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * validate() function Signed-off-by: shreyas-badiger <[email protected]> Signed-off-by: sbadiger <[email protected]> * modified validate() Signed-off-by: sbadiger <[email protected]> * modified validate() Signed-off-by: sbadiger <[email protected]> * initial rotation logic Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * basic script_runner without any modifications Signed-off-by: sbadiger <[email protected]> * Fix all the vet related errors Signed-off-by: sbadiger <[email protected]> Co-authored-by: Alfredo Garo <[email protected]> Co-authored-by: Eytan Avisror <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Co-authored-by: Shri Javadekar <[email protected]> Co-authored-by: Craig Robson <[email protected]> Co-authored-by: Kevin Downey <[email protected]> Co-authored-by: Oleg Atamanenko <[email protected]> Co-authored-by: Shreyas Badiger <[email protected]> Co-authored-by: Adam Malcontenti-Wilson <[email protected]> Co-authored-by: Adam Malcontenti-Wilson <[email protected]> Co-authored-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Controller v2: Implementation of Instance termination (#178) * fix make vet errors. Signed-off-by: sbadiger <[email protected]> * Terminate instances and run v2 for first time. Signed-off-by: sbadiger <[email protected]> * Addressing review comments Signed-off-by: sbadiger <[email protected]> * addressing more review comments Signed-off-by: sbadiger <[email protected]> * Log error message Signed-off-by: sbadiger <[email protected]> * error handling for instance tagging Signed-off-by: sbadiger <[email protected]> * Migrate Script Runner (#179) * Basic script runner Signed-off-by: Eytan Avisror <[email protected]> * Update upgrade.go Signed-off-by: Eytan Avisror <[email protected]> Signed-off-by: sbadiger <[email protected]> * Implemented node drain. (#181) Signed-off-by: sbadiger <[email protected]> * Eager mode implementation (#183) * Eager mode implementation Signed-off-by: sbadiger <[email protected]> * Metrics features (#189) Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * Process the batch rotation in parallel (#192) * Process the batch rotation in parallel Signed-off-by: sbadiger <[email protected]> * addressing review comments Signed-off-by: sbadiger <[email protected]> * Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195) Signed-off-by: sbadiger <[email protected]> * Refine metrics implementation to support goroutines (#196) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * Ignore generated code (#201) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * Fix bug in deleting the entry in syncMap (#203) Signed-off-by: sbadiger <[email protected]> * Unit tests for controller-v2 (#215) * Unit tests Signed-off-by: sbadiger <[email protected]> * minor change in accessing the namespace name Signed-off-by: sbadiger <[email protected]> * move helper functions to a differnt file Signed-off-by: sbadiger <[email protected]> * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2285: renamed some methods related to metrics (#224) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2286: removed version from metric namespace (#227) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * Create RollingUpgradeContext (#234) * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> * resolve compile errors due to merge conflict Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2285: renamed some methods related to metrics (#224) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2286: removed version from metric namespace (#227) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * resolve compile errors due to merge conflict Signed-off-by: sbadiger <[email protected]> * move drain-manager to reconciler Signed-off-by: sbadiger <[email protected]> * initialize RollingUpgrade object Signed-off-by: sbadiger <[email protected]> * use bool instead of count for standby function Signed-off-by: sbadiger <[email protected]> * refactor in-progress and standby code Signed-off-by: sbadiger <[email protected]> * rename instance standby function Signed-off-by: sbadiger <[email protected]> * DrainManager changes in unit test files Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> Signed-off-by: sbadiger <[email protected]> * V2 controller metrics concurrency fix (#231) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into upgrade_metrics.go Signed-off-by: xshao <[email protected]> * Move metrics related functions into metrics.go Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * add missing parenthesis (#239) Signed-off-by: sbadiger <[email protected]> * metricsMutex should be initialized (#240) Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * 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 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * log cloud discovery failure Signed-off-by: sbadiger <[email protected]> * Create RollingUpgrade Context Signed-off-by: sbadiger <[email protected]> * rollingupgrade context Signed-off-by: sbadiger <[email protected]> * #2285: rollup CR statistic metrics in v2 (#218) * #2285: rollup CR statistic metrics in v2 Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> * #2285: updated metric flags Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2285: renamed some methods related to metrics (#224) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * #2286: removed version from metric namespace (#227) Signed-off-by: sbadla1 <[email protected]> Signed-off-by: sbadiger <[email protected]> * resolve compile errors due to merge conflict Signed-off-by: sbadiger <[email protected]> * move drain-manager to reconciler Signed-off-by: sbadiger <[email protected]> * initialize RollingUpgrade object Signed-off-by: sbadiger <[email protected]> * use bool instead of count for standby function Signed-off-by: sbadiger <[email protected]> * refactor in-progress and standby code Signed-off-by: sbadiger <[email protected]> * rename instance standby function Signed-off-by: sbadiger <[email protected]> * DrainManager changes in unit test files Signed-off-by: sbadiger <[email protected]> Co-authored-by: Sahil Badla <[email protected]> Signed-off-by: sbadiger <[email protected]> * V2 controller metrics concurrency fix (#231) * Refine the metrics status Signed-off-by: xshao <[email protected]> * Refine the metrics status Signed-off-by: xshao <[email protected]> * Fix test case error Signed-off-by: xshao <[email protected]> * Use group instead of ASG Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Ignore generated code Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Fix the concurrent issue Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into RollingUpgradeContext Signed-off-by: xshao <[email protected]> * Move metrics related functions into upgrade_metrics.go Signed-off-by: xshao <[email protected]> * Move metrics related functions into metrics.go Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * add missing parenthesis Signed-off-by: sbadiger <[email protected]> * load test fixes Signed-off-by: sbadiger <[email protected]> * handle scaling group not found Signed-off-by: sbadiger <[email protected]> * Update upgrade.go Signed-off-by: sbadiger <[email protected]> * log one level up * remove double logging Signed-off-by: sbadiger <[email protected]> * final push before RC release. (#254) * support IgnoreDrainFailures flag Signed-off-by: sbadiger <[email protected]> * add else condition Signed-off-by: sbadiger <[email protected]> * set min for maxUnavailable Signed-off-by: sbadiger <[email protected]> * calculateMaxUnavailable function Signed-off-by: sbadiger <[email protected]> * add a new coloumn (completePercentage) Signed-off-by: sbadiger <[email protected]> * disable debug logs by default Signed-off-by: sbadiger <[email protected]> * Fix metrics collecting issue (#249) * metricsMutex should be initialized Signed-off-by: xshao <[email protected]> * Use InProcessingNode instead of Stringp[] so that it can have the status of steps Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * Revert "Fix metrics collecting issue (#249)" (#256) This reverts commit f5dd1cb5f76f2b78cb15c53daed14032a2a4c6ec. Signed-off-by: sbadiger <[email protected]> * Fix metrics calculation issue (#258) * metricsMutex should be initialized Signed-off-by: xshao <[email protected]> * Use InProcessingNode instead of Stringp[] so that it can have the status of steps Signed-off-by: xshao <[email protected]> * Make the change backward compatible Signed-off-by: xshao <[email protected]> * Make the change backward compatible Signed-off-by: xshao <[email protected]> * Add mutex for InProcessingNode deleting Signed-off-by: xshao <[email protected]> Signed-off-by: sbadiger <[email protected]> * …
1 parent eaea1ab commit 167e10b

File tree

100 files changed

+4777
-7647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+4777
-7647
lines changed

.github/CHANGELOG.md

Lines changed: 78 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,84 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [v0.21] - 2021-06-16
5-
6-
1e430f3 additional check in setting maxUnavailable (#255)
7-
8-
## [v0.20] - 2021-06-14
9-
10-
3c70352 Upgrade to go 1.16 (#184)
11-
42cf8d4 Improve warning logs (#242)
12-
fce274e fix: status update failing due to unomitted fields (#251)
13-
14-
## [v0.19] - 2021-05-18
15-
16-
5860eb7 #2285: renamed some methods related to metrics (#223)
17-
4da0472 feat: add go-env support (#207)
18-
cc1d2f6 fix: documentation and minor naming changes (#208)
19-
3c26418 fix: log testenv errors (#209)
20-
67cbab6 fix: logging improvements (#211)
21-
708d88e fix: documentation improvements (#210)
22-
95e28cd #2285: updated metric namespace for consistency with others (#219)
23-
30b9ad9 #2285: added CR status metrics (#217)
24-
51e3ff8 Issue 2108: step duration metrics to v1 (#216)
25-
a1af90b Cache the ASG before nodes are rotated in a loop (#212)
26-
27-
## [v0.18] - 2021-03-23
28-
29-
8b2d320 Fix for Launch definition validation. Consider only the "InService" instances. (#197)
30-
42f810c Fail the CR for drain failures, when IgnoreDrainFailures isn't set. (#185)
31-
f5c9457 output can contain other messages from API Server, so be more relaxed (#174)
32-
391b2fb Expose template list and other execution errors to logs (#166)
33-
757b669 Bump golang and busybox (#172)
34-
b8f69e8 Add instance id to the logs (#173)
35-
ac7be6b Fix namespaced name order (#170)
36-
51f469d use standard fmt.Errorf to format error message; unify error format (#171)
37-
b552c69 Bump dependencies. (#169)
38-
36a2784 Remove separate module for pkg/log (#168)
39-
237f93d Move constants to types so that they can be reused (#167)
4+
## [v1.0.4] - 2021-10-04
5+
995b81b controller flags for ignoreDrainFailures and drainTimeout (#307)
6+
7+
8+
## [v1.0.3] - 2021-09-03
9+
6252725 revert #300 (#305)
10+
df08ab0 Set Instances to StandBy in batches (#303)
11+
e77431c fix: fix panic when using MixedInstancesPolicy (#298)
12+
1e6d29d Add ignoreDrainFailure and DrainTimeout as controller arguements (#300)
13+
14+
15+
## [v1.0.2] - 2021-08-05
16+
d73da1b replace launchTemplate latest string with version number (#296)
17+
18+
## [v1.0.1] - 2021-08-05
19+
52d80d9 check for ASG's launch template version instead latest. (#293)
20+
c35445d Controller v2: fix BDD template and update Dockerfile with bash (#292)
21+
db54e0b Controller v2: fix BDD template (#291)
22+
b698dd6 Controller v2: remove cleaning up ruObject as BDD already does. (#290)
23+
86412d5 Controller v2: increase memory/CPU limit and update args (#289)
24+
2d8651c Controller v2: update args (#288)
25+
835fd0d V2 bdd (#286)
26+
998de0d V2 bdd (#285)
27+
3841cc7 #2122: bdd changes for v2 (#284)
28+
93626b4 Controller v2: BDD cron update (#283)
29+
1be8190 Controller v2: BDD cron update (#282)
30+
62c2255 Controller v2: BDD cron update (#280)
31+
42abe52 Controller v2: BDD cron update (#279)
32+
5bdc134 Controller v2 bdd changes (#278)
33+
34+
## [v1.0.0] - 2021-07-21
35+
7a4766d (HEAD -> controller-v2, origin/controller-v2) upgrade-manager-v2: Add CI github action, fix lint errors. (#276)
36+
00f7e89 upgrade-manager-v2: Fix unit tests (#275)
37+
0e64929 upgrade-manager-v2: Process next batch while waiting on nodeInterval period. (#273)
38+
b2b39a0 upgrade-manager-v2: Add nodeEvents handler instead of a watch handler (#272)
39+
c0a163b move cloud discovery after nodeInterval / drainInterval wait (#270)
40+
b15838e Carry the metrics status in RollingUpgrade CR (#267)
41+
610f454 upgrade-manager-v2: remove function duplicate declaration. (#266)
42+
a4e0e84 upgrade-manager-v2: expose totalProcessing time and other metrics (#265)
43+
2390ea0 and CR end time (#264)
44+
79db022 (tag: v1.0.0-RC1) Add a mock for test and update version in Makefile (#262)
45+
3eafd00 Fix metrics calculation issue (#258)
46+
376657f Revert "Fix metrics collecting issue (#249)" (#256)
47+
f5dd1cb Fix metrics collecting issue (#249)
48+
066731d final push before RC release. (#254)
49+
18e0e75 upgrade-manager-v2: Load test fixes (#245)
50+
1fc5847 metricsMutex should be initialized (#240)
51+
a9ac50f add missing parenthesis (#239)
52+
6fef5fd V2 controller metrics concurrency fix (#231)
53+
a490333 upgrade-manager-v2: Move DrainManager back to Reconciler (#236)
54+
b659e0f Resolve compile errors caused by merge conflict. (#235)
55+
b664fdd Create RollingUpgradeContext (#234)
56+
b8d0e72 #2286: removed version from metric namespace (#227)
57+
c445af9 #2285: renamed some methods related to metrics (#224)
58+
1f0f075 #2285: rollup CR statistic metrics in v2 (#218)
59+
d5935e3 Unit tests for controller-v2 (#215)
60+
665c64b Fix bug in deleting the entry in syncMap (#203)
61+
77f985c Ignore generated code (#201)
62+
71b310a Refine metrics implementation to support goroutines (#196)
63+
668c5d8 Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195)
64+
728dae9 Process the batch rotation in parallel (#192)
65+
14e950e Metrics features (#189)
66+
11d3ae6 Eager mode implementation (#183)
67+
57df5a5 Implemented node drain. (#181)
68+
dd6a332 Migrate Script Runner (#179)
69+
2c1d8e7 Controller v2: Implementation of Instance termination (#178)
70+
7cb15b0 Fix all the "make vet" errors in Controller V2 branch. (#177)
71+
59e9b0d Implemented RollingUpgrade object validation. (#176)
72+
5cb9efb initial rotation logic
73+
6b8dad5 AWS API calls & Drift detection
74+
335fb4f aws API calls
75+
41bd571 Add kubernetes API calls
76+
8f33f1e add more scaffolding
77+
25644a6 initial code
78+
87afbd6 add API
79+
2816490 scaffolding
80+
3ad13b8 delete all
81+
6ce7953 Delete README.md
4082

4183
## [v0.17] - 2020-12-11
4284

.github/CONTRIBUTING.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# How to contribute
22

3-
## Development
4-
- Open an issue and discuss the feature / bug you want
5-
- Fork (<https://github.com/keikoproj/upgrade-manager/fork>)
6-
- Clone your fork
7-
- Install [kubebuilder](https://book.kubebuilder.io/quick-start.html)
8-
- `make test` to ensure everything is working
9-
- Create your feature branch (`git checkout -b feature/fooBar`)
10-
- Implement your change and add tests
11-
- `make test` to ensure everything is working
12-
- Commit your changes (`git commit -am 'Add some fooBar'`)
13-
- Add a "Testing Done" section in the commit message. Be as explicit as possible about all the manual and automated tests performed.
14-
- Push to the branch (`git push origin feature/fooBar`)
15-
- Create a new Pull Request
3+
1. Fork it (<https://github.com/keikoproj/upgrade-manager/fork>)
4+
2. Add your fork as a git remote named, say `reviews`.
5+
2. Open an issue and discuss the feature / bug
6+
3. Create your feature branch in your fork (`git checkout -b feature/fooBar`)
7+
4. Commit your changes (`git commit -am 'Add some fooBar'`)
8+
5. Add a "Testing Done" section in the commit message. Be as explicit as possible about all the manual and automated tests performed.
9+
6. Push to the branch (`git push reviews feature/fooBar`)
10+
7. Make sure unit tests and any static-analysis (linting) tests are passing
11+
8. Create a new Pull Request
1612

1713
## How to report a bug
1814

.github/workflows/bdd.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: BDD
22

33
on:
4-
schedule:
5-
- cron: '0 7 * * *' # UTC is being used, 07:00 am would be 12:00am in PT
4+
push:
5+
branches:
6+
- master
67

78
jobs:
89
build:
@@ -41,4 +42,5 @@ jobs:
4142
$HOME/go/bin/godog
4243
4344
- name: Cleanup
44-
run: kubectl delete deployment upgrade-manager-controller-manager -n upgrade-manager-system
45+
run: |
46+
kubectl delete deployment upgrade-manager-controller-manager -n upgrade-manager-system

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
jobs:
1515
build:
1616
name: CI # Lint, Test, Codecov, Docker build & Push
17+
if: github.repository == 'keikoproj/upgrade-manager'
1718
runs-on: ubuntu-latest
1819
steps:
1920

@@ -39,7 +40,6 @@ jobs:
3940
mv kubebuilder_${version}_linux_${arch} kubebuilder && sudo mv kubebuilder /usr/local/
4041
# update your PATH to include /usr/local/kubebuilder/bin
4142
export PATH=$PATH:/usr/local/kubebuilder/bin
42-
4343
- name: Run Tests
4444
run: make test
4545

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ bin
1212

1313
# Output of the go coverage tool, specifically when used with LiteIDE
1414
*.out
15-
coverage.txt
1615

1716
# Kubernetes Generated files - skip generated files, except for vendored files
17+
1818
!vendor/**/zz_generated.*
19+
!api/**/zz_generated.*
1920

2021
# editor and IDE paraphernalia
2122
.idea

.go-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Build the manager binary
2-
FROM golang:1.16 as builder
2+
FROM golang:1.15 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests
66
COPY go.mod go.mod
77
COPY go.sum go.sum
88
# cache deps before building and copying source so that we don't need to re-download as much
99
# and so that source changes don't invalidate our downloaded layer
10-
COPY pkg pkg
1110
RUN go mod download
1211

1312
# Copy the go source
@@ -18,19 +17,15 @@ COPY controllers/ controllers/
1817
# Build
1918
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
2019

21-
# Add kubectl
22-
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v1.14.10/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl
23-
RUN chmod +x /usr/local/bin/kubectl
24-
2520
# Add busybox
2621
FROM busybox:1.32.1 as shelladder
2722

2823
# Use distroless as minimal base image to package the manager binary
2924
# Refer to https://github.com/GoogleContainerTools/distroless for more details
30-
FROM gcr.io/distroless/static:latest
25+
FROM gcr.io/distroless/static:nonroot
3126
WORKDIR /
27+
COPY --from=builder /workspace/manager .
28+
USER 65532:65532
3229

3330
COPY --from=shelladder /bin/sh /bin/sh
34-
COPY --from=builder /workspace/manager .
35-
COPY --from=builder /usr/local/bin/kubectl /usr/local/bin/kubectl
3631
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)