-
Notifications
You must be signed in to change notification settings - Fork 4
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
Changes to include the resources limits and requests #155
base: main
Are you sure you want to change the base?
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.
Looking good, just need to make sure we keep working for the case where probe resources are not provided too.
"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 }} | ||
} | ||
}, |
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.
"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
@@ -693,6 +694,7 @@ def create_job_spec( | |||
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"]), |
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.
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
Hello, Updated the code further to include resource quotas, node affinity Regards, |
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.