Skip to content

Commit 6ae66f7

Browse files
fix(cluster-api): fix kamaji OOM and set limits on unset providers
The kamaji control-plane-provider override in templates/providers.yaml targeted containers[name=manager], but the upstream container is named "controller". The CAPI operator merges container overrides by name, so the intended cpu: 1 / memory: 1024Mi limits were silently dropped and the upstream default of memory: 128Mi was used, producing repeated OOMKilled restarts of the kamaji controller (exit code 137). The other three providers (core, bootstrap, infraprovider/kubevirt) ship upstream with no resources block and have no cozystack override, so they run BestEffort and are first to evict under memory pressure. Set modest limits (500m / 256Mi) and requests (10m / 64Mi) matching typical CAPI controller-manager footprint. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent e846777 commit 6ae66f7

4 files changed

Lines changed: 31 additions & 1 deletion

File tree

‎packages/system/capi-providers-bootstrap/templates/providers.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ spec:
99
selector:
1010
matchLabels:
1111
bootstrap-components: cozy
12+
deployment:
13+
containers:
14+
- name: manager
15+
resources:
16+
limits:
17+
cpu: 500m
18+
memory: 256Mi
19+
requests:
20+
cpu: 10m
21+
memory: 64Mi

‎packages/system/capi-providers-core/templates/providers.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@ spec:
1010
selector:
1111
matchLabels:
1212
core-components: cozy
13+
deployment:
14+
containers:
15+
- name: manager
16+
resources:
17+
limits:
18+
cpu: 500m
19+
memory: 256Mi
20+
requests:
21+
cpu: 10m
22+
memory: 64Mi

‎packages/system/capi-providers-cpprovider/templates/providers.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
cp-components: cozy
1212
deployment:
1313
containers:
14-
- name: manager
14+
- name: controller
1515
resources:
1616
limits:
1717
cpu: "1"

‎packages/system/capi-providers-infraprovider/templates/providers.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ spec:
99
selector:
1010
matchLabels:
1111
infraprovider-components: cozy
12+
deployment:
13+
containers:
14+
- name: manager
15+
resources:
16+
limits:
17+
cpu: 500m
18+
memory: 256Mi
19+
requests:
20+
cpu: 10m
21+
memory: 64Mi

0 commit comments

Comments
 (0)