posit-dev / posit-dev/team-operator
Shared storage PV provisioned unconditionally even when load balancing is disabled
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10
- Forks
- 1
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
Summary
The Site controller unconditionally provisions the workbench shared storage PV (both NFS and FSx paths), but the Workbench controller only creates the corresponding PVC when LoadBalancingEnabled == 1. This means a volume is allocated but never claimed when load balancing is disabled.
Current Behavior
Site controller (internal/controller/core/site_controller.go):
- Lines 198-203 (FSx) and 237-242 (NFS): shared storage PV is always provisioned with no conditional check
Workbench controller (internal/controller/core/workbench.go):
- PVC is only created when
LoadBalancingEnabled == 1
Other volumes in the Site controller are correctly gated:
- Connect PV:
if connectEnabled - Shared directory PV:
if site.Spec.SharedDirectory != ""
Expected Behavior
The shared storage PV should only be provisioned when Workbench load balancing is enabled, consistent with how the PVC is gated and how other conditional volumes are handled.
Impact
- Orphaned PV and wasted storage allocation when load balancing is disabled
- Minor inconsistency, no functional breakage since
LoadBalancingEnableddefaults to1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FSx and NFS provisioning paths at lines 198-203 and 237-242 of internal/controller/core/site_controller.go, then compare their conditions with the PVC logic in internal/controller/core/workbench.go. Verify that both shared-storage PV paths are skipped when LoadBalancingEnabled is not 1 and still provisioned when it is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100