Merged
Conversation
mattkjames7
reviewed
Feb 24, 2026
mattkjames7
approved these changes
Feb 24, 2026
Contributor
mattkjames7
left a comment
There was a problem hiding this comment.
Looks good, nice idea, I shall approve!
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User should create a secret with:
What
Add a built-in core dump S3 uploader sidecar to the HA chart. A new
coreDumpUploadervalues section invalues.yamlconfigures anamazon/aws-clisidecar container that pollsthe core dumps directory and uploads new files to S3. The sidecar is rendered via a shared
memgraph.coreDumpUploaderhelper template in_helpers.tpland injected into bothtemplates/data.yamlandtemplates/coordinators.yamlStatefulSets.Why
The existing
createCoreDumpsClaimfeature creates per-instance PVCs for core dumps but provides no built-in way to get those dumps off the cluster. RawuserContainerscan'tsolve this because they're rendered as static YAML applied identically to all StatefulSets, while the core dump PVC volume names are instance-specific (e.g.,
memgraph-data-0-core-dumps-storagevsmemgraph-data-1-core-dumps-storage). A templated sidecar inside therangeloop has access to each instance's ID and can reference thecorrect volume name.
How
The sidecar is gated by
coreDumpUploader.enabled && storage.<role>.createCoreDumpsClaim— it only activates when both the uploader is enabled and a core dumps PVC exists forthat role. This avoids rendering a sidecar with no volume to mount.
_helpers.tpl: Newmemgraph.coreDumpUploadernamed template accepting a dict withvolumeName,mountPath, andvalues. Renders a full container spec with a pollingshell script, AWS credentials from a Secret via
secretKeyRef, a read-only volumeMount for the instance-specific PVC, and hardened securityContext matching chart conventions.data.yaml/coordinators.yaml: 3-line insertion after the main container block (beforeuserContainers), passing the instance-specific volume name (e.g.,printf "memgraph-data-%s-core-dumps-storage" $data.id) to the helper.values.yaml: NewcoreDumpUploaderblock with image config, S3 destination, poll interval, Secret name and key references, and resource requests/limits. Disabled bydefault.
The uploader script polls for
core.*files, waits 5s for write completion, uploads tos3://<bucket>/<prefix>/<hostname>/<filename>, and tracks uploaded files in/tmp/uploaded_filesto avoid re-uploads.Testing
helm templaterendering verified with the feature disabled (default): zerocore-dump-uploadercontainers rendered.helm templaterendering verified with the feature enabled (coreDumpUploader.enabled=true,createCoreDumpsClaim=true): sidecar rendered in all 5 StatefulSets (2 data +3 coordinators) with correct instance-specific volume names.
coreDumpUploader.enabled=truewithcreateCoreDumpsClaim=falseproduces no sidecar (correct — no volume to mount).helm templatevalidation covers rendering correctness.