-
Notifications
You must be signed in to change notification settings - Fork 63
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
manage routes for instances in multiple vpcs in a single region #241
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #241 +/- ##
==========================================
+ Coverage 55.33% 56.06% +0.73%
==========================================
Files 12 12
Lines 2324 2349 +25
==========================================
+ Hits 1286 1317 +31
+ Misses 887 881 -6
Partials 151 151 ☔ View full report in Codecov by Sentry. |
76e0fc9
to
c04ffe9
Compare
3e62890
to
913f2b6
Compare
0637f31
to
f5c45fc
Compare
f5c45fc
to
f95b9bd
Compare
Mu.Lock() | ||
defer Mu.Unlock() | ||
|
||
// check if map contains vpc id for given label | ||
if vpcid, ok := vpcIDs[vpcName]; ok { | ||
return vpcid, nil | ||
} | ||
vpcs, err := client.ListVPCs(context.TODO(), &linodego.ListOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
General:
This PR enables route-controller to manage instances running in multiple vpcs. All these instances should still be part of a single k8s cluster where the CCM is running.
This change introduces a new flag
vpc-names
which is a comma separated list of vpc names which will be managed by the CCM's route-controller. Old flagvpc-name
is now deprecated and will be removed in future releases.To test changes:
Changes in this branch are present in helm chart here: https://github.com/rahulait/linode-cloud-controller-manager/releases/tag/helm-v0.4.16
If one wants to test these changes, simply use helm repo https://rahulait.github.io/linode-cloud-controller-manager/ with version v0.4.16 to test the changes before we merge this branch to main.
Pull Request Guidelines: