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

642: Cross-Zone Load Balancing Management #643

Merged
merged 10 commits into from
Sep 5, 2019
Merged

642: Cross-Zone Load Balancing Management #643

merged 10 commits into from
Sep 5, 2019

Conversation

tlake
Copy link
Contributor

@tlake tlake commented Aug 14, 2019

What does this pull request do?
Introduces a new feature to load balancers that allows configuration of cross-zone load balancing.

How should this be tested?
Spin up a new Layer0 dev API and:

  • use dev client to create load balancers both with and without the --disable-cross-zone flags
  • use dev client to test usage of the new load balancer subcommand "cross-zone":
    • with no args to view
    • with --enable flag
    • with --disable flag
  • use dev Terraform provider to test behavior of the load balancer's cross_zone field in a Terraform configuration:
    • omit the field
    • cross_zone = true
    • cross_zone = false

Checklist

  • Unit tests
  • Smoke tests (if applicable)
  • [ ] System tests (if applicable)
  • Documentation (if applicable)

closes #642

corresponding issue in JIRA: https://jiraims.rm.imshealth.com/browse/OCEMCM-5776

@tlake tlake self-assigned this Aug 14, 2019
@tlake tlake added this to the v0.11.0 milestone Aug 14, 2019
@tlake tlake changed the title Cross zone 642: Cross-Zone Load Balancing Management Aug 14, 2019
@sesh-kebab
Copy link
Contributor

Nice work and the quick turn around time! @zpatrick would be impressed.

Initial pass over the code looks fine. But doing a more thorough review pass and QA your RC, will take a bit more time given the current workload. Just wanted to let you know this hasn't been forgotten about.

@@ -285,3 +286,22 @@ func TestUpdateLoadBalancerIdleTimeout(t *testing.T) {

testutils.AssertEqual(t, received.IdleTimeout, idleTimeout)
}

func TestUpdateLoadBalancerCrossZone(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there an error condition that we can test, too?

Copy link
Contributor

@diemonster diemonster left a comment

Choose a reason for hiding this comment

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

Looks great! Let's make sure we aren't missing some Swagger configuration details, and it might be worth adding some additional rainy day tests in the API to keep parity with what we're testing in client.

Copy link
Contributor

@diemonster diemonster left a comment

Choose a reason for hiding this comment

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

Screen Shot 2019-09-05 at 2 09 20 PM

just manually tested, default elb has cross zone enabled. LGTM!

@diemonster diemonster merged commit 36a788e into develop Sep 5, 2019
@diemonster diemonster deleted the cross-zone branch September 5, 2019 21:19
tlake added a commit that referenced this pull request Sep 10, 2019
* Release v0.10.8: Merge master into develop (#601)

* Rebuild docs site post v0.10.7 release (#563)

* 549: Fix API service LB health check for v0.10.6 (#550)

When running l0-setup apply for a new instance, after the resources are created, the health check was not succeeding and timing out. This happened because l0-setup tries to hit /health while the API was coded to have the health endpoint on /admin/health.

This change was originally implemented in api-refactor branches, so we are applying the /admin/helth -> /health change to the master/develop branches

* 553: Support ELB Idle Timeout in CLI and Terraform when creating or updating load balancer (#557)

* 553: Allow Load Balancer Idle Timeout to be defined at creation time

* 553: Fix breaking unit tests on idle timeout type casting

* 553: Add update idle timeout cli functionality

* 553: More work on fixing unit tests

* 553: Fix command unit test, add printer unit test

* 553: Fix remaining unit tests, add documentation

* 553: Remove ELB references in docs and some review changes

* 553: Make idletimeout subcommand print if no update is required

* 553: Add additional documentation explaining what the Idle Timeout it

* 553: Remove unnecessary import statement in elb provider decorator

* 553: Make review fixes, dereferencing IdleTimeout, add more explicit error handle in lb attrib describe

* 553: Modify load balancer command to ParseInt timeout rather than Atoi conversion

* 533: Change spacing in cli reference docs page

* Sync develop and master - v0.10.7 release (#561)

* Merge for CI testing. (#527)

* v0.10.4 docfixes tlake (#492)

* Fixes in guides/ and reference/

* Update admonition

* Remove deprecated 'apply-smoketest' target

* Remove smoketests from CI pipeline

* Code review updates

* Clean up deprecated smoketest targets

* Update docs

* Update release notes and add script to update version (#495)

* Update release notes and add script to update version

* Add make script for updating release

* Update release notes

* Update travis with github release

* Update travis

* Test travis

* Update travis

* Fix travis

* Update travis to build binaries for github

* Update travis build and rework release flow

* Move to expenv and removed release notes, reduntant

* Update release notes with new flow

* PR Feedback changes, fix makefile

* Fix .zip missing in index

* Remove l0_version

* Remove dependency for prefix v

* PR Feedback changes'

* Fix regex

* Update to v0.10.5 for docs and back expenv

* Fix travis script

* Update travis script

* Update travis script

* Update travis script

* Fix travis script order

* Fix docker env in travis

* Fix docker login

* Add expenv to before_deploy

* Updated docs for v0.10.6

* Release v0.10.7 (#560)

* 549: Fix API service LB health check for v0.10.6 (#550)

When running l0-setup apply for a new instance, after the resources are created, the health check was not succeeding and timing out. This happened because l0-setup tries to hit /health while the API was coded to have the health endpoint on /admin/health.

This change was originally implemented in api-refactor branches, so we are applying the /admin/helth -> /health change to the master/develop branches

* 553: Support ELB Idle Timeout in CLI and Terraform when creating or updating load balancer (#557)

Adds CLI functionality for l0 loadbalancer create and a new subcommand l0 loadbalancer idletimeout. Create has a new optional flag --idle-timeout for create which can be used to specify the Idle Timeout of the load balancer at creation time. l0 loadbalancer idletimeout is an update subcommand that updates a given load balancer's idle timeout to a new value.

Adds Terraform support for defining a load balancer's Idle Timeout. A new key is introduced into the resource, idle_timeout.

* MAINT: Build docs for v0.10.7 release

* MAINT: Doc fixes post v0.10.7 release

* MAINT: Docs site rebuilt post v0.10.7 release

* Document breaking change within v0.10.x family (#574)

* 549: Fix API service LB health check for v0.10.6 (#550)

When running l0-setup apply for a new instance, after the resources are created, the health check was not succeeding and timing out. This happened because l0-setup tries to hit /health while the API was coded to have the health endpoint on /admin/health.

This change was originally implemented in api-refactor branches, so we are applying the /admin/helth -> /health change to the master/develop branches

* 553: Support ELB Idle Timeout in CLI and Terraform when creating or updating load balancer (#557)

* 553: Allow Load Balancer Idle Timeout to be defined at creation time

* 553: Fix breaking unit tests on idle timeout type casting

* 553: Add update idle timeout cli functionality

* 553: More work on fixing unit tests

* 553: Fix command unit test, add printer unit test

* 553: Fix remaining unit tests, add documentation

* 553: Remove ELB references in docs and some review changes

* 553: Make idletimeout subcommand print if no update is required

* 553: Add additional documentation explaining what the Idle Timeout it

* 553: Remove unnecessary import statement in elb provider decorator

* 553: Make review fixes, dereferencing IdleTimeout, add more explicit error handle in lb attrib describe

* 553: Modify load balancer command to ParseInt timeout rather than Atoi conversion

* 533: Change spacing in cli reference docs page

* Sync develop and master - v0.10.7 release (#561)

* Merge for CI testing. (#527)

* v0.10.4 docfixes tlake (#492)

* Fixes in guides/ and reference/

* Update admonition

* Remove deprecated 'apply-smoketest' target

* Remove smoketests from CI pipeline

* Code review updates

* Clean up deprecated smoketest targets

* Update docs

* Update release notes and add script to update version (#495)

* Update release notes and add script to update version

* Add make script for updating release

* Update release notes

* Update travis with github release

* Update travis

* Test travis

* Update travis

* Fix travis

* Update travis to build binaries for github

* Update travis build and rework release flow

* Move to expenv and removed release notes, reduntant

* Update release notes with new flow

* PR Feedback changes, fix makefile

* Fix .zip missing in index

* Remove l0_version

* Remove dependency for prefix v

* PR Feedback changes'

* Fix regex

* Update to v0.10.5 for docs and back expenv

* Fix travis script

* Update travis script

* Update travis script

* Update travis script

* Fix travis script order

* Fix docker env in travis

* Fix docker login

* Add expenv to before_deploy

* Updated docs for v0.10.6

* Release v0.10.7 (#560)

* 549: Fix API service LB health check for v0.10.6 (#550)

When running l0-setup apply for a new instance, after the resources are created, the health check was not succeeding and timing out. This happened because l0-setup tries to hit /health while the API was coded to have the health endpoint on /admin/health.

This change was originally implemented in api-refactor branches, so we are applying the /admin/helth -> /health change to the master/develop branches

* 553: Support ELB Idle Timeout in CLI and Terraform when creating or updating load balancer (#557)

Adds CLI functionality for l0 loadbalancer create and a new subcommand l0 loadbalancer idletimeout. Create has a new optional flag --idle-timeout for create which can be used to specify the Idle Timeout of the load balancer at creation time. l0 loadbalancer idletimeout is an update subcommand that updates a given load balancer's idle timeout to a new value.

Adds Terraform support for defining a load balancer's Idle Timeout. A new key is introduced into the resource, idle_timeout.

* MAINT: Build docs for v0.10.7 release

* MAINT: Doc fixes post v0.10.7 release

* MAINT: Docs site rebuilt post v0.10.7 release

* Document breaking change within v0.10.x family

* Add merge type for release branch into master

* 596: Update AWS SDK vendoring (#597)

* 596: Update AWS SDK vendoring

The vendored version of the AWS SDK is being updated to account for
recent changes that have been made in the SDK. As it pertains to the
issue that is being addressed, ECS ContainerDefinitions have added new
properties that we should support when l0 deploys are created.

* MAINT: Update broken README links

* MAINT: Update v0.10.8 docs

* use home dir for terraform plugin

`~/.terraform.d/plugins` rather than arbitrary install directory

* Capping AWS provider to pre-2.0 versions (#633)

* 4887: Maintenance (#634)

* Fix %d <-> string mismatch errors

* Bump aws provider version to >= 2.0.0

* Add 'owners' to aws_ami data sources

* Add request_payer to s3 bucket

* Add autoscaling to read capacity of dynamodb tables

* Update max_capacity

* Pin version to also be < 3.0.0

* Rev go version to 1.12

* Use personal access token for carbon-bot-user

* Update README, CI automation in prep for relocating docs to separate repo

* Move docs to separate layer0-docs repo

* Fix nesting typo

* Properly encode carbon-bot-user access token

* Add doc note about bot user access token

* 642: Cross-Zone Load Balancing Management (#643)

* Add cross-zone management

* Generate mocks and decorators

* Update axios version

* Enable cross-zone by default on load balancer creation

* Add cross-zone to load balancer attributes

* Add cross-zone to terraform data source

* Manual mock udpate

* Add cross-zone unittests

* Add cross-zone smoke tests

* Fix typos in load balancer cross-zone smoketests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure Cross-Zone Load Balancing for the Classic Load Balancer
3 participants