feat(k8s): support ImageVolumeSource for supervisor sideload#1300
Open
mrunalp wants to merge 2 commits intoNVIDIA:mainfrom
Open
feat(k8s): support ImageVolumeSource for supervisor sideload#1300mrunalp wants to merge 2 commits intoNVIDIA:mainfrom
mrunalp wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Add a config-driven switch between two supervisor binary delivery methods: image-volume (default) mounts the supervisor OCI image directly as a read-only volume (K8s >= v1.33), while init-container preserves the existing emptyDir + copy-self pattern for older clusters. Configurable via --supervisor-sideload-method CLI arg, OPENSHELL_SUPERVISOR_SIDELOAD_METHOD env var, or Helm supervisor.sideloadMethod value.
TaylorMutch
reviewed
May 10, 2026
Collaborator
TaylorMutch
left a comment
There was a problem hiding this comment.
Could we use Capabilities feature in Helm to configure which mode to use in the chart? https://helm.sh/docs/chart_template_guide/builtin_objects
And then if a user specifies explicitly which mode to use in the helm values use that?
Use Helm .Capabilities.KubeVersion to choose the supervisor sideload method automatically: image-volume on K8s >= v1.33, init-container on older clusters. An explicit supervisor.sideloadMethod value overrides auto-detection.
TaylorMutch
approved these changes
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a config-driven switch for how the supervisor binary is delivered into
sandbox pods:
image-volume(default) mounts the supervisor OCI image directlyas a read-only volume via Kubernetes ImageVolumeSource (GA in v1.36), while
init-containerpreserves the existing emptyDir + copy-self pattern for olderclusters. This eliminates the init container overhead and simplifies the pod spec.
Related Issue
Closes #1299
Changes
SupervisorSideloadMethodenum (ImageVolumedefault,InitContainer)with
FromStr/Display/Defaultinconfig.rssupervisor_image_volume()helper indriver.rsthat emits animagevolume source JSON
apply_supervisor_sideload()to branch on the method —ImageVolumeskips the init container,
InitContainerpreserves existing behaviorsupervisor_sideload_methodthroughSandboxPodParams,sandbox_to_k8s_spec, andsandbox_template_to_k8s--supervisor-sideload-methodCLI arg /OPENSHELL_SUPERVISOR_SIDELOAD_METHODenv var in
main.rsopenshell-server/src/lib.rssupervisor.sideloadMethodHelm value (default:image-volume) and passit via
statefulset.yamlTesting
mise run pre-commitpasseswith image volume source, no supervisor init container present
Checklist
architecture/plans/)