-
Notifications
You must be signed in to change notification settings - Fork 43
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 resource configuration for imagebuilder #351
Conversation
@terryyylim LGTM, can you update the helm chart as well? |
charts/merlin/values-e2e.yaml
Outdated
@@ -74,6 +74,13 @@ merlin: | |||
dockerfilePath: "docker/app.Dockerfile" | |||
buildContextURI: "git://github.com/gojek/merlin.git#refs/tags/v0.19.0" | |||
mainAppPath: /merlin-spark-app/main.py | |||
resourceRequestsLimits: |
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.
nit: I think resources
is more concise.
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.
One little nitpick, LGTM thanks @terryyylim
11114f7
to
c2c34d8
Compare
Can you also update Merlin helm chart in caraml-dev/helm-charts: https://github.com/caraml-dev/helm-charts/tree/main/charts/merlin ? |
👌🏻 Yup! I'll update it once this chart has been tested with |
* upstream/main: Support resource configuration for imagebuilder (#351)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. Run unit tests and ensure that they are passing 2. If your change introduces any API changes, make sure to update the e2e tests 3. Make sure documentation is updated for your PR! --> **What this PR does / why we need it**: <!-- Explain here the context and why you're making the change. What is the problem you're trying to solve. ---> Resource configuration for imagebuilder was introduced in #351, but it was missing `Decode` method that is required by envconfig, as described in the documentation - https://github.com/kelseyhightower/envconfig#custom-decoders. **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes # **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required. Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note NONE ``` --------- Co-authored-by: Tio Pramayudi <itok54@gmail.com>
What this PR does / why we need it:
Currently, Merlin image building jobs don't support resource configuration, and requests.cpu is hardcoded. Without requests.memory configured on them, it's common to see jobs failing with OOMKilled error if multiple jobs are running concurrently. This PR supports resource configuration so that some reasonable amount of memory can be set to mitigate this issue. In addition, the GKE autoscaler can spin up another node if multiple jobs are running concurrently, instead of placing all of the jobs onto the same node, and causing them to fight for available memory.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:
Checklist