Skip to content

feat: support disabling workbench load balancing via Site CR #119

Description

@stevenolen

Problem

Workbench load balancing is hardcoded to enabled (load-balancing-enabled: 1) in site_controller_workbench.go:131. This causes the operator to always create a shared-storage PVC (<site>-workbench-shared-storage) that requires a StorageClass matching the VolumeSource naming convention (e.g. <site>-workbench-shared-storage-nfs).

When managing storage directly (setting volume.storageClassName rather than using a Site-level VolumeSource), this PVC references a StorageClass that doesn't exist, preventing workbench from starting.

Proposed Solution

Add a loadBalancingEnabled field to InternalWorkbenchSpec in site_types.go:

// LoadBalancingEnabled enables workbench load balancing with shared storage.
// Defaults to true. Set to false to disable shared-storage PVC creation
// and load-balancer init containers.
LoadBalancingEnabled *bool `json:"loadBalancingEnabled,omitempty"`

In site_controller_workbench.go, default to true (preserving current behavior) but respect false by setting LoadBalancingEnabled: 0 and ServerSharedStoragePath: "" on the generated Workbench resource.

Affected Code

  • api/core/v1beta1/site_types.go — add field to InternalWorkbenchSpec
  • internal/controller/core/site_controller_workbench.go — read field, conditionally set rserver config
  • internal/controller/core/workbench.go:684 — shared-storage PVC creation (already gated on LoadBalancingEnabled)
  • internal/controller/core/workbench.go:1046isLoadBalancingEnabled (already gated)

Usage

spec:
  workbench:
    loadBalancingEnabled: false    # disables shared-storage PVC and LB init containers
    volume:
      create: true
      size: 10Gi
      storageClassName: nfs
      accessModes:
        - ReadWriteMany

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions