feat(github-runner): pod-env DOTNET_INSTALL_DIR + initContainer for non-root runner #7

Merged
bluejay merged 1 commits from chore/runner-pod-env-dotnet-install-dir into main 2026-05-18 02:25:19 +00:00
Owner

Summary

Sprint 30 Cl-1 acceptance fix: retires the per-workflow DOTNET_INSTALL_DIR patch ~25 flipped Linux repos currently carry by setting it (plus 4 sibling env vars) directly on both github-runner Deployments.

Changes

Both github-runner and github-runner-sharedpos Deployments now have:

  • New initContainers.setup-runner-home (busybox:1.36 as UID 0) that mkdir -p + chown -R 1001:1001 /home/runner/.dotnet + /home/runner/.nuget before the main container starts.
  • New runner-home emptyDir volume mounted at /home/runner (the PVC mount at /home/runner/.nuget/packages on the Common runner continues to win at its nested path, so the persistent NuGet cache survives ephemeral restarts).
  • 5 new env vars: DOTNET_INSTALL_DIR=/home/runner/.dotnet, NUGET_PACKAGES=/home/runner/.nuget/packages, DOTNET_CLI_TELEMETRY_OPTOUT=1, DOTNET_NOLOGO=1, DOTNET_GENERATE_ASPNET_CERTIFICATE=false.

Validation

  • python -c yaml.safe_load_all on the file loads 6 docs cleanly.
  • kubectl apply --dry-run=client -f ... reports all 6 resources configured (dry run).
  • Both Deployments end with env vars: 12 | initContainers: 1 | volumes: 3 | volumeMounts: 3 and all 5 expected env vars present.

Test plan

  • ArgoCD picks up the manifest and rolls both Deployments.
  • kubectl -n github-runner get pod -l app.kubernetes.io/name=github-runner and -l app.kubernetes.io/name=github-runner-sharedpos show pods Running with the new env vars visible in -o jsonpath.
  • Next dotnet restore-bearing workflow on either runner succeeds without a per-workflow DOTNET_INSTALL_DIR step.
  • Per-workflow patch retirement is filed as a follow-on sweep PR across the ~25 flipped Linux repos once 1+ workflow runs cleanly without it.

Diff: 92 insertions / 0 deletions (pure additive).

?? Generated with Claude Code

## Summary Sprint 30 Cl-1 acceptance fix: retires the per-workflow `DOTNET_INSTALL_DIR` patch ~25 flipped Linux repos currently carry by setting it (plus 4 sibling env vars) directly on both `github-runner` Deployments. ## Changes Both `github-runner` and `github-runner-sharedpos` Deployments now have: * New `initContainers.setup-runner-home` (busybox:1.36 as UID 0) that `mkdir -p` + `chown -R 1001:1001` `/home/runner/.dotnet` + `/home/runner/.nuget` before the main container starts. * New `runner-home` `emptyDir` volume mounted at `/home/runner` (the PVC mount at `/home/runner/.nuget/packages` on the Common runner continues to win at its nested path, so the persistent NuGet cache survives ephemeral restarts). * 5 new env vars: `DOTNET_INSTALL_DIR=/home/runner/.dotnet`, `NUGET_PACKAGES=/home/runner/.nuget/packages`, `DOTNET_CLI_TELEMETRY_OPTOUT=1`, `DOTNET_NOLOGO=1`, `DOTNET_GENERATE_ASPNET_CERTIFICATE=false`. ## Validation * `python -c yaml.safe_load_all` on the file loads 6 docs cleanly. * `kubectl apply --dry-run=client -f ...` reports all 6 resources `configured (dry run)`. * Both Deployments end with `env vars: 12 | initContainers: 1 | volumes: 3 | volumeMounts: 3` and all 5 expected env vars present. ## Test plan * [ ] ArgoCD picks up the manifest and rolls both Deployments. * [ ] `kubectl -n github-runner get pod -l app.kubernetes.io/name=github-runner` and `-l app.kubernetes.io/name=github-runner-sharedpos` show pods Running with the new env vars visible in `-o jsonpath`. * [ ] Next `dotnet restore`-bearing workflow on either runner succeeds without a per-workflow `DOTNET_INSTALL_DIR` step. * [ ] Per-workflow patch retirement is filed as a follow-on sweep PR across the ~25 flipped Linux repos once 1+ workflow runs cleanly without it. Diff: 92 insertions / 0 deletions (pure additive). ?? Generated with [Claude Code](https://claude.com/claude-code)
bluejay added 1 commit 2026-05-18 02:25:09 +00:00
Sprint 30 Cl-1 acceptance fix. Sets DOTNET_INSTALL_DIR + NUGET_PACKAGES + 4
sibling env vars on both Deployments so non-root runner (UID 1001) can
write to /home/runner/.dotnet + /home/runner/.nuget without the
per-workflow patch that ~25 flipped Linux repos currently carry.

initContainer pre-creates + chowns the dirs to runner:runner so the
runtime mkdir-or-write succeeds on first restore. emptyDir mounted at
/home/runner; the .nuget/packages PVC (Common runner) wins at its nested
mount path so the persistent NuGet cache survives ephemeral pod restarts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bluejay merged commit 65ac8d6f01 into main 2026-05-18 02:25:19 +00:00
bluejay deleted branch chore/runner-pod-env-dotnet-install-dir 2026-05-18 02:25:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bluejay/bluejay-infra#7