Skip to content

feat(helm): expose scheduling fields (priorityClassName, topologySpreadConstraints) on the gateway workload #2342

Description

@bjw123

Summary

The Helm chart's gateway pod template (templates/_gateway-workload.tpl, shared by both the StatefulSet and Deployment workload shapes) does not expose several standard pod-spec scheduling fields, and the StatefulSet PVC size is hardcoded. This makes it impossible to give the gateway a scheduling priority, spread it across nodes, or size its volume without forking the chart or resorting to out-of-band mutation (Kyverno / post-render patches).

This request is specifically about the upstream-owned gateway workload (both workloadKind: statefulset and workloadKind: deployment, since they share openshell.gatewayPodTemplate). It is not about the sandbox/controller pods.

Observed on chart helm-chart version 0.0.82 and confirmed still present on main.

Current pod-spec knobs exposed by the gateway template

podAnnotations, podLabels, terminationGracePeriodSeconds, imagePullSecrets, hostAliases (via server.hostGatewayIP), podSecurityContext, container securityContext, nodeSelector, affinity, tolerations, resources.

Requested

  • priorityClassName — the gateway is a control-plane SPOF; when it shares nodes with the workloads it serves, at the default priority 0 it has no scheduling/eviction advantage over them. A local capacity crunch can node-pressure-evict the gateway and degrade into a fleet-wide outage. Exposing priorityClassName lets operators place the gateway in a higher priority band.

  • topologySpreadConstraints — needed to spread gateway replicas across zones/nodes. Today only affinity is available, which is a clumsier tool for even spreading.

  • persistence.size / persistence.storageClassName on the StatefulSet — the volumeClaimTemplates currently hardcodes storage: 1Gi with no corresponding value and no way to set a StorageClass:

    volumeClaimTemplates:
      - metadata:
          name: openshell-data
        spec:
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 1Gi

    As a result, every fresh install gets a fixed 1Gi PVC on the default StorageClass, with no override. Because volumeClaimTemplates is immutable, there is also no in-place way to grow it later via the chart. Exposing persistence.size and persistence.storageClassName (defaulting to the current 1Gi / unset) fixes this without changing existing behavior.

Both scheduling fields should apply to the StatefulSet and Deployment shapes identically (they render from the same template).

Proposed shape

Standard optional passthroughs, rendered only when set, e.g.:

priorityClassName: ""
topologySpreadConstraints: []
persistence:
  size: 1Gi
  storageClassName: ""
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
  {{- toYaml . | nindent 4 }}
{{- end }}

Contribution

I'm happy to provide the MR for all of the above — the change is small and self-contained. I can't open it yet because my contributor vouch request (#1829) has been open since 2026-06-09 with no response. Once that's approved I'll put the PR up directly.

Activity

  1. matthewgrossman commented on Jul 29, 2026

    @matthewgrossman
    Member

    📋 triage-agent

    Triage Assessment

    Classification: feature-valid

    Summary

    The gateway scheduling and persistence gaps are valid, and the proposed optional values preserve existing chart behavior.

    Investigation

    deploy/helm/openshell/templates/_gateway-workload.tpl exposes node selectors, affinity, and tolerations, but not priorityClassName or topologySpreadConstraints. templates/statefulset.yaml still hardcodes the gateway PVC to 1Gi without a StorageClass override on both v0.0.92 and origin/main. PR #2463 only added StorageClass configuration for sandbox workspace PVCs and does not duplicate this request.

    Recommendation

    Keep the issue open as a bounded Helm enhancement. Add render/unit coverage for both workload kinds and the StatefulSet PVC defaults.

  2. added
    area:clusterRelated to running OpenShell on k3s/docker
    and removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Jul 29, 2026
  3. bjw123 commented on Aug 4, 2026

    @bjw123
    Author

    @matthewgrossman could you pleae approve my vouch request I have a PR for this #2610

  4. bjw123 commented on Aug 20, 2026

    @bjw123
    Author

    Hi @matthewgrossman I've put in an MR for this is a relatively minor change but nice to have

    especially the hardcoded PVC size with no storageClass its something that I have forked, as some guys i work with are crazy enough to want to run 1000+ sandboxes on a GW and 1gb obviously does not cut it instead we just override the helm chart

  5. github-actions commented on Sep 4, 2026

    @github-actions

    This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.

  6. chrysent commented on Sep 22, 2026

    @chrysent

    The existing pr solves the issue I am facing on my cluster which doesnt have a default storageclass.

  7. github-actions commented on Oct 7, 2026

    @github-actions

    This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clusterRelated to running OpenShell on k3s/dockerstate:staleInactive item at risk of automatic closure.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions