Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Adds Support for Managing AWS Load Balancer Type #366

Merged
merged 2 commits into from
May 26, 2021

Conversation

danehans
Copy link
Contributor

Extends and implements the Contour API for managing AWS load balancer types. Supports Classic ELB and NLB.

Fixes #187

xref: #336

cc: @BostjanBozic

@danehans danehans requested a review from a team as a code owner May 21, 2021 02:57
@danehans danehans requested review from skriss and youngnick and removed request for a team May 21, 2021 02:57
@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #366 (6c4d753) into main (51897f1) will increase coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
+ Coverage   55.66%   55.91%   +0.24%     
==========================================
  Files          19       19              
  Lines        1775     1785      +10     
==========================================
+ Hits          988      998      +10     
  Misses        761      761              
  Partials       26       26              
Impacted Files Coverage Δ
internal/objects/service/service.go 52.02% <100.00%> (+2.94%) ⬆️

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 51897f1...6c4d753. Read the comment docs.

@danehans danehans self-assigned this May 21, 2021
@danehans danehans added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 21, 2021
@danehans danehans added this to the 1.16.0 milestone May 21, 2021
Copy link
Contributor

@BostjanBozic BostjanBozic left a comment

Choose a reason for hiding this comment

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

@danehans I checked this, looks good. Only thing that I believe has to change is now aws-load-balancer-backend-protol annotation is handled, as it should be implemented only if Classic load balancer is used: https://projectcontour.io/guides/deploy-aws-nlb/

internal/objects/service/service.go Outdated Show resolved Hide resolved
internal/objects/service/service.go Outdated Show resolved Hide resolved
internal/objects/service/service.go Outdated Show resolved Hide resolved
internal/objects/service/service.go Outdated Show resolved Hide resolved
if provider == operatorv1alpha1.AWSLoadBalancerProvider &&
contour.Spec.NetworkPublishing.Envoy.Type == operatorv1alpha1.LoadBalancerServicePublishingType &&
contour.Spec.NetworkPublishing.Envoy.LoadBalancer.ProviderParameters.Type == operatorv1alpha1.AWSLoadBalancerProvider &&
contour.Spec.NetworkPublishing.Envoy.LoadBalancer.ProviderParameters.AWS != nil &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this not be obsolete, since next condition already includes != nil condition in it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AWS provider params is an optional field. Checking to make sure it's not nil and the param type is NLB.

Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
@danehans
Copy link
Contributor Author

@BostjanBozic commit 6c4d753 resolves your feedback above, PTAL.

@BostjanBozic
Copy link
Contributor

@danehans LGTM

@youngnick youngnick merged commit 33ef23c into projectcontour:main May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add AWS NLB Support
4 participants