You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/06/28 06:47:13 UTC
[camel-k] 06/07: fix(traits): set native build also when Kit native
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit d61f7da7bbbb5d3f3326978514f5ad18213570a8
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Tue Jun 27 11:21:32 2023 +0200
fix(traits): set native build also when Kit native
---
pkg/trait/builder.go | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index 6e583d88c..e8b72419f 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -173,8 +173,14 @@ func (t *builderTrait) builderTask(e *Environment) (*v1.BuilderTask, error) {
}
if trait := e.Catalog.GetTrait(quarkusTraitID); trait != nil {
+ quarkus, ok := trait.(*quarkusTrait)
+ isNativeIntegration := quarkus.isNativeIntegration(e)
+ isNativeKit, err := quarkus.isNativeKit(e)
+ if err != nil {
+ return nil, err
+ }
// The builder trait must define certain resources requirements when we have a native build
- if quarkus, ok := trait.(*quarkusTrait); ok && pointer.BoolDeref(quarkus.Enabled, true) && quarkus.isNativeIntegration(e) {
+ if ok && pointer.BoolDeref(quarkus.Enabled, true) && (isNativeIntegration || isNativeKit) {
// Force the build to run in a separate Pod
t.L.Info("This is a Quarkus native build: setting build configuration with build Pod strategy, 1 CPU core and 4 GiB memory. Make sure your cluster can handle it.")
t.Strategy = string(v1.BuildStrategyPod)