Skip to content

Increase ko build strategy default resource limits#2149

Open
officialasishkumar wants to merge 1 commit intoshipwright-io:mainfrom
officialasishkumar:increase-ko-strategy-resources
Open

Increase ko build strategy default resource limits#2149
officialasishkumar wants to merge 1 commit intoshipwright-io:mainfrom
officialasishkumar:increase-ko-strategy-resources

Conversation

@officialasishkumar
Copy link
Copy Markdown

Changes

The ko build strategy's default resource limits (500m CPU / 1Gi memory) are too low for Go compilation, causing OOM kills even for simple projects. This updates both v1alpha1 and v1beta1 ko ClusterBuildStrategy samples:

  • CPU limit: 500m → 1
  • Memory limit: 1Gi → 2Gi
  • Memory request: 65Mi → 256Mi

The new limits match the buildah strategy, which has similar resource demands due to compilation. The memory request is increased to better reflect the baseline memory needs of the Go compiler and toolchain.

Test Plan

  • Verify the updated ko sample strategy can be applied to a cluster
  • Confirm a build using the ko strategy completes without OOM for a moderately sized Go project (e.g. quizap)

Fixes #2011

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 31, 2026
@openshift-ci openshift-ci bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Mar 31, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign adambkaplan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

The ko build strategy's default resource limits (500m CPU / 1Gi memory)
are too low for Go compilation, causing OOM kills even for simple
projects. This increases the limits to 1 CPU / 2Gi memory to match the
buildah strategy which has similar resource demands. The memory request
is also increased from 65Mi to 256Mi to better reflect the baseline
memory needs of the Go compiler.

Fixes shipwright-io#2011

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar force-pushed the increase-ko-strategy-resources branch from effe567 to a19d55f Compare March 31, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[BUG] ko Build Strategy Resources Too Low

2 participants