Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add option to specify resources and tolerations #9

Open
jpambrun opened this issue Sep 3, 2020 · 0 comments
Open

Feat: Add option to specify resources and tolerations #9

jpambrun opened this issue Sep 3, 2020 · 0 comments

Comments

@jpambrun
Copy link
Contributor

jpambrun commented Sep 3, 2020

I don't have a good idea of what that would look like and it may well be out of scope, but my build pods are getting evicted. It would be nice to be able to pass cpu, mem and toleration.

In case others are interested, for now I have hardcoded what I needed in `kubectl-build with:

{
  "spec": {
    "hostPID": true,
    "hostNetwork": true,
    "containers": [
      {
        "securityContext": {
          "privileged": true
        },
        "image": "$image",
        "name": "kaniko",
        "stdin": true,
        "stdinOnce": true,
        "terminationMessagePath": "/dev/termination-log",
        "terminationMessagePolicy": "File",
        "args": $args,
        "volumeMounts": $volumemounts,
        "resources": {
          "requests":{
            "memory": "10Gi",
            "cpu": "8000m"
          },"limits":{
            "memory": "10Gi",
            "cpu": "8000m"
          }
        }
      }
    ],
    "tolerations":[{
      "key": "dedicated/highcpu",
      "operator": "Exists"
    }],
    "volumes": $volumes
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant