Overwrite kubernetes resource limits and requests for build container on job level
What does this MR do?
When using the Kubernetes executor this allows the predefined cpu and memory allocations for builds to be overwritten up to a predefined max.
Why was this MR needed?
We have use cases where the predefined cpu and memory resources do not meet the needs of the user.
Does this MR meet the acceptance criteria?
-
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Branch has no merge conflicts with master
(if you do - rebase it please)
What are the relevant issue numbers?
Related to #2902 (closed), #4673 (closed)
Merge request reports
Activity
How do we get the flexibility to customize our build pods without reinventing the k8s api in the form of environment variables?
I don't think its the responsibility of this merge request, but I think GitLab might want to consider reviewing the design of how we customize the build pods.
What if teams could provide a template (such as jsonnet) to override the one normally used? The template would let us change any values per project and substitute values.
added 13 commits
-
52d80966...ec6c8043 - 11 commits from branch
gitlab-org:master
- 443cc7b1 - overwite resource limits and requests
- 8381a63b - Merge branch 'kubernetes_pod_resources_override' of…
-
52d80966...ec6c8043 - 11 commits from branch
@jdrumtra Can I get some feedback from someone on this PR?
added Community contribution label
added 587 commits
-
8381a63b...4745a6f3 - 586 commits from branch
gitlab-org:master
- 9f1d04de - overwite resource limits and requests
-
8381a63b...4745a6f3 - 586 commits from branch
mentioned in issue #2902 (closed)
added devopsverify executorkubernetes labels
added 1 deleted label and removed devopsverify label
@brendan Can we get this customer MR some feedback?
@rpaik @pharlan https://gitlab.my.salesforce.com/00161000006fyqb https://gitlab.my.salesforce.com/00161000004zrF8
Edited by joe dadded customer label
@erushton I added
P1
to this customer-written merge request.added ReviewP1 label
@tmaczukin can you please take a look at this.
@45cali thanks for the contribution
Would you mind rerunning the pipeline / taking a look at why it's failing?assigned to @tmaczukin
@erushton I am running the pipeline now. I also noticed there are merge conflicts agian so I will rebase off the master agian, but will wait till your done looking at it.
@45cali could you do the rebase first, it will probably make the review a bit easier.
added 680 commits
-
04c4806f...594da369 - 676 commits from branch
gitlab-org:master
- 09bdf12e - overwite resource limits and requests
- bbf02de4 - overwite resource limits and requests
- b7587a41 - rebase off master
- 2c084050 - fixing merge
Toggle commit list-
04c4806f...594da369 - 676 commits from branch
@erushton ok i rebased off the master
Thanks @45cali. The pipeline's still red though, could you take another look? If you think it's unrelated to this MR let us know and we'll look into it too.
@erushton the pipeline is failing here
unit test 3/5
:https://gitlab.com/Ticketmaster/gitlab-runner/-/jobs/261483700
with the error
Makefile:121: recipe for target 'parallel_test_execute' failed
This is the same error in
unit test with race 2/5
andunit test with race 3/5
too but those two jobs have been set toallowed to fail
mentioned in issue create-stage#30 (closed)
Since I anyway needed this for some work on getting accelerator device working, I fixed the remaining issue in a commit here:
gromacs/gitlab-runner@38793016
The issue was that the default limits are copied into the 'overwrites' structure if no special overwrites are present, which caused the test comparison to fail unless we add those fields to the reference overwrites structure too.
mentioned in merge request Ticketmaster/gitlab-runner!2 (merged)
added devopsverify label
mentioned in merge request !1526 (closed)
@erushton Can you please have another look at this MR?
Thanks @csquire!
@tmaczukin pipeline's passing and I have no other comments on this MR. Can you take a look at this ReviewP1 MR?
@tmaczukin Ping! There are a lot of people that would love to see this merged - could you please have a look?
mentioned in issue #4673 (closed)
@tmaczukin any updates on this? We've been waiting for this feature for long time as well. It would be amazing to have it soon. Thank you for having a look on it
- Resolved by Nicholas Colbert
- Resolved by Nicholas Colbert
- Resolved by Nicholas Colbert