-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support configuring script pod resource requirements #977
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.
Looks good! One minor comment.
source/Octopus.Tentacle/Kubernetes/KubernetesScriptPodCreator.cs
Outdated
Show resolved
Hide resolved
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.
LGTM! Thanks for the 🍐 on the review.
For posterity - we talked about validating the resource requests and limits, but there was no easy way to do this in the C# k8s client. In addition, the error returned when this happens is verbose and points to the issue fairly well.
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.
Ignore this comment - accidentally approved the same PR instead of the helm-chart PR.
Co-authored-by: Kevin Tchang <151479559+kevjt@users.noreply.github.com>
//if we can't parse the JSON, fall back to the defaults below and warn the user | ||
log.WarnFormat(e, message); | ||
//write a verbose message to the script log. | ||
tentacleScriptLog.Verbose(message); |
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.
Minor addition, I now write a verbose message back to the script log
Fixes #979
Background
A customer appears to be having resource contention with a large number of script pods. They would like to be able to modify the resource requirements of script pods.
Results
Adds support for a new environment variable
OCTOPUS__K8STENTACLE__PODRESOURCEJSON
which contains the serialized resource requirements provided by the helm chart in OctopusDeploy/helm-charts#225We then deserialize this to a
V1ResourceRequirements
and use itShortcut story: [sc-82857]
How to review this PR
Quality ✔️
Pre-requisites