You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "christophd (via GitHub)" <gi...@apache.org> on 2024/02/05 19:24:17 UTC

[PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

christophd opened a new pull request, #5138:
URL: https://github.com/apache/camel-k/pull/5138

   - Remove secondary IntegrationPlatform mode
   - Reduce logic to a single IntegrationPlatform per operator instance
   - 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
   - Remove platform creation as part of the platform trait (avoids duplicate platform resources)
   - Save trait configuration used to build the integration kit on the resource spec for future reference
   
   **Release Note**
   ```release-note
   fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1954990566

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.3% (**-0.5%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1959171418

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.5% (**-0.3%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on code in PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#discussion_r1503901906


##########
docs/modules/ROOT/pages/installation/advanced/multi.adoc:
##########
@@ -49,34 +49,37 @@ operator id:
 kubectl annotate integration timer-to-log camel.apache.org/operator.id=operator-2 --overwrite
 ----
 
-[[advanced-installation-multiple-platforms]]
-== Configuring Multiple Integration Platforms
+[[advanced-installation-integration-profile]]
+== Apply custom IntegrationProfile settings
 
 Any running Camel K integration is associated to a shared IntegrationPlatform resource that contains general configuration options.
-The integration platform is located in the integration namespace (or also in the operator namespace, in case of global installation)
-and typically only one ("primary", see later) integration platform is allowed to obtain a "Ready" state in a namespace, while others get the "Duplicate" state (i.e. IntegrationPlatform resources
-are somewhat "singleton" in a namespace).
+The integration platform is located in the operator namespace and typically uses the same name as the operator id that this platform belongs to.
+Each Camel K operator uses exactly one single integration platform in a "Ready" state.
+IntegrationPlatform resources are somewhat "singleton" in a namespace and belong to a single operator instance.
 
-There's a way to allow two or more integration platforms to get a "Ready" state in a namespace and for them to be used by integrations:
-platforms can be marked with the annotation `camel.apache.org/secondary.platform=true`.
-That annotation marks the platform as *secondary* so that it will never be used as default platform during the reconciliation of an integration,
-unless explicitly selected (any resource belonging to the "camel.apache.org" group can select a particular integration platform).
-Secondary platforms are also allowed to reach the "Ready" state without becoming "Duplicate".
+There's a way to allow customizations regarding the integration configuration.
+Users may add IntegrationProfile resources to an individual namespace.
+The profile holds custom integration platform settings for them to be used by integrations.
+The IntegrationProfile resource allows only a subset of the IntegrationPlatform settings for customization.
 
-To specify which integration platform should be used to reconcile a specific CR, the CR can be annotated like in the following example:
+The custom IntegrationProfile resource uses the operator id as an annotation to bind its reconciliation to an operator instance.
+Also, the profile must be explicitly selected by an annotation referencing the integration profile name (any resource belonging to the "camel.apache.org" group can select a particular profile configuration).
+
+To specify which profile should be used for an integration, the resource can be annotated like in the following example:
 
 [source,yaml]
 ----
 kind: Integration
 apiVersion: camel.apache.org/v1
 metadata:
   annotations:
-    camel.apache.org/platform.id: my-platform-name
+    camel.apache.org/integration-profile.id: my-profile-name

Review Comment:
   nitpick: I think we were using the dot notation so this would be something like `integration.profile`  ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966439237

   > > 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1967359750

   > LGTM. Might be a good idea to regenerate the CRDs.
   
   @gansheer I did a `make generate` and `make bundle` - am I missing something else?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1964837119

   @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:
   * Further simplification of integration platform logic with deprecate/remove namespace local integration platforms (strictly have only 1-1 relationship of operator and integration platform)
   * Restrict the settings that a user is able to set in integration profile and builder traits (admin related settings only settable via integration platform)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966212510

   > 
   > 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 think we should first translate the local `IntegrationPlatform` to a `IntegrationProfile` without removing it as this may have impacts to CI/CD pipelines, similar to what has been done for the transition from  `KameletBinding` to `Pipe`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966677350

   > 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1927891278

   :warning: Unit test coverage report - coverage decreased from 35.6% to 35.1% (**-0.5%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966321112

   > > I think we should first translate the local `IntegrationPlatform` to a `IntegrationProfile` without removing it as this may have impacts to CI/CD pipelines, similar to what has been done for the transition from `KameletBinding` to `Pipe`
   > 
   > The local IntegrationPlatform should still be a valid option after the changes in this PR
   
   bet gets translated to an IntegrationProfile ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1956371787

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.5% (**-0.3%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966307085

   > I think we should first translate the local `IntegrationPlatform` to a `IntegrationProfile` without removing it as this may have impacts to CI/CD pipelines, similar to what has been done for the transition from `KameletBinding` to `Pipe`
   
   The local IntegrationPlatform should still be a valid option after the changes in this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd merged PR #5138:
URL: https://github.com/apache/camel-k/pull/5138


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1927967866

   :warning: Unit test coverage report - coverage decreased from 35.6% to 35.1% (**-0.5%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1929220175

   > 1. 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.
   
   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?
   
   > 2. we should avoid decreasing the coverage that much. Hopefully you can include some unit test to raise the coverage to be at least even.
   
   I just need to remove more code 😄 Yes, my plan was to add more unit tests
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1964944220

   @valdar @rinaldodev mind having a loom too ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966690563

   > > 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 https://github.com/apache/camel-k/pull/5119 merged). 
   
   I was mainly looking if there were a way to preserve backward compatibility in term of CRD/CR but simplify things internally.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1968425032

   @valdar @rinaldodev please have a look at this may impact https://github.com/apache/camel-k/pull/5119/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1953017543

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.3% (**-0.5%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1956691881

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.5% (**-0.3%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on code in PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#discussion_r1503920930


##########
docs/modules/ROOT/pages/installation/advanced/multi.adoc:
##########
@@ -49,34 +49,37 @@ operator id:
 kubectl annotate integration timer-to-log camel.apache.org/operator.id=operator-2 --overwrite
 ----
 
-[[advanced-installation-multiple-platforms]]
-== Configuring Multiple Integration Platforms
+[[advanced-installation-integration-profile]]
+== Apply custom IntegrationProfile settings
 
 Any running Camel K integration is associated to a shared IntegrationPlatform resource that contains general configuration options.
-The integration platform is located in the integration namespace (or also in the operator namespace, in case of global installation)
-and typically only one ("primary", see later) integration platform is allowed to obtain a "Ready" state in a namespace, while others get the "Duplicate" state (i.e. IntegrationPlatform resources
-are somewhat "singleton" in a namespace).
+The integration platform is located in the operator namespace and typically uses the same name as the operator id that this platform belongs to.
+Each Camel K operator uses exactly one single integration platform in a "Ready" state.
+IntegrationPlatform resources are somewhat "singleton" in a namespace and belong to a single operator instance.
 
-There's a way to allow two or more integration platforms to get a "Ready" state in a namespace and for them to be used by integrations:
-platforms can be marked with the annotation `camel.apache.org/secondary.platform=true`.
-That annotation marks the platform as *secondary* so that it will never be used as default platform during the reconciliation of an integration,
-unless explicitly selected (any resource belonging to the "camel.apache.org" group can select a particular integration platform).
-Secondary platforms are also allowed to reach the "Ready" state without becoming "Duplicate".
+There's a way to allow customizations regarding the integration configuration.
+Users may add IntegrationProfile resources to an individual namespace.
+The profile holds custom integration platform settings for them to be used by integrations.
+The IntegrationProfile resource allows only a subset of the IntegrationPlatform settings for customization.
 
-To specify which integration platform should be used to reconcile a specific CR, the CR can be annotated like in the following example:
+The custom IntegrationProfile resource uses the operator id as an annotation to bind its reconciliation to an operator instance.
+Also, the profile must be explicitly selected by an annotation referencing the integration profile name (any resource belonging to the "camel.apache.org" group can select a particular profile configuration).
+
+To specify which profile should be used for an integration, the resource can be annotated like in the following example:
 
 [source,yaml]
 ----
 kind: Integration
 apiVersion: camel.apache.org/v1
 metadata:
   annotations:
-    camel.apache.org/platform.id: my-platform-name
+    camel.apache.org/integration-profile.id: my-profile-name

Review Comment:
   forget it, saw the rationale though the PR



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1963864933

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.7% (**-0.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1967409618

   :warning: Unit test coverage report - coverage decreased from 36.2% to 36% (**-0.2%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1957765953

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.5% (**-0.3%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on code in PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#discussion_r1503918912


##########
pkg/apis/camel/v1/integrationprofile_types.go:
##########
@@ -0,0 +1,138 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
+// Important: Run "make generate-deepcopy" to regenerate code after modifying this file
+
+// IntegrationProfileSpec applies user defined settings to the IntegrationProfile.
+type IntegrationProfileSpec struct {
+	// specify how to build the Integration/IntegrationKits
+	Build IntegrationProfileBuildSpec `json:"build,omitempty"`
+	// list of traits to be executed for all the Integration/IntegrationKits built from this IntegrationProfile
+	Traits Traits `json:"traits,omitempty"`
+	// configuration to be executed to all Kamelets controlled by this IntegrationProfile
+	Kamelet IntegrationProfileKameletSpec `json:"kamelet,omitempty"`
+}
+
+// IntegrationProfileStatus defines the observed state of IntegrationProfile.
+type IntegrationProfileStatus struct {
+	IntegrationProfileSpec `json:",inline"`
+	// ObservedGeneration is the most recent generation observed for this IntegrationProfile.
+	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
+	// defines in what phase the IntegrationProfile is found
+	Phase IntegrationProfilePhase `json:"phase,omitempty"`
+	// which are the conditions met (particularly useful when in ERROR phase)
+	Conditions []IntegrationProfileCondition `json:"conditions,omitempty"`
+}
+
+// +genclient
+// +kubebuilder:object:root=true
+// +kubebuilder:resource:path=integrationprofiles,scope=Namespaced,shortName=ipr,categories=kamel;camel
+// +kubebuilder:subresource:status
+// +kubebuilder:storageversion
+// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration profile phase"
+// +kubebuilder:printcolumn:name="Default runtime",type=string,JSONPath=`.status.build.runtimeVersion`,description="The default runtime version"
+
+// IntegrationProfile is the resource used to apply user defined settings to the Camel K operator behavior.
+// It defines the behavior of all Custom Resources (`IntegrationKit`, `Integration`, `Kamelet`) in the given namespace.
+type IntegrationProfile struct {
+	metav1.TypeMeta   `json:",inline"`
+	metav1.ObjectMeta `json:"metadata,omitempty"`
+
+	Spec   IntegrationProfileSpec   `json:"spec,omitempty"`
+	Status IntegrationProfileStatus `json:"status,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+
+// IntegrationProfileList contains a list of IntegrationProfile.
+type IntegrationProfileList struct {
+	metav1.TypeMeta `json:",inline"`
+	metav1.ListMeta `json:"metadata,omitempty"`
+	Items           []IntegrationProfile `json:"items"`
+}
+
+// IntegrationProfileBuildSpec contains profile related build information.
+// This configuration can be used to tune the behavior of the Integration/IntegrationKit image builds.
+type IntegrationProfileBuildSpec struct {
+	// the Camel K Runtime dependency version
+	RuntimeVersion string `json:"runtimeVersion,omitempty"`
+	// the runtime used. Likely Camel Quarkus (we used to have main runtime which has been discontinued since version 1.5)
+	RuntimeProvider RuntimeProvider `json:"runtimeProvider,omitempty"`
+	// a base image that can be used as base layer for all images.
+	// It can be useful if you want to provide some custom base image with further utility software
+	BaseImage string `json:"baseImage,omitempty"`
+	// the image registry used to push/pull Integration images
+	Registry RegistrySpec `json:"registry,omitempty"`
+	// how much time to wait before time out the pipeline process
+	Timeout *metav1.Duration `json:"timeout,omitempty"`
+	// Maven configuration used to build the Camel/Camel-Quarkus applications
+	Maven MavenSpec `json:"maven,omitempty"`
+}
+
+// IntegrationProfileKameletSpec define the behavior for all the Kamelets controller by the IntegrationProfile.
+type IntegrationProfileKameletSpec struct {
+	// remote repository used to retrieve Kamelet catalog
+	Repositories []KameletRepositorySpec `json:"repositories,omitempty"`
+}
+
+// IntegrationProfilePhase is the phase of an IntegrationProfile.
+type IntegrationProfilePhase string
+
+// IntegrationProfileConditionType defines the type of condition.
+type IntegrationProfileConditionType string
+
+const (
+	// IntegrationProfileKind is the Kind name of the IntegrationProfile CR.
+	IntegrationProfileKind string = "IntegrationProfile"
+
+	// IntegrationProfilePhaseNone when the IntegrationProfile does not exist.
+	IntegrationProfilePhaseNone IntegrationProfilePhase = ""
+	// IntegrationProfilePhaseReady when the IntegrationProfile is ready.
+	IntegrationProfilePhaseReady IntegrationProfilePhase = "Ready"
+	// IntegrationProfilePhaseError when the IntegrationProfile had some error (see Conditions).
+	IntegrationProfilePhaseError IntegrationProfilePhase = "Error"
+
+	// IntegrationProfileConditionTypeCreated is the condition if the IntegrationProfile has been created.
+	IntegrationProfileConditionTypeCreated IntegrationProfileConditionType = "Created"
+
+	// IntegrationProfileConditionCreatedReason represents the reason that the IntegrationProfile is created.
+	IntegrationProfileConditionCreatedReason = "IntegrationProfileCreated"
+)
+
+// IntegrationProfileCondition describes the state of a resource at a certain point.
+type IntegrationProfileCondition struct {

Review Comment:
   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](https://github.com/kubernetes/apimachinery/blob/master/pkg/api/meta/conditions.go). 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.
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on code in PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#discussion_r1504366431


##########
pkg/apis/camel/v1/integrationprofile_types.go:
##########
@@ -0,0 +1,138 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
+// Important: Run "make generate-deepcopy" to regenerate code after modifying this file
+
+// IntegrationProfileSpec applies user defined settings to the IntegrationProfile.
+type IntegrationProfileSpec struct {
+	// specify how to build the Integration/IntegrationKits
+	Build IntegrationProfileBuildSpec `json:"build,omitempty"`
+	// list of traits to be executed for all the Integration/IntegrationKits built from this IntegrationProfile
+	Traits Traits `json:"traits,omitempty"`
+	// configuration to be executed to all Kamelets controlled by this IntegrationProfile
+	Kamelet IntegrationProfileKameletSpec `json:"kamelet,omitempty"`
+}
+
+// IntegrationProfileStatus defines the observed state of IntegrationProfile.
+type IntegrationProfileStatus struct {
+	IntegrationProfileSpec `json:",inline"`
+	// ObservedGeneration is the most recent generation observed for this IntegrationProfile.
+	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
+	// defines in what phase the IntegrationProfile is found
+	Phase IntegrationProfilePhase `json:"phase,omitempty"`
+	// which are the conditions met (particularly useful when in ERROR phase)
+	Conditions []IntegrationProfileCondition `json:"conditions,omitempty"`
+}
+
+// +genclient
+// +kubebuilder:object:root=true
+// +kubebuilder:resource:path=integrationprofiles,scope=Namespaced,shortName=ipr,categories=kamel;camel
+// +kubebuilder:subresource:status
+// +kubebuilder:storageversion
+// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration profile phase"
+// +kubebuilder:printcolumn:name="Default runtime",type=string,JSONPath=`.status.build.runtimeVersion`,description="The default runtime version"
+
+// IntegrationProfile is the resource used to apply user defined settings to the Camel K operator behavior.
+// It defines the behavior of all Custom Resources (`IntegrationKit`, `Integration`, `Kamelet`) in the given namespace.
+type IntegrationProfile struct {
+	metav1.TypeMeta   `json:",inline"`
+	metav1.ObjectMeta `json:"metadata,omitempty"`
+
+	Spec   IntegrationProfileSpec   `json:"spec,omitempty"`
+	Status IntegrationProfileStatus `json:"status,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+
+// IntegrationProfileList contains a list of IntegrationProfile.
+type IntegrationProfileList struct {
+	metav1.TypeMeta `json:",inline"`
+	metav1.ListMeta `json:"metadata,omitempty"`
+	Items           []IntegrationProfile `json:"items"`
+}
+
+// IntegrationProfileBuildSpec contains profile related build information.
+// This configuration can be used to tune the behavior of the Integration/IntegrationKit image builds.
+type IntegrationProfileBuildSpec struct {
+	// the Camel K Runtime dependency version
+	RuntimeVersion string `json:"runtimeVersion,omitempty"`
+	// the runtime used. Likely Camel Quarkus (we used to have main runtime which has been discontinued since version 1.5)
+	RuntimeProvider RuntimeProvider `json:"runtimeProvider,omitempty"`
+	// a base image that can be used as base layer for all images.
+	// It can be useful if you want to provide some custom base image with further utility software
+	BaseImage string `json:"baseImage,omitempty"`
+	// the image registry used to push/pull Integration images
+	Registry RegistrySpec `json:"registry,omitempty"`
+	// how much time to wait before time out the pipeline process
+	Timeout *metav1.Duration `json:"timeout,omitempty"`
+	// Maven configuration used to build the Camel/Camel-Quarkus applications
+	Maven MavenSpec `json:"maven,omitempty"`
+}
+
+// IntegrationProfileKameletSpec define the behavior for all the Kamelets controller by the IntegrationProfile.
+type IntegrationProfileKameletSpec struct {
+	// remote repository used to retrieve Kamelet catalog
+	Repositories []KameletRepositorySpec `json:"repositories,omitempty"`
+}
+
+// IntegrationProfilePhase is the phase of an IntegrationProfile.
+type IntegrationProfilePhase string
+
+// IntegrationProfileConditionType defines the type of condition.
+type IntegrationProfileConditionType string
+
+const (
+	// IntegrationProfileKind is the Kind name of the IntegrationProfile CR.
+	IntegrationProfileKind string = "IntegrationProfile"
+
+	// IntegrationProfilePhaseNone when the IntegrationProfile does not exist.
+	IntegrationProfilePhaseNone IntegrationProfilePhase = ""
+	// IntegrationProfilePhaseReady when the IntegrationProfile is ready.
+	IntegrationProfilePhaseReady IntegrationProfilePhase = "Ready"
+	// IntegrationProfilePhaseError when the IntegrationProfile had some error (see Conditions).
+	IntegrationProfilePhaseError IntegrationProfilePhase = "Error"
+
+	// IntegrationProfileConditionTypeCreated is the condition if the IntegrationProfile has been created.
+	IntegrationProfileConditionTypeCreated IntegrationProfileConditionType = "Created"
+
+	// IntegrationProfileConditionCreatedReason represents the reason that the IntegrationProfile is created.
+	IntegrationProfileConditionCreatedReason = "IntegrationProfileCreated"
+)
+
+// IntegrationProfileCondition describes the state of a resource at a certain point.
+type IntegrationProfileCondition struct {

Review Comment:
   Thanks for the idea. I have created an issue for this #5191 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1964191615

   :warning: Unit test coverage report - coverage decreased from 35.8% to 35.7% (**-0.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(#5097): Remove secondary IntegrationPlatform in favor of using IntegrationProfile [camel-k]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #5138:
URL: https://github.com/apache/camel-k/pull/5138#issuecomment-1966435527

   > bet gets translated to an IntegrationProfile ?
   
   no, the resources can coexist at the moment


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org