-
Notifications
You must be signed in to change notification settings - Fork 55
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
Added support for resources request in staging jobs #2384
Conversation
09ce118
to
aefcf68
Compare
Testing that the new facility operates as desired:
Example server data
Example job data
|
5ffddf8
to
89f196b
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2384 +/- ##
==========================================
+ Coverage 65.33% 65.72% +0.39%
==========================================
Files 181 181
Lines 15412 15514 +102
==========================================
+ Hits 10069 10197 +128
+ Misses 4188 4168 -20
+ Partials 1155 1149 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Works as expected.
Versions
Kubernetes Version: v1.26.5+k3s1
Epinio Server Version: v1.9.0-rc2-18-g89f196b1
Validation
- Deployed by using associated PR Expose staging job resource requests in chart to user helm-charts#439, following appended:
--set server.stagingResourceRequests.cpu=100m --set server.stagingResourceRequests.memory=100M
- Epinio-server deployment patched to use epinio binary built from this PR, used
make patch-epinio-deployment
- Checked environment of
epinio-server
deployment:
$ kubect get deploy -n epinio epinio-server -o jsonpath='{..env}' | jq
...
{
"name": "STAGING_RESOURCE_CPU",
"value": "100m"
},
{
"name": "STAGING_RESOURCE_MEMORY",
"value": "100M"
}
...
- Pushed an app and checked its staging job:
$ kubectl get pod stage-workspace-sample-70bb266339423ee24e42c4426abd2f15cddrrlzs -n epinio -o yaml
...
resources:
requests:
cpu: 100m
memory: 100M
...
- The deployed app itself doesn't have the resources set:
resources: {}
- Input values validation check:
- With
--set server.stagingResourceRequests.cpu=100X
- the helm installation fails onCrashLoopBackOff
forepinio-server
pod, log contains:
❌ bad cpu request for staging job: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
- With
--set server.stagingResourceRequests.memory=a100hy
- the helm installation fails onCrashLoopBackOff
forepinio-server
pod, log contains:
❌ bad memory request for staging job: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
- With
- User can set both resource types at once or just one of them
It should be possible to set both cpu and memory. |
Verified in epinio v1.9.0-rc3 according to the report above - all good |
Fix #2286
Ref epinio/helm-charts#439
feat: staging job resource request support