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

Add a capability that allow user to define a cluster local gateway #222

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

liwenwu-amazon
Copy link
Contributor

What type of PR is this?

feature
Which issue does this PR fix:

What does this PR do / Why do we need it:
VPC Lattice today only allows VPC to associate to a single ServiceNetwork. But K8S users might desire to define multiple gateway(s) and associate HTTPRoutes to different gateway(s). And at meantime, K8S user want Pods in the cluster(s) to access their HTTPRoute(s) might belong to different gateway(s)

We add a capability to allow user to define a CLUSTER_LOCAL_GATEWAY where this CLUSTER_LOCAL_GATEWAY is associated to current VPC. And controller will automatically associate lattice service(HTTPRoute) to this CLUSTER_LOCAL_GATEWAY.

If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:

Testing done on this change:

Automation added to e2e:

Will this PR introduce any new dependencies?:

Will this break upgrades or downgrades. Has updating a running cluster been tested?:

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@coveralls
Copy link

coveralls commented Apr 20, 2023

Pull Request Test Coverage Report for Build 4757967326

  • 5 of 10 (50.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 31.824%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/gateway/model_build_lattice_service.go 2 4 50.0%
pkg/gateway/model_build_servicenetwork.go 3 6 50.0%
Totals Coverage Status
Change from base Build 4749416975: 0.02%
Covered Lines: 3169
Relevant Lines: 9958

💛 - Coveralls

@liwenwu-amazon liwenwu-amazon requested a review from zmingxi April 20, 2023 20:58
@liwenwu-amazon liwenwu-amazon changed the title Add a capability that allow user to define a cluster local gateway (WIP) Add a capability that allow user to define a cluster local gateway Apr 20, 2023
)

// TODO endpoint, region
var VpcID = "vpc-xxxx"
var AccountID = "yyyyyy"
var Region = "us-west-2"
var logLevel = defaultLogLevel
var DefaultServiceNetwork = NoDefaultServiceNetwork

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

Could we remove NoDefaultServiceNetwork and just use:

var DefaultServiceNetwork = ""
if DefaultServiceNetwork == ""

That have better readability for me

@liwenwu-amazon liwenwu-amazon merged commit e6ece06 into aws:main Apr 20, 2023
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.

4 participants