-
Notifications
You must be signed in to change notification settings - Fork 350
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(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile #5138
fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile #5138
Conversation
|
1e77a9b
to
eac72eb
Compare
|
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 haven't gone through the details of the PR, but some early feedback for your consideration:
- we can't remove/rename any field from custom resource for backward compatibility reason. Anything we want to remove we must deprecate the fields and eventually remove them in a major upgrade. Same for the feature itself. We should deprecate it before removing to give the user the possibility to upgrade accordingly.
- we should avoid decreasing the coverage that much. Hopefully you can include some unit test to raise the coverage to be at least even.
Regarding the CRD changes: do you refer to the removed trait options on the platform trait? What about auto migrating local IntegrationPlatform CRs to IntegrationProfile CRs?
I just need to remove more code 😄 Yes, my plan was to add more unit tests |
eac72eb
to
8538024
Compare
|
007363b
to
c15545e
Compare
|
c15545e
to
1e02aff
Compare
|
1e02aff
to
ae4531d
Compare
|
ae4531d
to
1882c5f
Compare
|
1882c5f
to
c5c2982
Compare
|
c5c2982
to
d2d3daf
Compare
|
d2d3daf
to
0674075
Compare
|
@squakez @lburgazzoli @gansheer @claudio4j the PR is now ready for review. If you want to have another look 🙏 I'd suggest to follow-up with these tasks in separate PRs:
|
@valdar @rinaldodev mind having a loom too ? |
) | ||
|
||
// IntegrationProfileCondition describes the state of a resource at a certain point. | ||
type IntegrationProfileCondition struct { |
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.
nitpick: I know we have done this for may of the types but wonder if we can just reuse metav1.Condition
, which would allow to manipulate conditions using some k8s utilities. The downside is that we won't have the specific condition type, but given 99% of the time is just an alias to strings and there are no real enums in go, I don't see anymore a very string benefit.
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 idea. I have created an issue for this #5191
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.
Might be a good idea to regenerate the CRDs.
I think we should first translate the local |
The local IntegrationPlatform should still be a valid option after the changes in this PR |
bet gets translated to an IntegrationProfile ? |
no, the resources can coexist at the moment |
do you think we can do the translation ? just to simplify the logic on the operator |
The resources are not exactly the same. The IntegrationProfile has only a subset of settings available on the IntegrationPlatform. Do you have some auto translation in mind? or that the user needs to manually switch to using IntegrationProfile instead of IntegrationPlatform? I think the latter one is doable with some documentation. If we really want to simplify the logic on the operator regarding IntegrationPlatform we should remove the local platform feature and tell users to switch to IntegrationProfile |
No I don't so I'm fine with the current logic for the time being (which could be improved once we get #5119 merged). I was mainly looking if there were a way to preserve backward compatibility in term of CRD/CR but simplify things internally. |
@gansheer I did a |
…ing IntegrationProfile - Remove secondary IntegrationPlatform mode - Reduce logic to a single IntegrationPlatform per operator instance - IntegrationPlatforms matching the operatorID do have precedence when searching for local platforms - Introduce IntegrationProfile custom resource definition - Let user customize a subset of IntegrationPlatform settings in IntegrationProfile - Load IntegrationProfile settings when integration resource is annotated to select the profile - Save trait configuration used to build the integration kit on the resource spec for future reference
0674075
to
ee54e63
Compare
|
@valdar @rinaldodev please have a look at this may impact #5119 |
Release Note