kyma-project / kyma-project/cli

Allow overriding default CPU and memory resource limits in app push

Open
#2,900 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
125
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Description

Currently kyma app push sets fixed resource limits on the created Deployment:

  • CPU: 50m request / 300m limit
  • Memory: 64Mi request / 512Mi limit

There is no way to override these values. This causes problems for runtimes that need more memory at startup (e.g., Java/JVM apps where the Paketo memory calculator cannot fit within 512Mi without manual JAVA_TOOL_OPTIONS tuning).

Add flags like --memory-limit, --memory-request, --cpu-limit, --cpu-request (or a combined --resources flag) to allow users to specify custom resource allocations.

Reasons

  • Java/JVM apps: The default 512Mi memory limit is too low for most Spring Boot applications. Users currently must pass JAVA_TOOL_OPTIONS and BPL_JVM_THREAD_COUNT env vars as a workaround to reduce JVM memory footprint, which is fragile and non-obvious.
  • Flexibility: Different workloads have different resource profiles. A Node.js prototype may be fine with 512Mi, but a Java app with dependencies typically needs 768Mi–1Gi.
  • Developer experience: The whole point of app push is to remove boilerplate. Forcing users to tune JVM memory calculator parameters defeats that purpose for Java developers.

Proposed flags

--memory-request string   Memory request for the app container (e.g., "256Mi") (default "64Mi")
--memory-limit string     Memory limit for the app container (e.g., "1Gi") (default "512Mi")
--cpu-request string      CPU request for the app container (e.g., "100m") (default "50m")
--cpu-limit string        CPU limit for the app container (e.g., "500m") (default "300m")

The same inputs should be exposed in the kyma-project/setup-kyma-cli/app-push GitHub Action.

Attachments

Error when running a Spring Boot app with default limits:

unable to calculate memory configuration
fixed memory regions require 609483K which is greater than 512M available for allocation:
-XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=97483K, -XX:ReservedCodeCacheSize=240M, -Xss1M * 250 threads

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the kyma app push command to trace where the default CPU and memory resources are assigned, then inspect the kyma-project/setup-kyma-cli/app-push GitHub Action inputs. Done means custom request and limit values override the documented defaults in both interfaces, while preserving those defaults when no flags or inputs are provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go
Domain
ci-cd, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.