kyma-project / kyma-project/cli
Allow overriding default CPU and memory resource limits in app push
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_OPTIONSandBPL_JVM_THREAD_COUNTenv 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 pushis 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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