-
Notifications
You must be signed in to change notification settings - Fork 579
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
Fix roundtrip conversions between v1alpha2 and v1alpha3 #2074
Fix roundtrip conversions between v1alpha2 and v1alpha3 #2074
Conversation
cc @ncdc |
01e944a
to
08f2f0d
Compare
Are there some tests we could add that would have picked up on the issues? |
@randomvariable yes, we need to make the change in CAPI though |
Added a reverse fuzz test: kubernetes-sigs/cluster-api#3877 I could add individual tests as well for the 3 fields I changed here. |
If an upstream CAPI change is going to deal with it, that's fine. /lgtm I'll leave @ncdc to do the approve given the greater context you have. |
if restored.CloudInit.SecureSecretsBackend != "" { | ||
if src.CloudInit != nil { | ||
dst.CloudInit.SecureSecretsBackend = restored.CloudInit.SecureSecretsBackend | ||
} |
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.
SecretARN turned into SecretPrefix + SecretCount.
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.
And SecretPrefix + SecretCount exist in both a2 and a3
/retitle Fix roundtrip conversions between v1alpha2 and v1alpha3 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: randomvariable 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 |
What this PR does / why we need it:
This PR prevents overriding ControlPlaneLoadBalancer and Bastion changes.
It also avoids creating
CloudInit
during the conversion if it is empty, because if we create an emptyCloudInit
during conversion,out.EnableSecureSecretsManager = !in.InsecureSkipSecretsManager
sets a field that should not be there.``
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 #2059