Repository navigation
Fix #6776: Default IntegrationProfile support - #6855
Thundercloud12 wants to merge 4 commits into
Conversation
|
✔️ Unit test coverage report - coverage increased from 63.8% to 63.9% (+0.1%) |
|
@squakez i have done the changes as requested by you! |
|
✔️ Unit test coverage report - coverage increased from 64.4% to 64.5% (+0.1%) |
|
Maybe it requires a rebase with |
|
I, along with an ai agent, investigated the CI failures, and the agent suggested the following root cause and fix. Root cause:
Proposed fix:
Verification reported by the agent:
Before proceesind i want to ask this with you does this diagnosis makes sense? as this is a diagnosis did by an agent i cant trust it completely, although to me it might seem good at first but i am not someone experienced in this repo and might introduce some unintended changes that are not meant to be there in the first place |
|
Not sure about that, it does not really seem a reason for the failure. I invite you to rebase with the actual |
5cb83ad to
49ea82a
Compare
|
@squakez rebased it |
|
✔️ Unit test coverage report - coverage increased from 64.6% to 64.7% (+0.1%) |
|
I think this one depends on the fix done in #6887 . Once that is merged, we probably need to adjust this with the changes required in the other PR in order to avoid the failures seen in this PR. |
|
@Thundercloud12 please, rebase this one as it may be all green after the rebase and we can merge. |
'origin/main' into feature/6776-default- integration-profile
|
@squakez please have a look now |
…integration-profile
|
I will have a look at the check failures and try to solve them on this PR (which, for the rest, seems complete) |
Motivation
Currently, an
IntegrationProfilemust be explicitly selected by annotating each individualIntegration(orPipe) resource withcamel.apache.org/integration-profile.id. This requires developers to manually annotate everyresource and prevents namespace administrators from defining standard default profile settings for all integrations
in a given namespace.
Changes
This PR introduces default
IntegrationProfileresolution support, allowing integrations to inherit a defaultprofile without explicit per-resource annotations. The operator now resolves profiles using the following order of
precedence:
camel.apache.org/integration-profile.idon the resource (Integration,Pipe).camel.apache.org/integration-profile.idon the KubernetesNamespace.defaultProfile Convention: AnIntegrationProfilenameddefaultin the same namespace.Key Updates
Profile Resolution (
pkg/platform/profile.go): UpdatedfindIntegrationProfileto implement the fallbacksequence (Resource Annotation → Namespace Annotation →
defaultIntegrationProfile → Operator Defaults).Constant (
pkg/apis/camel/v1/common_types.go): AddedDefaultIntegrationProfileName = "default".RBAC (
helm/&pkg/resources/config/rbac/): Addedgetpermission onnamespacesfor descoped rolesso the operator can inspect namespace annotations.
Unit Tests (
pkg/platform/profile_test.go): Added comprehensive unit tests validating resolution precedence,fallback behavior, and missing profile error handling.
Documentation (
docs/modules/ROOT/pages/configuration/integrationprofiles.adoc): Added documentationexplaining the resolution precedence and showing examples for namespace annotations and the
defaultprofileconvention.
Fixes: #6776