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

Allow K8 CPU/memory request/limit to be different values #316

Closed
treydock opened this issue Aug 23, 2021 · 0 comments · Fixed by #318
Closed

Allow K8 CPU/memory request/limit to be different values #316

treydock opened this issue Aug 23, 2021 · 0 comments · Fixed by #318

Comments

@treydock
Copy link
Contributor

If we wanted to allocate sub-core allocations in Kubernetes, might be useful to set a request for CPU to 0.5 but allow the pod to use up to 1 core. This could be done in backwards compatible manner, example:

current:

script:
  native:
    container:
      cpu: "1"
      memory: "4000Mi"

new keys:

script:
  native:
    container:
      cpu_request: "0.5"
      cpu_limit: "1"
      memory_request: "2000Mi"
      memory_limit: "4000Mi"

If the new keys are specified they will override cpu and memory since the new keys are more specific.

johrstrom pushed a commit that referenced this issue Aug 23, 2021
* Allow K8 CPU/memory request/limit to be different values
Fixes #316

* Remove cpu/memory from container resource and set OR logic in builder

* Test cpu/memory still work

* Add some extra test cases

* Make it clear cpu/memory in this test are not used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant