Skip to content
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

Create CamelCatalog on IntegrationPlatform controller #5089

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

christophd
Copy link
Contributor

  • Create CamelCatalog for new runtimeVersion that has been set on IntegrationPlatform
  • Improve CamelCatalog availability checks on IntegrationPlatform controller
  • Adds new condition on IntegrationPlatform representing the availability of the catalog
  • Sets IntegrationPlatform to error phase when catalog is not available

This adds auto creation of the CamelCatalog resource in the IntegrationPlatform controller. When a user sets a new runtimeVersion for the IntegrationPlatform resource the catalog will be created as part of the reconcile loop. This ensures that the catalog is created straightaway after the configuration change has happened and that potential errors due to the camel catalog creation are reported on the IntegrationPlatform conditions.

Users still may set the runtimeVersion as a trait setting on an individual Integration resource. In this case the CamelCatalog may still be created as part of the trait execution for this Integration. Errors due to the CamelCatalog creation are then reported to the Integration resource conditions.

Release Note

Create CamelCatalog on IntegrationPlatform controller

Copy link
Contributor

✔️ Unit test coverage report - coverage increased from 34.8% to 34.9% (+0.1%)

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

Looks good. However I see a little inconsistency that may arise. IMO The monitor action should not take care to create the catalog directly, as this action may last a few seconds. During this time another operator process may start a build with a failing catalog as the IP is still in Ready status. In order to be more consistent, we should probably detect the change and create a new Status (ie, WaitingForCatalog) immediately. Beside that, we can create a new action that would react on the WaitingForCatalog status where we take care to create the catalog and if all is good move the status again to Ready. I think it is also cleaner as the monitoring action should only be in charge to its own monitoring logic, whilst the catalog action can have a different concern.

- Create CamelCatalog for new runtimeVersion that has been set on IntegrationPlatform
- Improve CamelCatalog availability checks on IntegrationPlatform controller
- Adds new condition on IntegrationPlatform representing the availability of the catalog
- Adds new controller action and IntegrationPlatform phase "CreateCatalog" that handles the creation of the catalog
- Sets IntegrationPlatform to error phase when catalog is not available
@christophd christophd merged commit 4264d13 into apache:main Jan 24, 2024
15 checks passed
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.

4 participants