-
Notifications
You must be signed in to change notification settings - Fork 48
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 lb uuid to docluster spec #291
add lb uuid to docluster spec #291
Conversation
Welcome @varshavaradarajan! |
Hi @varshavaradarajan. 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/test-infra repository. |
/ok-to-test |
/retest |
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.
Thanks for the issue and subsequent PR 🎉
api/v1beta1/types.go
Outdated
@@ -126,6 +126,9 @@ type DOLoadBalancer struct { | |||
// An object specifying health check settings for the Load Balancer. If omitted, default values will be provided. | |||
// +optional | |||
HealthCheck DOLoadBalancerHealthCheck `json:"healthCheck,omitempty"` | |||
// The DO load balancer uuid. If omitted, a new load balancer will be created. | |||
// +optional | |||
ResourceId string `json:"resourceId,omitempty"` |
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 we may need to add this field to the struct in v1alpha4/types.go
too. It's likely what's causing the conversion warning you're seeing when running make generate
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.
Possibly v1alpha3/types.go
too
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.
What's our policy on updating APIs as old as v1alpha3? My gut feeling is that v1alpha4 should be the oldest we add features to, but that's mostly based on what feels right.
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.
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.
@cpanato need your 👀 ^^
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.
for olders api, i think we don't need to do that, otherwise might break users, but in the conversion we should add that
@fabriziopandini it is the correct approach when adding a new field in the newer API and not in the older ones? and just write some conversions? or what is the best practice for that? thanks in advance
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.
Do we need to do something extra to ensure that the new spec field is only ever populated once?
api/v1beta1/types.go
Outdated
@@ -126,6 +126,9 @@ type DOLoadBalancer struct { | |||
// An object specifying health check settings for the Load Balancer. If omitted, default values will be provided. | |||
// +optional | |||
HealthCheck DOLoadBalancerHealthCheck `json:"healthCheck,omitempty"` | |||
// The DO load balancer uuid. If omitted, a new load balancer will be created. | |||
// +optional | |||
ResourceId string `json:"resourceId,omitempty"` |
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.
What's our policy on updating APIs as old as v1alpha3? My gut feeling is that v1alpha4 should be the oldest we add features to, but that's mostly based on what feels right.
d7ba8b3
to
4cdae6d
Compare
@MorrisLaw @MorrisLaw @varshavaradarajan this PR will be good to have for the 1.1.0 release |
@varshavaradarajan please run |
also will be good to run some manual tests to cover this case, @varshavaradarajan can you write down the steps needed to reproduce this use case? |
@cpanato - I have been running |
ok, I will check this tomorrow my morning :) |
@cpanato - to reproduce:
Expected Result: clusterctl restore had a bug which was fixed in v1.0.1: https://github.com/kubernetes-sigs/cluster-api/releases/tag/v1.0.1. Please build a binary with the fix. |
8d0d3fa
to
80f0e94
Compare
@cpanato - generated the conversion files through |
thanks for your patience, I would like to run some upgrade tests and this case as well, so bear with me :) |
/test pull-cluster-api-provider-digitalocean-capi-e2e |
/hold for some manual tests and check why conformance and capi did not work well |
@varshavaradarajan can you please rebase this PR with the latest main branch? we made some fixes: #299 thanks for your patience |
trying the backup but getting
|
80f0e94
to
282d68b
Compare
/test pull-cluster-api-provider-digitalocean-capi-e2e |
the upgrade from v1alpha4 > v1beta1 works! |
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.
thanks for this!!
/approve
@timoreimann and @MorrisLaw you had comments, can you please take another look and see if that looks good for you?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, varshavaradarajan 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 |
For posterity, our related Slack discussion is here. This CAPI Slack discussion indicates that the backup/restore failure is due to clusterctl, and not our implementation. Approving since all our tests pass. /lgtm |
/unhold |
What this PR does / why we need it:
DO LB uuid is currently stored in status. Upon restore, we lose this information and capdo creates a new LB instead of re-using the existing LB. This PR adds the lb uuid in the spec. And updates the docluster controller to prefer the spec uuid over status if present.
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 #290
Special notes for your reviewer:
make generate
, got a few warnings like:Documentation:
Release note: