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 and use identification tags for Lattice service #466

Merged
merged 8 commits into from
Nov 3, 2023
Merged

Conversation

solmonk
Copy link
Contributor

@solmonk solmonk commented Nov 1, 2023

What type of PR is this?

feature

Which issue does this PR fix:

What does this PR do / Why do we need it:

  • Adds identification tags for lattice service - name, namespace, routeType
  • Even if the service name matches, stop reconciliation when these information does not match
  • Utilize ownership concept, stop reconciliation when the service is "clearly" not owned by controller
  • Backfill - if service does not have new tags, consider it is owned and add necessary tags
    • This might be controversial, but I don't see a big downside doing this.

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.

controllers/route_controller.go Show resolved Hide resolved
pkg/deploy/lattice/service_manager.go Outdated Show resolved Hide resolved
pkg/model/lattice/service.go Show resolved Hide resolved
pkg/model/lattice/service.go Show resolved Hide resolved
pkg/deploy/lattice/service_manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mikhail-aws mikhail-aws left a comment

Choose a reason for hiding this comment

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

looks good, please take a look on missing error return

controllers/route_controller.go Show resolved Hide resolved
pkg/aws/cloud.go Outdated
if managedBy == "" {
err := c.acquireOwnership(ctx, arn)
if err != nil {
return false, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

return false, err ?

Comment on lines 165 to 168
err := m.checkAndUpdateTags(ctx, svc, svcSum)
if err != nil {
return ServiceInfo{}, err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably ok for near future to imply that ownership and tags are related. And operate on them together to avoid redundant getTags calls. But conceptually ownership should be abstracted. For example this function tells that we do something with Tags, but underneath we manage ownership.

@solmonk solmonk merged commit 47fdf88 into aws:main Nov 3, 2023
5 checks passed
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.

2 participants