An interLink sidecar plugin that runs container workloads directly via Apptainer — without a batch-scheduler layer.
Compared to the interlink-slurm-plugin,
this plugin skips SLURM batch-job submission (sbatch/squeue/scancel) and instead
executes job.sh directly as an OS subprocess. This is designed for the use-case where
the plugin process is already running inside a job (one job ↔ one virtual node), so no
additional scheduling step is needed.
- The interlink Virtual Kubelet sends a Create request to the plugin.
- The plugin generates
job.sh— a shell script that runs each container image viaapptainer run/apptainer exec(identical logic to the SLURM plugin). job.shis executed directly as a child process (no sbatch). The process PID is used as the "job ID".- Container status is determined by:
- Checking whether the child process is still alive (
kill -0 <pid>). - Reading per-container
.statusfiles thatjob.shwrites upon exit.
- Checking whether the child process is still alive (
- Deleting a pod sends
SIGTERMto the entire process group.
The plugin reads a YAML configuration file. The default path is
/etc/interlink/ApptainerConfig.yaml; override via the APPTAINERCONFIGPATH
environment variable or the -ApptainerConfigpath flag.
# Port to listen on (when not using a Unix socket)
SidecarPort: "4000"
# Optional Unix socket path (e.g. "unix:///tmp/apptainer.sock")
# Socket: ""
# Directory where per-pod working data is stored
DataRootFolder: "/tmp/.interlink/"
# Path to the apptainer binary
ApptainerPath: "apptainer"
# Default options passed to every apptainer run/exec call
ApptainerDefaultOptions:
- "--nv"
- "--no-eval"
- "--containall"
# Prefix added to image names that have no URI scheme
# ImagePrefix: "docker://"
# Path to bash used to execute job.sh
BashPath: "/bin/bash"
# Whether to export pod data (ConfigMaps, Secrets) to the working directory
ExportPodData: true
# Verbose / errors-only logging
VerboseLogging: false
ErrorsOnlyLogging: false
# Enable Kubernetes probe support
EnableProbes: false| Variable | Config field |
|---|---|
APPTAINERCONFIGPATH |
config file path |
SIDECARPORT |
SidecarPort |
APPTAINERPATH |
ApptainerPath |
TSOCKS |
Tsocks |
TSOCKSPATH |
TsocksPath |
go build -o bin/apptainer-plugin ./cmdAPPTAINERCONFIGPATH=/etc/interlink/ApptainerConfig.yaml ./bin/apptainer-plugin| Feature | SLURM plugin | Apptainer plugin |
|---|---|---|
| Job submission | sbatch |
Direct exec |
| Status polling | squeue |
kill -0 <pid> + .status files |
| Job cancellation | scancel |
SIGTERM to process group |
| Cluster info endpoint | sinfo -s |
apptainer version |
| Flavors / SLURM flags | Yes | No |
| Container runtime | singularity / enroot | apptainer |