Skip to content

fix(mongodb): let MongoDB container resources be configured - #176

Merged
alix-graylog merged 2 commits into
mainfrom
wave-3-mongodb-resources
Aug 25, 2026
Merged

fix(mongodb): let MongoDB container resources be configured#176
alix-graylog merged 2 commits into
mainfrom
wave-3-mongodb-resources

Conversation

@alix-graylog

@alix-graylog alix-graylog commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Sumarry

Exposing mogno container resource's requests and limits to the Graylog charts values.yaml

Description

This allows for creating more minimum viable tests for CICD

Related Issues

The operator owns the pod template of the StatefulSet it manages and injects
its own resource defaults of 500m CPU and 500M memory per container and per
init container. mongo-rs.yaml overrode serviceAccountName and affinity but
never containers or initContainers, so nothing in the chart - no value, no
--set - could change what a MongoDB pod requested.

The init containers matter as much as the containers: a pod reserves
max(max(initContainer), sum(containers)), so each merely copying a binary into
a shared volume at 500m sets the pod's effective floor whenever the containers
ask for less. Overriding only the containers is not enough.

Adds mongodb.resources, mongodb.agentResources and mongodb.initResources,
patched onto the operator-owned template by container name, with defaults sized
for a production replica set rather than inherited from the operator. mongod
gets 2Gi: WiredTiger sizes its cache from the container limit and an idle
3-member replica set already sits at ~340Mi, so the operator's 500M limit left
almost nothing before an OOMKill. CPU goes the other way, since the same
replica set idles under 50m per member.

A MongoDB pod's reservation therefore moves from 1000m/800M to 300m/1152Mi, and
ci/ci-values.yaml shrinks all three blocks to 150m/640Mi for CI. Existing
installs get a rolling restart of the replica set on upgrade.
@alix-graylog
alix-graylog marked this pull request as ready for review August 21, 2026 21:00
@alix-graylog alix-graylog added feature New feature. improvement Not a bug, not a feature. labels Aug 21, 2026
@alix-graylog
alix-graylog merged commit e49b97f into main Aug 25, 2026
9 checks passed
@alix-graylog
alix-graylog deleted the wave-3-mongodb-resources branch August 25, 2026 19:15
alix-graylog added a commit that referenced this pull request Aug 27, 2026
No commit in the 1.0.0 to 2.0.0 window carried a breaking-change footer, so
release-please had no breaking-changes section to generate. This adds the 16
found by rendering the chart at both versions and diffing resource names,
StatefulSet immutable fields, security contexts and values keys.

Also adds the mongodb entry from #176, which the parser dropped, corrects
"starup" to "startup" in the #169 entry, and gives #160 a description of what
it actually does.

The publish job generates artifacthub.io/changes from this file, so these
notes reach Artifact Hub as written.
alix-graylog added a commit that referenced this pull request Aug 27, 2026
* chore(main): release graylog 2.0.0

* chore(main): write the 2.0.0 breaking changes into the changelog

No commit in the 1.0.0 to 2.0.0 window carried a breaking-change footer, so
release-please had no breaking-changes section to generate. This adds the 16
found by rendering the chart at both versions and diffing resource names,
StatefulSet immutable fields, security contexts and values keys.

Also adds the mongodb entry from #176, which the parser dropped, corrects
"starup" to "startup" in the #169 entry, and gives #160 a description of what
it actually does.

The publish job generates artifacthub.io/changes from this file, so these
notes reach Artifact Hub as written.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: alix-graylog <alix.fullerton@graylog.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature. improvement Not a bug, not a feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants