[K8s runner] resource requests failing to work

I can confirm that resource limits work as described.
However requests seem not to.

An example:

  1. the runner deployment has following env variables set to initialize containers with default values:
DRONE_RESOURCE_LIMIT_CPU = 250
DRONE_RESOURCE_LIMIT_MEMORY = "256MiB"
DRONE_RESOURCE_REQUEST_CPU = 50
DRONE_RESOURCE_REQUEST_MEMORY = "64MiB"
  1. I have a step with overriden requests and limits:
resources:
  limits:
    cpu: 4000
    memory: 6GiB
  requests:
    cpu: 2000
    memory: 4GiB
  1. in a pipeline with 2 steps (1 default settings, 1 overriden) we can check that limits are both ok but requests both wrong:
kubectl -n tools-drone get pods drone-crc8zqp3p03tgy3t910x -o=jsonpath='{.spec.containers[0].resources}'
{"limits":{"cpu":"4","memory":"6Gi"},"requests":{"cpu":"48m","memory":"56Mi"}}
kubectl -n tools-drone get pods drone-crc8zqp3p03tgy3t910x -o=jsonpath='{.spec.containers[1].resources}'
{"limits":{"cpu":"250m","memory":"256Mi"},"requests":{"cpu":"1m","memory":"4Mi"}}

Is this really a bug or just my misconfiguration? In the bug case should I file a ticket somewhere else?

Hi @gzatko, from what I understand this is now expected behaviour from the recent runner changes (although not desired in our case).

We hit the same issue and my colleague documented this with a few different scenarios and settings: [drone-runner-kube] Not correctly setting resource requests for Steps - #5 by onur

Thanks for the thread - I overlooked it somehow in search.
For me it’s important that Docker image 1.0.0-beta.6 enabled to set request per pod.