Skip to content

Commit 620fe0c

Browse files
committed
Bump base memory requirements for python and go
- When auto-instrumenting applications, I have noticed that default memory limits are too tight for some languages. This leads to the following: - Intermitent OOMKilled events in init container when auto-instrumenting python applications. Eventually the pods are able to start. - OOMKilled events for sidecar containers in go applications. The pods are not able to start. - 64Mi seems to be enough to fix these issues. While some tweaking by users may still be necessary, the operator should work out-of-the-box for all supported languages.
1 parent 7e6b3cf commit 620fe0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apis/v1alpha1/instrumentation_webhook.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ func (w InstrumentationWebhook) defaulter(r *Instrumentation) error {
128128
if r.Spec.Python.Resources.Limits == nil {
129129
r.Spec.Python.Resources.Limits = corev1.ResourceList{
130130
corev1.ResourceCPU: resource.MustParse("500m"),
131-
corev1.ResourceMemory: resource.MustParse("32Mi"),
131+
corev1.ResourceMemory: resource.MustParse("64Mi"),
132132
}
133133
}
134134
if r.Spec.Python.Resources.Requests == nil {
135135
r.Spec.Python.Resources.Requests = corev1.ResourceList{
136136
corev1.ResourceCPU: resource.MustParse("50m"),
137-
corev1.ResourceMemory: resource.MustParse("32Mi"),
137+
corev1.ResourceMemory: resource.MustParse("64Mi"),
138138
}
139139
}
140140
if r.Spec.DotNet.Image == "" {
@@ -158,13 +158,13 @@ func (w InstrumentationWebhook) defaulter(r *Instrumentation) error {
158158
if r.Spec.Go.Resources.Limits == nil {
159159
r.Spec.Go.Resources.Limits = corev1.ResourceList{
160160
corev1.ResourceCPU: resource.MustParse("500m"),
161-
corev1.ResourceMemory: resource.MustParse("32Mi"),
161+
corev1.ResourceMemory: resource.MustParse("64Mi"),
162162
}
163163
}
164164
if r.Spec.Go.Resources.Requests == nil {
165165
r.Spec.Go.Resources.Requests = corev1.ResourceList{
166166
corev1.ResourceCPU: resource.MustParse("50m"),
167-
corev1.ResourceMemory: resource.MustParse("32Mi"),
167+
corev1.ResourceMemory: resource.MustParse("64Mi"),
168168
}
169169
}
170170
if r.Spec.ApacheHttpd.Image == "" {

0 commit comments

Comments
 (0)