-
Notifications
You must be signed in to change notification settings - Fork 84
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
VPC: Add v2 support for VPC reconcile #1886
Conversation
Hi @cjschaef. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/ok-to-test |
b93351b
to
d766713
Compare
cloud/scope/vpc_cluster.go
Outdated
} | ||
|
||
// Collect the Network's Resource Group Id if it is defined in Spec. | ||
if s.NetworkSpec() != nil && s.NetworkSpec().ResourceGroup != nil { |
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.
May be negating the if and early return would help in better formating and understanding something like.
if s.NetworkSpec() == nil || s.NetworkSpec().ResourceGroup == nil {
// Otherwise, default to using the cluster's Resource Group ID.
return s.GetResourceGroupID()
}
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.
Sure, I can change this.
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.
Updated
cloud/scope/vpc_cluster.go
Outdated
s.SetResourceStatus(infrav1beta2.ResourceTypeVPC, &infrav1beta2.ResourceStatus{ | ||
ID: *vpcDetails.ID, | ||
Name: s.NetworkSpec().VPC.Name, | ||
Ready: false, |
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.
Any reasons for setting Ready to false here?
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.
In this code path, since we performed the VPC lookup by VPC API call, it is probably okay to mark Ready as true, hoping we don't hit a timing related issue via this code path.
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.
Updated
s.SetResourceStatus(infrav1beta2.ResourceTypeVPC, &infrav1beta2.ResourceStatus{ | ||
ID: *vpcDetails.ID, | ||
Name: vpcName, | ||
Ready: false, |
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.
I think IIUC in the next iteration you are expecting Ready to be set to true based on Status.
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.
That is my expectation, to update the status to Ready on the next round of reconcile (to make sure it is actually found via VPC API (GetVPC
) call.
@cjschaef for my better understaind , whats the format for tag you have decided to use on VPC resources. |
Add support to the v2 path to reconcile a VPC. Includes adding GlobalTagging support, and extending ResourceManager support.
d766713
to
a3e6268
Compare
For now, I expect to tag all created resources with the |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cjschaef, mkumatag The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add support to the v2 path to reconcile a VPC.
Includes adding GlobalTagging support, and extending ResourceManager support.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
/area provider/ibmcloud
Release note: