Standalone Slurm exporter - No Kubernetes needed#1415
Merged
ali-sattari merged 9 commits intonebius:mainfrom Aug 14, 2025
mateusclira-nv:mateusclira-nv/standalone-slurm
Merged
Standalone Slurm exporter - No Kubernetes needed#1415ali-sattari merged 9 commits intonebius:mainfrom mateusclira-nv:mateusclira-nv/standalone-slurm
ali-sattari merged 9 commits intonebius:mainfrom
mateusclira-nv:mateusclira-nv/standalone-slurm
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds standalone mode support to the Slurm exporter, allowing it to run without Kubernetes dependencies by using static JWT tokens for authentication with slurmrestd.
- Introduces
--standaloneand--static-tokenflags for non-Kubernetes deployments - Updates HTTP client to use
Header.Setinstead ofHeader.Addto prevent duplicate headers on retries - Adds retry configuration to the default HTTP client for improved reliability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| cmd/exporter/main.go | Adds standalone mode flags, optional Kubernetes client initialization, and static token issuer |
| internal/slurmapi/client.go | Improves HTTP client with retry configuration and fixes header handling to prevent duplicates |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ali-sattari
requested changes
Aug 13, 2025
Collaborator
ali-sattari
left a comment
There was a problem hiding this comment.
Linter is unhappy about go fmt and there is one comment from Copilot that I kept, please address those.
ali-sattari
approved these changes
Aug 14, 2025
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 minimal, backward-compatible path to run the exporter against a standalone Slurm cluster (
slurmrestdwithrest_auth/jwt)—no Kubernetes required.Changes
--standalone: skip k8s client/JWT flow.--static-token(optional): alternative to env; CLI still has highest precedence.SLURM_EXPORTER_TOKENfrom the environment for REST calls.SLURM_JWT(kept out to avoid collisions with Slurm internals).Header.Setinstead ofHeader.AddforX-SLURM-USER-TOKEN(andContent-Type) to avoid duplicate headers on retries.Testing
slurmrestdv0.0.40.