-
Notifications
You must be signed in to change notification settings - Fork 763
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
feat(deploy): support ephemeral storage requests limits labels #1936
base: main
Are you sure you want to change the base?
feat(deploy): support ephemeral storage requests limits labels #1936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
@@ -811,7 +811,7 @@ func KomposeObjectToServiceConfigGroupMapping(komposeObject *kobject.KomposeObje | |||
// TranslatePodResource config pod resources | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Amazing work, big thanks for this new feature!!! 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 |
New changes are detected. LGTM label has been removed. |
Fixed the expected label in test, sorry, forgot to rename there before. |
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:
❤️