Skip to content

Feat: Add option to specify resources and tolerations #9

@jpambrun

Description

@jpambrun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions