-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add new built-in transformer for resource-quotas (requests/limits) #5173
Comments
This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The "replicas" field is already hard to use for anything but the simplest kustomizations. The new field proposed here would pose the same problem: To which manifests does this patch apply? Once you learn the answer, you then start asking how to exclude some manifests from its too-broad coverage. |
For use cases such as this, I would highly recommend you first experiment by writing your own custom transformer. If we see broad adoption of particular custom transformers, we can consider making them builtin. I'd like to be careful about broadening the scope of builtin transformers and instead prioritize making it easy for users to write their own custom ones. This will help keep kustomize flexible, powerful, and maintainable. |
Thanks @natasha41575, that makes a lot of sense. I'll try this approach. |
Eschewed features
What would you like to have added?
To improve the management of pod resource quotas, I propose adding a new built-in transformer to the
Kustomize
tool. This transformer will simplify the process of setting resource requests and limits for pods within Kubernetes manifests.Currently, Kustomize supports a multitude of built-in transformers for common use cases including
ReplicaCountTransformer
,ImageTagTransformer
, etc. Another common use case we often run into is overriding pod resource quotas (requests/limits) - currently done with patching - however, it would be much nicer and make manifests more readable to use a built-in transformer for that.An example implementation could be:
kustomization.yaml
Why is this needed?
It would provide a more user-friendly simplified syntax to achieve the common task of setting appropriate resource quotas for pods.
By implementing this transformer, Kustomize users will benefit from a more convenient and streamlined approach to managing pod resource quotas. It will simplify the process of setting requests and limits, especially when dealing with a large number of pods or multiple environments.
Can you accomplish the motivating task without this feature, and if so, how?
This can be currently done with both inline patch and patch strategic merge.
An example would be:
kustomization.yaml
patch.yaml
What other solutions have you considered?
I briefly research if it could be done with existing tools but couldn't find an elegant solution.
Anything else we should know?
No response
Feature ownership
Thank you for considering this enhancement proposal. I look forward to hearing your thoughts and collaborating on this feature addition.
The text was updated successfully, but these errors were encountered: