Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

No way to set build config memory/CPU request and limi #1770

Closed
jflefebvre06 opened this issue Dec 17, 2019 · 3 comments · Fixed by #1772 or #1788
Closed

No way to set build config memory/CPU request and limi #1770

jflefebvre06 opened this issue Dec 17, 2019 · 3 comments · Fixed by #1772 or #1788
Assignees

Comments

@jflefebvre06
Copy link

jflefebvre06 commented Dec 17, 2019

#1604 # Description
Could you please add a way to set resources configuration for buildConfig like

apiVersion: "v1"
kind: "BuildConfig"
metadata:
  name: "sample-build"
spec:
  resources:
    limits:
      cpu: "100m" 
      memory: "256Mi"

Info

I'm using openshift, my build is OOM killed due to 250Mi memory limit ranges

spec:
  limits:
    - type: Pod
      max:
        cpu: '4'
        memory: 4Gi
      min:
        cpu: 10m
        memory: 3Mi
    - type: Container
      max:
        cpu: '4'
        memory: 4Gi
      min:
        cpu: 10m
        memory: 3Mi
      default:
        cpu: 100m
        memory: 250Mi
      defaultRequest:
        cpu: 10m
        memory: 10Mi
@rohanKanojia
Copy link
Member

Hmm, I think this is a valid issue. I don't remember if we still have any way to set BuildConfig memory/cpu request and limits.

@rohanKanojia rohanKanojia self-assigned this Jan 3, 2020
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jan 3, 2020
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jan 3, 2020
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jan 3, 2020
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jan 6, 2020
@jflefebvre06
Copy link
Author

Not seems to work

                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>fabric8-maven-plugin</artifactId>
                        <version>4.4.0</version>
                        <configuration>
                            </generator>
                            <resources>
                                <openshiftBuildConfig>
                                    <limits>
                                        <cpu>100m</cpu>
                                        <memory>1Gi</memory>
                                    </limits>
                                </openshiftBuildConfig>
                            </resources>
[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:4.4.0:resource (default) on project web: Unable to parse configuration of mojo io.fabric8:fabric8-maven-plugin:4.4.0:resource for parameter openshiftBuildConfig: Cannot create instance of class io.fabric8.maven.core.config.OpenshiftBuildConfig: io.fabric8.maven.core.config.OpenshiftBuildConfig.<init>() -> [Help 1]
3435 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:fabric8-maven-plugin:4.4.0:resource (default) on project web: Unable to parse configuration of mojo io.fabric8:fabric8-maven-plugin:4.4.0:resource for parameter openshiftBuildConfig: Cannot create instance of class io.fabric8.maven.core.config.OpenshiftBuildConfig
3436     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
3437     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
3438     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
3439     at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
3440     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
3441     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
3442     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
3443     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
3444     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:190)
3445     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
3446     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
3447     at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
3448     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
3449     at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
3450     at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
3451     at java.lang.Thread.run (Thread.java:834)
3452 Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse configuration of mojo io.fabric8:fabric8-maven-plugin:4.4.0:resource for parameter openshiftBuildConfig: Cannot create instance of class io.fabric8.maven.core.config.OpenshiftBuildConfig
3453     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields (DefaultMavenPluginManager.java:665)
3454     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:597)
3455     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
3456     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
3457     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
3458     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
3459     at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
3460     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
3461     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
3462     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
3463     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
3464     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:190)
3465     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
3466     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
3467     at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
3468     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
3469     at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
3470     at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
3471     at java.lang.Thread.run (Thread.java:834)

@rohanKanojia rohanKanojia reopened this Feb 14, 2020
@rohanKanojia
Copy link
Member

rohanKanojia commented Feb 14, 2020

@jflefebvre06: ah, let me take a look at this. Will fix this in next release. I apologize for the inconvenience caused

rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Feb 14, 2020
…ftBuildConfig

I accidentally added them for testing and forgot to retest it :-( . I apologize for
inconvinience caused.
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Feb 15, 2020
…ftBuildConfig

I accidentally added them for testing and forgot to retest it :-( . I apologize for
inconvinience caused.
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Feb 18, 2020
…ftBuildConfig

I accidentally added them for testing and forgot to retest it :-( . I apologize for
inconvinience caused.
rohanKanojia added a commit that referenced this issue Feb 18, 2020
…nfig

I accidentally added them for testing and forgot to retest it :-( . I apologize for
inconvinience caused.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.