30 Commits
Author SHA1 Message Date
a6e862ee0c fix(runtimes): set defaultMode on MPI SSH Secret volume (#3649)
* fix(runtimes): set file modes on MPI SSH secret volume

Set per-item file modes on the MPI SSH auth Secret volume to prevent
the private key from being world-readable inside training pods.

Private key uses 0o640 (not 0o600) because the builtin
deepspeed-distributed and mlx-distributed runtimes run as
runAsUser: 1000 while Secret volumes mount as root:root.

A volume-level DefaultMode of 0o400 is added as defense-in-depth
for any future items added without an explicit per-item mode.

Fixes #3262

Signed-off-by: Dmytro Hryshchenko <[email protected]>

* docs: update pkg/constants/constants.go

Co-authored-by: Andrey Velichkevich <[email protected]>
Signed-off-by: Dmytro Hryshchenko <[email protected]>

---------

Signed-off-by: Dmytro Hryshchenko <[email protected]>
Signed-off-by: Dmytro Hryshchenko <[email protected]>
Co-authored-by: Andrey Velichkevich <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-24 10:40:35 +00:00
6da5d948b2 feat(runtimes): add validation for reserved MPI environment variables (#3491)
Signed-off-by: Vishal Painjane <[email protected]>
Co-authored-by: Vishal Painjane <[email protected]>
2026-05-09 17:39:35 +00:00
Kevin HannonandGitHub 52d7fd69c4 chore: update golangci-linter and kube-api-linter (#3471)
Signed-off-by: Kevin Hannon <[email protected]>
2026-05-05 04:54:27 +00:00
Rob BellandGitHub 78b4a00929 feat: add support for tracking TrainJob progress and training metrics (#3227)
* feat(api): add progress types to api

Signed-off-by: Rob Bell <[email protected]>

* feat: progress server stub

Signed-off-by: Rob Bell <[email protected]>

* feat: setup tls for server

Signed-off-by: Rob Bell <[email protected]>

* refactor: pull out middleware

Signed-off-by: Rob Bell <[email protected]>

* refactor: remove logger message noise from tests

Signed-off-by: Rob Bell <[email protected]>

* fix: send server error logs to main logger

Signed-off-by: Rob Bell <[email protected]>

* feat: update the trainer status

Signed-off-by: Rob Bell <[email protected]>

* feat: use separate client to avoid impacting main reconciler client-side rate limits

Signed-off-by: Rob Bell <[email protected]>

* feat: configure progress server in helm chart and configmap

Signed-off-by: Rob Bell <[email protected]>

* fix: prevent race condition

Signed-off-by: Rob Bell <[email protected]>

* feat: inject progress runtime config

Signed-off-by: Rob Bell <[email protected]>

* fix: progress client config

Signed-off-by: Rob Bell <[email protected]>

* fix: update generated config

Signed-off-by: Rob Bell <[email protected]>

* feat: validate auth tokens in endpoint

Signed-off-by: Rob Bell <[email protected]>

* test: validate auth tokens in endpoint

Signed-off-by: Rob Bell <[email protected]>

* refactor: tidy tests to use same format as other tests

Signed-off-by: Rob Bell <[email protected]>

* fix: look up the cluster issuer from the service account token

Different clusters can use different issuers so look up the issuer from the trusted in-cluster service account token.

Signed-off-by: Rob Bell <[email protected]>

* refactor: rename authn middleware

Signed-off-by: Rob Bell <[email protected]>

* feat: add authn to status update endpoint

Signed-off-by: Rob Bell <[email protected]>

* refactor: tidy up reading in-cluster service account token

Signed-off-by: Rob Bell <[email protected]>

* fix: rbac permissions

Signed-off-by: Rob Bell <[email protected]>

* fix: better error response

Signed-off-by: Rob Bell <[email protected]>

* refactor: move kubebuilder annotation higher up

Signed-off-by: Rob Bell <[email protected]>

* fix: make lastUpdateTime required

Signed-off-by: Rob Bell <[email protected]>

* chore: fix config tests after rebase

Signed-off-by: Rob Bell <[email protected]>

* test: update config test with new progress server config

Signed-off-by: Rob Bell <[email protected]>

* test: add progress tracking e2e test

Signed-off-by: Rob Bell <[email protected]>

* fix: allow feature gates to be configurable from command line argument

So they can be overridden in e2e tests

Signed-off-by: Rob Bell <[email protected]>

* refactor: reuse shared progress StatusUrl

Signed-off-by: Rob Bell <[email protected]>

* test: tidy up tests

Signed-off-by: Rob Bell <[email protected]>

* refactor: allow plugins to use config

Signed-off-by: Rob Bell <[email protected]>

* refactor: centralise shared constants

Signed-off-by: Rob Bell <[email protected]>

* fix: disable http2 in progress server tls opts if disabled by config

Signed-off-by: Rob Bell <[email protected]>

* fix: minor improvements suggested by copilot

Signed-off-by: Rob Bell <[email protected]>

* chore: rename progress server => status server

Signed-off-by: Rob Bell <[email protected]>

* chore: update type doc

Signed-off-by: Rob Bell <[email protected]>

* chore: update name of feature gate

Signed-off-by: Rob Bell <[email protected]>

* fix: after rebase

Signed-off-by: Rob Bell <[email protected]>

* chore: fix typo

Signed-off-by: Rob Bell <[email protected]>

* chore: rename handler

Signed-off-by: Rob Bell <[email protected]>

* fix: run status server on all replicas

Signed-off-by: Rob Bell <[email protected]>

* fix: deep copy the rest config

Signed-off-by: Rob Bell <[email protected]>

* refactor: use ssa

Signed-off-by: Rob Bell <[email protected]>

* refactor: separate token audience per train job

Signed-off-by: Rob Bell <[email protected]>

* chore: rename status server

Signed-off-by: Rob Bell <[email protected]>

* fix: revert adding status pkg to manifest gen paths

Signed-off-by: Rob Bell <[email protected]>

* chore: update log messages

Signed-off-by: Rob Bell <[email protected]>

* chore: update api docs

Signed-off-by: Rob Bell <[email protected]>

* chore: update format

Signed-off-by: Rob Bell <[email protected]>

* fix: revert inadvertent change

Signed-off-by: Rob Bell <[email protected]>

* chore: update api name and type docs

Signed-off-by: Rob Bell <[email protected]>

* refactor: initialise oidc provider in manager startup

Signed-off-by: Rob Bell <[email protected]>

* fix: allow empty update request

Signed-off-by: Rob Bell <[email protected]>

* fix: wait for server shut down

Signed-off-by: Rob Bell <[email protected]>

* fix: handle missing train job

Signed-off-by: Rob Bell <[email protected]>

* refactor: update env var names

Signed-off-by: Rob Bell <[email protected]>

* chore: rename packages, plugins, feature gate

Signed-off-by: Rob Bell <[email protected]>

* refactor: update env var names

Signed-off-by: Rob Bell <[email protected]>

* chore: regenerate after rebase

Signed-off-by: Rob Bell <[email protected]>

* chore: fixes after rebase

Signed-off-by: Rob Bell <[email protected]>

* chore: minor doc updates

Signed-off-by: Rob Bell <[email protected]>

* chore: rename status server config

Signed-off-by: Rob Bell <[email protected]>

* chore: replace placeholder config with nil

Signed-off-by: Rob Bell <[email protected]>

* chore: revert separate runtime utils package

Signed-off-by: Rob Bell <[email protected]>

* chore: remove unused config from tests

Signed-off-by: Rob Bell <[email protected]>

---------

Signed-off-by: Rob Bell <[email protected]>
2026-03-13 20:01:08 +00:00
Andrey VelichkevichandGitHub 63d928468c feat(api): BREAKING CHANGE: Remove numProcPerNode from Torch API (#3239)
* feat(api): BREAKING CHANGE: Remove numProcPerNode from Torch API

Signed-off-by: Andrey Velichkevich <[email protected]>

* Remove trainer_v1alpha1_torch_elastic_policy.py from Py models

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix numNodes validation in torchtune

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
2026-03-01 06:53:03 +00:00
Antonin StefanuttiandGitHub 0f9825e89e chore(operator): Use SSA throughout runtime framework (#2877)
* chore(operator): Use SSA throughout runtime framework

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix lint error

Signed-off-by: Antonin Stefanutti <[email protected]>

* Update go.mod file

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2025-10-31 11:43:12 +00:00
576e0896b7 feat(runtimes): add support for launcher resource allocation in MPI jobs (#2653)
* feat(runtime): add support for launcher resource allocation in MPI jobs

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add unit tests

Signed-off-by: Andrey Velichkevich <[email protected]>

* Set numProcPerNode for MPI plugin

Signed-off-by: Andrey Velichkevich <[email protected]>

* Move util func to runtime package

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix torchtune plugin

Signed-off-by: Andrey Velichkevich <[email protected]>

* Inline if for GPU check

Signed-off-by: Andrey Velichkevich <[email protected]>

* Assign container resources once

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add todo for test wrappers

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
Co-authored-by: Andrey Velichkevich <[email protected]>
2025-10-20 13:26:03 +00:00
Antonin StefanuttiandGitHub 5de58d1d9e fix(api): Keep mpiImplementation field a pointer (#2897)
* fix(api): Keep mpiImplementation field a pointer

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix integration test

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2025-10-17 16:08:00 +00:00
Antonin StefanuttiandGitHub 7755220575 chore(ci): Enable Kubernetes API Linter (#2858)
* chore(ci): Enable Kubernetes API Linter

Signed-off-by: Antonin Stefanutti <[email protected]>

* lint files

Signed-off-by: Antonin Stefanutti <[email protected]>

* Generate

Signed-off-by: Antonin Stefanutti <[email protected]>

* Review

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix golangci-lint target

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix commands max length

Signed-off-by: Antonin Stefanutti <[email protected]>

* Re: Fix golangci-lint target

Signed-off-by: Antonin Stefanutti <[email protected]>

* Enable the integers linter

Signed-off-by: Antonin Stefanutti <[email protected]>

* Disable maxlength linter

Signed-off-by: Antonin Stefanutti <[email protected]>

* make generate

Signed-off-by: Antonin Stefanutti <[email protected]>

* Make fields optional

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix Suspended field in JobStatus

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2025-10-17 14:40:59 +00:00
Andrey VelichkevichandGitHub 8655798f02 fix(module): Change Go module name to v2 (#2707)
* fix(module): Change Go module name to v2

Signed-off-by: Andrey Velichkevich <[email protected]>

* Bump x/net to v0.38.0

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
2025-07-03 17:46:20 +00:00
Antonin StefanuttiandGitHub cdc702bf25 feat: Mutable PodSpecOverrides for suspended TrainJob (#2683)
* feat: Mutable PodSpecOverrides for suspended TrainJob

Signed-off-by: Antonin Stefanutti <[email protected]>

* Include @tenzen-y review

Signed-off-by: Antonin Stefanutti <[email protected]>

* Add unit tests

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2025-07-01 13:57:18 +00:00
Yuki IwaiandGitHub f5a2d0f250 Implement trainer.kubeflow.org/resource-in-use finalizer mechanism to TrainingRuntime (#2608)
* Implement trainer.kubeflow.org/resource-in-use finalizer mechanism to TrainingRuntime

Signed-off-by: Yuki Iwai <[email protected]>

# Conflicts:
#	pkg/constants/constants.go

* Reduce permissions

Signed-off-by: Yuki Iwai <[email protected]>

* Dispatch reconciliations even when TrainJob is updated

Signed-off-by: Yuki Iwai <[email protected]>

---------

Signed-off-by: Yuki Iwai <[email protected]>
2025-05-01 20:17:04 +00:00
46bfd7bf91 [feature]:add validations for MPIRuntime with RunLauncherAsNode (#2551)
* [feature]:add validatioons for MPIRuntime with RunLauncherAsNode

Signed-off-by: Harshal292004 <[email protected]>

* fix:changed "launcher" and "node" with constants

Signed-off-by: Harshal292004 <[email protected]>

* fix:removed the constants with string values

Signed-off-by: Harshal292004 <[email protected]>

* fix: add nil checks for before derefrencing pointers

Signed-off-by: Harshal292004 <[email protected]>

* fix:add check for trainjob being nil

Signed-off-by: Harshal292004 <[email protected]>

* updae with suggestions

Signed-off-by: Harshal292004 <[email protected]>

* update with suggestions

Signed-off-by: Harshal292004 <[email protected]>

* Update pkg/runtime/framework/plugins/mpi/mpi.go

Co-authored-by: Yuki Iwai <[email protected]>
Signed-off-by: Harshal Malani <[email protected]>

* Update pkg/runtime/framework/plugins/mpi/mpi.go

Co-authored-by: Yuki Iwai <[email protected]>
Signed-off-by: Harshal Malani <[email protected]>

* fix merge conflicts

Signed-off-by: Harshal292004 <[email protected]>

* test(runtime): add UT for mpi runtime validate function

Signed-off-by: Harshal292004 <[email protected]>

* Update mpi and mpi_test according to suggestions

Signed-off-by: Harshal292004 <[email protected]>

* Update mpi_test

Signed-off-by: Harshal292004 <[email protected]>

---------

Signed-off-by: Harshal292004 <[email protected]>
Signed-off-by: Harshal Malani <[email protected]>
Co-authored-by: Yuki Iwai <[email protected]>
2025-03-28 15:46:29 +00:00
Yuki IwaiandGitHub 311e72b410 Fix MPI Test runnable errors (#2570)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-27 18:05:23 +00:00
Yuki IwaiandGitHub 7d9593a2e0 Implement CustomValidation UT for MPI plugin (#2555)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-27 12:11:23 +00:00
Yuki IwaiandGitHub 3dd0fb0b82 Retrieve JobSetSpec from runtime.Info in CustomValidations (#2557)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-24 11:05:06 +00:00
Andrey VelichkevichandGitHub eb1ee9d0f4 feat(sdk): Support MPI-based TrainJobs (#2545)
* feat(sdk): Support MPI-based TrainJobs

Signed-off-by: Andrey Velichkevich <[email protected]>

* Refactor list_runtimes

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix example

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add Runtime Trainer object

Signed-off-by: Andrey Velichkevich <[email protected]>

* Update for new Runtime object

Signed-off-by: Andrey Velichkevich <[email protected]>

* Implement get_runtime API

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix Torch example

Signed-off-by: Andrey Velichkevich <[email protected]>

* Remove un-unsed consts

Signed-off-by: Andrey Velichkevich <[email protected]>

* Update func args

Signed-off-by: Andrey Velichkevich <[email protected]>

* Update SDK constants

Signed-off-by: Andrey Velichkevich <[email protected]>

* Change to 16Gi

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix container name for MPI

Signed-off-by: Andrey Velichkevich <[email protected]>

* Keep launcher container for MPI

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
2025-03-20 18:08:02 +00:00
Yuki IwaiandGitHub 50d6be8324 Construct Trainer based on trainer.kubeflow.org/trainjob-ancestor-step label (#2548)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-20 14:01:57 +00:00
Yuki IwaiandGitHub 64404f6565 Store the TrainingRuntime numNodes as runtime.Info.PodSet.Count (#2539)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-18 15:55:44 +00:00
Yuki IwaiandGitHub ed1b434f99 chore: Enable GCI for golangci-lint (#2540)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-18 14:47:21 +00:00
Yuki IwaiandGitHub 38e16d718d Migrate InfoOptions.podSpecReplias and info.Scheduler.TotalRequests to info.TemplateSpec.PodSet (#2524)
Signed-off-by: Yuki Iwai <[email protected]>

# Conflicts:
#	pkg/runtime/core/trainingruntime.go
#	pkg/runtime/runtime.go
2025-03-16 17:09:49 +00:00
a589903c24 KEP-2170: Adding validation webhook for v2 trainjob (#2307)
Signed-off-by: Akshay Chitneni <[email protected]>
Co-authored-by: Akshay Chitneni <[email protected]>
2025-03-16 03:41:51 +00:00
Yuki IwaiandGitHub e8d6727da6 Implemenet MPI Plugin for OpenMPI (#2493)
* Implemenet MPI Plugin for OpenMPI

Signed-off-by: Yuki Iwai <[email protected]>

* Directory pass the JobSetApplyconfiguration to RuntimeInfo

Signed-off-by: Yuki Iwai <[email protected]>

* Make repeated string as constants

Signed-off-by: Yuki Iwai <[email protected]>

* Use numNodes=1 as default mpi_distributed ClusterTrainingRuntime

Signed-off-by: Yuki Iwai <[email protected]>

* Remove unused errors

Signed-off-by: Yuki Iwai <[email protected]>

* Rename runLauncherAsWorker with runLauncherAsNode

Signed-off-by: Yuki Iwai <[email protected]>

* Fix unintended constants usage for ModelMountPath

Signed-off-by: Yuki Iwai <[email protected]>

* Rename SecretDataComparer with MPISecretDataComparer

Signed-off-by: Yuki Iwai <[email protected]>

* Add TODO STAEEMENT to deprecated env wrappers.

Signed-off-by: Yuki Iwai <[email protected]>

---------

Signed-off-by: Yuki Iwai <[email protected]>
2025-03-13 05:00:56 +00:00
Yuki IwaiandGitHub d28ca7a69b Implement MPI plugin UTs (#2481)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-07 01:37:40 +00:00
Yuki IwaiandGitHub 6abdcabe9d Make MPIMLPolicySource optional fields as a pointer (#2472)
Signed-off-by: Yuki Iwai <[email protected]>
2025-03-05 12:13:07 +00:00
Andrey VelichkevichandGitHub 5401e5fec5 Bump JobSet to v0.8.0 (#2463)
Signed-off-by: Andrey Velichkevich <[email protected]>
2025-03-01 02:46:38 +00:00
Antonin StefanuttiandGitHub 4ad02aca05 KEP-2170: Use SSA to reconcile TrainJob components (#2431)
* KEP-2170: Use SSA to reconcile TrainJob components

Signed-off-by: Antonin Stefanutti <[email protected]>

* Enable Unstructured caching in controller manager config

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix PodGroup apply configuration

Signed-off-by: Antonin Stefanutti <[email protected]>

* API to apply config conversion util functions

Signed-off-by: Antonin Stefanutti <[email protected]>

* Only add namespace to TrainingRuntime object key

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix EnvVar upsert

Signed-off-by: Antonin Stefanutti <[email protected]>

* Update unit tests

Signed-off-by: Antonin Stefanutti <[email protected]>

* Fix JobSet resource requirements

Signed-off-by: Antonin Stefanutti <[email protected]>

* Resolve build issues with launcher job

Signed-off-by: Antonin Stefanutti <[email protected]>

* Use apply config for MPI ConfigMap and Secret

Signed-off-by: Antonin Stefanutti <[email protected]>

* ComponentBuilderPlugin now returns an array

Signed-off-by: Antonin Stefanutti <[email protected]>

* Use plain apply configurations instead of unstructured

Signed-off-by: Antonin Stefanutti <[email protected]>

* Use apply config in EnforceMLPolicy plugins

Signed-off-by: Antonin Stefanutti <[email protected]>

* Do not update JobSets that are not suspended

Signed-off-by: Antonin Stefanutti <[email protected]>

* Address review feedback

Signed-off-by: Antonin Stefanutti <[email protected]>

* Do not update PodGroup if TrainJob is not suspended

Signed-off-by: Antonin Stefanutti <[email protected]>

* Remove obsolete TODO

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2025-02-26 08:39:09 +00:00
Antonin StefanuttiandGitHub d954ed3272 KEP-2170: Add validation to Torch numProcPerNode field (#2409)
Signed-off-by: Antonin Stefanutti <[email protected]>
2025-02-14 20:57:37 +00:00
Andrey VelichkevichandGitHub fa214522ce KEP-2170: Implement MPI Plugin for Kubeflow Trainer (#2394)
* Implement MPI Plugin for Kubeflow Trainer

Signed-off-by: Andrey Velichkevich <[email protected]>

* Update RBAC

Signed-off-by: Andrey Velichkevich <[email protected]>

* Remove old manifests

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix unit test

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix comments

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
2025-02-14 17:55:38 +00:00
Andrey VelichkevichandGitHub 1ff1d8ad28 Update the naming conventions for Kubeflow Trainer (#2415)
* Update the naming conventions for Kubeflow Trainer

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix webhooks

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix paths for webhooks

Signed-off-by: Andrey Velichkevich <[email protected]>

* Update go test cmd

Signed-off-by: Andrey Velichkevich <[email protected]>

* Rename kubeflowv1 to trainer pkg

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
2025-02-06 13:48:30 +00:00