Add option for operator to set resource claims on daemonset containers #848
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change description
Add option for operator to set resource claims on daemonset containers
The operator installation of trident currently does not allow setting resource requests and limits for the daemonset containers. With this change the option is added through the TridentOrchestrator crd to set specific resource requests and limits. If no resource requests or limits are set, the current default values are respected.
Project tracking
N/A
Do any added TODOs have an issue in the backlog?
No
Did you add unit tests? Why not?
Added unit tests for the construction of the resource yaml fields.
Does this code need functional testing?
No
Is a code review walkthrough needed? why or why not?
I hope the MR is quite straight forward but I'm open for a walkthrough if it helps to get this MR through.
Should additional test coverage be executed in addition to pre-merge?
No
Does this code need a note in the changelog?
Yes, two extra fields have been added to the tridentorchestrator crd:
The old default values are being respected when these fields are not set. In case they are set, they will configure the trident daemonset according to the corev1 resourceRequirements field.
Does this code require documentation changes?
No
Additional Information
Currently we're using the trident operator install on a cluster with about ~90 nodes. The
trident-node-linux
daemonset that the operator generates does not have any resources requests / limits specified. Because of this the pods inherit the resources requests / limits that the are being set by the limitrange object from our rancher setup. This results both in way too many resources being claimed. With this MR we hope to get some more control over the daemonset this is being generated by the operator.