Skip to content
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

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

terryyylim
Copy link
Contributor

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?:

NONE

Checklist

  • Added unit test, integration, and/or e2e tests

@terryyylim terryyylim self-assigned this Feb 17, 2023
@pradithya
Copy link
Member

@terryyylim LGTM, can you update the helm chart as well?

@@ -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:
Copy link
Member

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.

Copy link
Member

@pradithya pradithya left a 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

@terryyylim terryyylim force-pushed the support-imagebuilder-resource-configuration branch from 11114f7 to c2c34d8 Compare February 21, 2023 04:39
@ariefrahmansyah
Copy link
Contributor

Can you also update Merlin helm chart in caraml-dev/helm-charts: https://github.com/caraml-dev/helm-charts/tree/main/charts/merlin ?

@terryyylim
Copy link
Contributor Author

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 0.26.0-rc4.

@terryyylim terryyylim merged commit 101989d into main Feb 21, 2023
@terryyylim terryyylim deleted the support-imagebuilder-resource-configuration branch February 21, 2023 08:13
shydefoo added a commit that referenced this pull request Feb 22, 2023
* upstream/main:
  Support resource configuration for imagebuilder (#351)
terryyylim added a commit that referenced this pull request Feb 24, 2023
<!--  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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants