feat(deploy): support ephemeral storage requests limits labels#1936
Conversation
cdrage
left a comment
There was a problem hiding this comment.
Great implementation and it works! Thank you so much.
We should follow the label convention (suggested in a comment).
Also are you able to write a test for k8sutils.go for the new functionality?
| func TranslatePodResource(service *kobject.ServiceConfig, template *api.PodTemplateSpec) { | ||
| // Configure the resource limits | ||
| if service.MemLimit != 0 || service.CPULimit != 0 { | ||
| if service.MemLimit != 0 || service.CPULimit != 0 || service.DeployLabels["limits.ephemeral-storage"] != "" { |
There was a problem hiding this comment.
We should follow https://kompose.io/user-guide/#labels convention.
Maybe instead let's do kompose.ephemeral-storage.limit and kompose.ephemeral-storage.request
?
|
Changed and Added tests as asked @cdrage |
|
So sorry for the delay, but thank you for the changes, this LGTM. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdrage, jvitor83 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Amazing work, big thanks for this new feature!!! 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 |
|
Fixed the expected label in test, sorry, forgot to rename there before. |
|
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Allow to use labels in the deploy section to convert to kubernetes resources requests and limits for ephemeral-storage
Which issue(s) this PR fixes:
Fixes #1935
Special notes for your reviewer:
❤️