fix: run registration init container as root #21

Merged
rcsheets merged 1 commit from fix/init-container-root into master 2026-03-27 07:10:50 +00:00
Owner

The forgejo-runner image's default user can't write .runner to the
PVC mount. The manually-deployed runners use runAsUser: 0 for the
init container; match that behavior in the operator.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

The forgejo-runner image's default user can't write .runner to the PVC mount. The manually-deployed runners use runAsUser: 0 for the init container; match that behavior in the operator. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: run registration init container as root
Some checks failed
CI / ci (push) Has been cancelled
CI / ci (pull_request) Has been cancelled
E2E smoke test / e2e (pull_request) Has been cancelled
ede40ced8c
The forgejo-runner image's default user can't write .runner to the
PVC mount. The manually-deployed runners use runAsUser: 0 for the
init container; match that behavior in the operator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id r-c62d2a-aa3341
This is an AI-generated review and may contain mistakes.

Status: Completed


Verdict: LGTM — The change appropriately fixes a permission issue by running the init container as root to write to the PVC mount, matching existing manual deployment behavior.
Complexity: trivial

Safety Check Review

This change fixes a permission issue where the forgejo-runner image's default user cannot write to the .runner file in the PVC mount. The fix runs the init container as root (RunAsUser: 0) and adds a helper function for the pointer conversion.

Key observations:

  • The change matches existing behavior from manual deployments (as noted in PR description)
  • Only affects the init container, not the main runner container
  • Adds appropriate comment explaining why root is needed
  • Includes necessary helper function int64Ptr
  • Minor formatting adjustment to align with new function

No security concerns - this is a targeted fix for a legitimate permission issue during initialization.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.15.0 | Safety Check | anthropic | tracking id `r-c62d2a-aa3341`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- **✅ Verdict: LGTM** — The change appropriately fixes a permission issue by running the init container as root to write to the PVC mount, matching existing manual deployment behavior. **Complexity:** trivial # Safety Check Review This change fixes a permission issue where the forgejo-runner image's default user cannot write to the `.runner` file in the PVC mount. The fix runs the init container as root (`RunAsUser: 0`) and adds a helper function for the pointer conversion. **Key observations:** - The change matches existing behavior from manual deployments (as noted in PR description) - Only affects the init container, not the main runner container - Adds appropriate comment explaining why root is needed - Includes necessary helper function `int64Ptr` - Minor formatting adjustment to align with new function No security concerns - this is a targeted fix for a legitimate permission issue during initialization.
rcsheets merged commit 5e433fac1e into master 2026-03-27 07:10:50 +00:00
rcsheets deleted branch fix/init-container-root 2026-03-27 07:10:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brooktrails/forgejo-runner-operator!21
No description provided.