Skip to content

Commit

Permalink
auto-instrumentation: increase default memory request to 100Mi (#29392)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon committed Sep 17, 2024
1 parent da79543 commit 023ef59
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
// defaultMilliCPURequest defines default milli cpu request number.
defaultMilliCPURequest int64 = 50 // 0.05 core
// defaultMemoryRequest defines default memory request size.
defaultMemoryRequest int64 = 20 * 1024 * 1024 // 20 MB
defaultMemoryRequest int64 = 100 * 1024 * 1024 // 100 MB (recommended minimum by Alpine)

webhookName = "lib_injection"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ func TestInjectLibInitContainer(t *testing.T) {
lang: java,
wantErr: false,
wantCPU: "50m",
wantMem: "20Mi",
wantMem: "100Mi",
secCtx: &corev1.SecurityContext{},
},
{
Expand All @@ -1121,7 +1121,7 @@ func TestInjectLibInitContainer(t *testing.T) {
lang: java,
wantErr: false,
wantCPU: "200m",
wantMem: "20Mi",
wantMem: "100Mi",
secCtx: &corev1.SecurityContext{},
},
{
Expand All @@ -1143,7 +1143,7 @@ func TestInjectLibInitContainer(t *testing.T) {
lang: java,
wantErr: true,
wantCPU: "50m",
wantMem: "20Mi",
wantMem: "100Mi",
secCtx: &corev1.SecurityContext{},
},
{
Expand All @@ -1153,7 +1153,7 @@ func TestInjectLibInitContainer(t *testing.T) {
lang: java,
wantErr: false,
wantCPU: "50m",
wantMem: "20Mi",
wantMem: "100Mi",
secCtx: &corev1.SecurityContext{
Capabilities: &corev1.Capabilities{
Add: []corev1.Capability{"NET_ADMIN", "SYS_TIME"},
Expand Down Expand Up @@ -1191,7 +1191,7 @@ func TestInjectLibInitContainer(t *testing.T) {
lang: java,
wantErr: false,
wantCPU: "50m",
wantMem: "20Mi",
wantMem: "100Mi",
secCtx: &corev1.SecurityContext{
Capabilities: &corev1.Capabilities{
Drop: []corev1.Capability{"ALL"},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Fix OOM error with cluster agent auto instrumentation by increasing default memory request from 20Mi to 100Mi.

0 comments on commit 023ef59

Please sign in to comment.