Question about drone-runner-kube policies

Hi there :wave:

We have a question about the usage of policies within drone-runner-kube.
In the official documentation it’s stated that policies are used to set default values on pipeline steps.

While looking at the runner code, we can see that the CPU/memory requests/limits parameters are always overridden by the policy.

Since polices are about default values, one could think that the policy should not override it when it’s actually defined on the pipeline step.

What we would like to do is use the default value for requests/limits when users (dev writting .drone.yml files for their projects) do not define it.
But if at some point a step needs more CPU/memory, users should be able to override the default value.

Does this use case makes sense ? Will the policy system allow this at some point ? Should we open a PR to propose a change for this ?

Thank you !

hey there, we will adjust the wording in the documentation. It is more correct to state that policies are meant to enforce values, and should therefore override user-defined values.

Hey @bradrydzewski, thank you for the quick answer !

Since the name was “policy”, we kind of expected your answer. The name indeed sounds more related to enforcing values instead of providing default :slight_smile:

That being said, would you have any guidance about our use case ?

What we would like to do is use the default value for requests/limits when users (dev writting .drone.yml files for their projects) do not define it.
But if at some point a step needs more CPU/memory, users should be able to override the default value.

Is it possible to do this natively ? Or should we create a conversion extension for this purpose ? What is the best way of doing this in the drone ecosystem when using drone-runner-kube ?

Thank you !