Changes to include the resources limits and requests#155
Open
mandarbhosle wants to merge 6 commits intohardbyte:mainfrom
Open
Changes to include the resources limits and requests#155mandarbhosle wants to merge 6 commits intohardbyte:mainfrom
mandarbhosle wants to merge 6 commits intohardbyte:mainfrom
Conversation
hardbyte
reviewed
May 23, 2024
Owner
hardbyte
left a comment
There was a problem hiding this comment.
Looking good, just need to make sure we keep working for the case where probe resources are not provided too.
Comment on lines
15
to
24
| "resources": { | ||
| "limits": { | ||
| "cpu":{{ .Values.probeConfig.resources.limits.cpu | quote }}, | ||
| "memory":{{ .Values.probeConfig.resources.limits.memory | quote }} | ||
| }, | ||
| "requests": { | ||
| "cpu":{{ .Values.probeConfig.resources.requests.cpu | quote }}, | ||
| "memory":{{ .Values.probeConfig.resources.requests.memory | quote }} | ||
| } | ||
| }, |
Owner
There was a problem hiding this comment.
Suggested change
| "resources": { | |
| "limits": { | |
| "cpu":{{ .Values.probeConfig.resources.limits.cpu | quote }}, | |
| "memory":{{ .Values.probeConfig.resources.limits.memory | quote }} | |
| }, | |
| "requests": { | |
| "cpu":{{ .Values.probeConfig.resources.requests.cpu | quote }}, | |
| "memory":{{ .Values.probeConfig.resources.requests.memory | quote }} | |
| } | |
| }, | |
| "resources": {{ .Values.probeConfig.resources | toJson }} |
operator/netchecks_operator/main.py
Outdated
| image_pull_policy=settings.probe.image.pullPolicy, | ||
| command=command, | ||
| volume_mounts=volume_mounts, | ||
| resources=client.V1ResourceRequirements(limits=settings.probe.resources["limits"],requests=settings.probe.resources["requests"]), |
Owner
There was a problem hiding this comment.
This needs to work for the case where there are no resources defined.
Probably cleaner to create the V1ResourceRequirements instance above, then pass in to the V1Container
Author
|
Hello, Updated the code further to include resource quotas, node affinity Regards, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello,
This in in regards with issue #147 Query about resource limits and requests
I have updated the confimap.yaml and main.py to pick the resource limits and requests from the values.yaml
Request to you to review.