Skip to content

Copy values to replicaServiceTemplate in conversion webhook#376

Merged
masa213f merged 2 commits intomainfrom
d-kuro/service-template
Mar 2, 2022
Merged

Copy values to replicaServiceTemplate in conversion webhook#376
masa213f merged 2 commits intomainfrom
d-kuro/service-template

Conversation

@d-kuro
Copy link
Copy Markdown
Contributor

@d-kuro d-kuro commented Feb 24, 2022

Copy v1beta1.serviceTemplate to v1beta2.primaryServiceTempalate and v1beta2.replicaServiceTemplate when converting from v1beta1 to v1beta2 with MySQLCluster conversion.

@d-kuro d-kuro self-assigned this Feb 24, 2022
@d-kuro d-kuro marked this pull request as ready for review February 24, 2022 19:20
Copy link
Copy Markdown
Contributor

@masa213f masa213f left a comment

Choose a reason for hiding this comment

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

Thank you for this PR.

I found that, in some cases, the round-trip conversion does not work.
When I create a v1beta2 MySQLCluster with primaryServiceTemplate only, the created resource has an unexpected replicaServiceTemplate field.

Could you fix it and add more tests?

@d-kuro d-kuro force-pushed the d-kuro/service-template branch 2 times, most recently from 7e036cc to 1035096 Compare February 28, 2022 17:49
Signed-off-by: d-kuro <kurosawa7620@gmail.com>
@d-kuro d-kuro force-pushed the d-kuro/service-template branch from 1035096 to 2ee2f81 Compare February 28, 2022 18:03
Signed-off-by: d-kuro <kurosawa7620@gmail.com>
@d-kuro d-kuro force-pushed the d-kuro/service-template branch from 31a0c21 to f37e8b6 Compare February 28, 2022 18:49
@d-kuro
Copy link
Copy Markdown
Contributor Author

d-kuro commented Feb 28, 2022

@masa213f
Thank you review!
I fix conversion codes and add tests.

@d-kuro d-kuro requested a review from masa213f February 28, 2022 19:04
Copy link
Copy Markdown
Contributor

@masa213f masa213f left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@masa213f masa213f merged commit a0a3eac into main Mar 2, 2022
@masa213f masa213f deleted the d-kuro/service-template branch March 2, 2022 01:19
@masa213f masa213f mentioned this pull request Mar 3, 2022
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