Skip to content

[ENG-4100]: Grant worker-temporal RBAC to pull Memgraph snapshots - #375

Merged
anatoly-scherbakov merged 1 commit into
mainfrom
anatoly-eng-4100-memgraph-backup-rbac
Jul 23, 2026
Merged

[ENG-4100]: Grant worker-temporal RBAC to pull Memgraph snapshots#375
anatoly-scherbakov merged 1 commit into
mainfrom
anatoly-eng-4100-memgraph-backup-rbac

Conversation

@anatoly-scherbakov

Copy link
Copy Markdown
Contributor

Summary

Memgraph DR backups (datafold repo: docs/decisions/choose-memgraph-dr-architecture.md, datafold/datafold#13758) stream each graph's newest snapshot file out of the Memgraph pod via the k8s exec API, from a Temporal activity running in the worker-io pod.

This renders an opt-in Role (pods/exec create + pods get) and RoleBinding for the service accounts listed in memgraph.backupAccessServiceAccounts (default [] = nothing rendered). Pattern mirrors scale-rbac.yaml from #374 and the ClickHouse-backup exec grant held by the operator. RBAC cannot scope exec by label/command, so the grant is namespace-wide — same blast radius the operator already carries; recorded in the ADR's security considerations.

Per-customer enablement goes through the operator CR (memgraph.rawValues.backupAccessServiceAccounts: [worker]) — wired in the companion cloud-infra PR. SaaS (hand-applied StatefulSets) gets the equivalent hand-applied Role/RoleBinding, seed kept in cloud-infra.

Validation

helm template charts/datafold --set memgraph.install=true --set global.cloudProvider=aws --set memgraph.backupAccessServiceAccounts='{worker-temporal}' --show-only charts/memgraph/templates/backup-rbac.yaml renders the Role + RoleBinding; without the value, nothing is rendered. Chart version bumped for ct lint.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

🔍 Kubeconform Validation Results

All cloud provider configurations passed Kubernetes API schema validation!

Cloud Provider Status
AWS ✅ Passed
GCP ✅ Passed
Azure ✅ Passed

The rendered Kubernetes manifests conform to the Kubernetes API specification across all cloud providers.

Memgraph DR backups (datafold docs/decisions/choose-memgraph-dr-architecture.md)
stream snapshot files out of Memgraph pods via the k8s exec API from a
Temporal activity in the worker-temporal pod. Render an opt-in Role
(pods/exec create + pods get) and RoleBinding for the service accounts
listed in memgraph.backupAccessServiceAccounts (default empty = nothing
rendered). Pattern mirrors the ClickHouse backup exec grant held by the
operator.
@github-actions

Copy link
Copy Markdown

🔍 Kubeconform Validation Results

All cloud provider configurations passed Kubernetes API schema validation!

Cloud Provider Status
AWS ✅ Passed
GCP ✅ Passed
Azure ✅ Passed

The rendered Kubernetes manifests conform to the Kubernetes API specification across all cloud providers.

@anatoly-scherbakov
anatoly-scherbakov merged commit a19373c into main Jul 23, 2026
7 checks passed
@anatoly-scherbakov
anatoly-scherbakov deleted the anatoly-eng-4100-memgraph-backup-rbac branch July 23, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants