Skip to content

Commit 345706d

Browse files
controller/registry: don't set memory limits for target
It's not allowed for core components to have memory limits, to ensure that that source of crash-looping pods does not occur to the core payload. Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent a827c02 commit 345706d

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

pkg/controller/registry/reconciler/reconciler.go

-3
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ func Pod(source *operatorsv1alpha1.CatalogSource, name string, img string, saNam
227227
if pod.Spec.Containers[0].Resources.Limits == nil {
228228
pod.Spec.Containers[0].Resources.Limits = map[corev1.ResourceName]resource.Quantity{}
229229
}
230-
double := *grpcPodConfig.MemoryTarget
231-
double.Add(double.DeepCopy())
232-
pod.Spec.Containers[0].Resources.Limits[corev1.ResourceMemory] = double
233230

234231
grpcPodConfig.MemoryTarget.Format = resource.BinarySI
235232
pod.Spec.Containers[0].Env = append(pod.Spec.Containers[0].Env, corev1.EnvVar{

pkg/controller/registry/reconciler/reconciler_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ func TestPodMemoryTarget(t *testing.T) {
150150
corev1.ResourceCPU: resource.MustParse("10m"),
151151
corev1.ResourceMemory: resource.MustParse("5Mi"),
152152
},
153-
Limits: corev1.ResourceList{
154-
corev1.ResourceMemory: resource.MustParse("10Mi"),
155-
},
156153
},
157154
SecurityContext: &corev1.SecurityContext{
158155
ReadOnlyRootFilesystem: pointer.Bool(false),

0 commit comments

Comments
 (0)