astefanutti commented on code in PR #3344: URL: https://github.com/apache/camel-k/pull/3344#discussion_r893176091
########## pkg/util/maven/maven_command.go: ########## @@ -74,6 +74,14 @@ func (c *Command) Do(ctx context.Context) error { args = append(args, "--settings", settingsPath) } + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "org.apache.camel.container.cpus="+cpuQuota) + } + + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "maven.artifact.threads="+cpuQuota) Review Comment: nit: maybe use the `-D` form to be consistent with the other system properties. ########## pkg/util/maven/maven_command.go: ########## @@ -74,6 +74,14 @@ func (c *Command) Do(ctx context.Context) error { args = append(args, "--settings", settingsPath) } + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "org.apache.camel.container.cpus="+cpuQuota) + } + + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { Review Comment: Following #2837, I think the `GOMAXPROCS` environment variable can be used here. ########## pkg/util/maven/maven_command.go: ########## @@ -74,6 +74,14 @@ func (c *Command) Do(ctx context.Context) error { args = append(args, "--settings", settingsPath) } + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "org.apache.camel.container.cpus="+cpuQuota) + } + + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "maven.artifact.threads="+cpuQuota) Review Comment: What about setting the `-T` option as well? ########## pkg/util/maven/maven_command.go: ########## @@ -74,6 +74,14 @@ func (c *Command) Do(ctx context.Context) error { args = append(args, "--settings", settingsPath) } + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "org.apache.camel.container.cpus="+cpuQuota) + } + + if cpuQuota, ok := os.LookupEnv("CPU_QUOTA"); ok { + args = append(args, "--define", "maven.artifact.threads="+cpuQuota) Review Comment: It should only be added if it's not already present in `AdditionalArguments`. -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org