Skip to content

Commit

Permalink
KEP-2170: Deploy JobSet in kubeflow-system namespace (#2388)
Browse files Browse the repository at this point in the history
* KEP-2170: Deploy JobSet in kubeflow-system namespace

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

* Remove namespace from base

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

* Remove label from namespace

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

* Create third-party dir for JobSet

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

* Bump JobSet to v0.7.3

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

* Drop namespace from JobSet config

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

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
  • Loading branch information
andreyvelich authored Jan 27, 2025
1 parent 6eeb1fb commit ee1b691
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 30 deletions.
2 changes: 0 additions & 2 deletions manifests/v2/base/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
resources:
- manager.yaml
# TODO (andreyvelich): Move it to overlays once we copy the JobSet manifests.
namespace: kubeflow-system
2 changes: 0 additions & 2 deletions manifests/v2/base/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ resources:
- role.yaml
- role_binding.yaml
- service_account.yaml
# TODO (andreyvelich): Move it to overlays once we copy the JobSet manifests.
namespace: kubeflow-system
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- torch-distributed.yaml
- torch_distributed.yaml
2 changes: 0 additions & 2 deletions manifests/v2/base/webhook/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ patches:
kind: ValidatingWebhookConfiguration
configurations:
- kustomizeconfig.yaml
# TODO (andreyvelich): Move it to overlays once we copy the JobSet manifests.
namespace: kubeflow-system
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# Namespace where all resources are deployed.
namespace: kubeflow-system

resources:
- namespace.yaml
- ../../base/crds
- ../../base/manager
- ../../base/rbac
- ../../base/webhook
# TODO (andreyvelich): JobSet should support kubeflow-system namespace.
- https://github.com/kubernetes-sigs/jobset/releases/download/v0.6.0/manifests.yaml
- ../../third-party/jobset # Comment this line if JobSet is installed on the Kubernetes cluster.

# Update the Kubeflow Training manager image tag.
images:
- name: kubeflow/training-operator-v2
newTag: latest

# Secret for the Kubeflow Training webhook.
secretGenerator:
- name: training-operator-v2-webhook-cert
namespace: kubeflow-system
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base/runtimes/pre-training
- ../../base/runtimes/pretraining
19 changes: 0 additions & 19 deletions manifests/v2/overlays/standalone/kustomization.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions manifests/v2/third-party/jobset/jobset_manager_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apiVersion: config.jobset.x-k8s.io/v1alpha1
kind: Configuration
18 changes: 18 additions & 0 deletions manifests/v2/third-party/jobset/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- https://github.com/kubernetes-sigs/jobset/releases/download/v0.7.3/manifests.yaml

# Config for the JobSet manager.
configMapGenerator:
- name: jobset-manager-config
files:
- jobset_manager_config.yaml
options:
disableNameSuffixHash: true

# Add required patches.
patchesStrategicMerge:
- patches/jobset_remove_namespace.yaml # Remove namespace from the JobSet release manifests.
- patches/jobset_config_patch.yaml # Add custom manager config to the JobSet.
21 changes: 21 additions & 0 deletions manifests/v2/third-party/jobset/patches/jobset_config_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jobset-controller-manager
namespace: jobset-system
spec:
template:
spec:
containers:
- name: manager
args:
- "--config=/jobset_manager_config.yaml"
volumeMounts:
- name: jobset-manager-config
mountPath: /jobset_manager_config.yaml
subPath: jobset_manager_config.yaml
readOnly: true
volumes:
- name: jobset-manager-config
configMap:
name: jobset-manager-config
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
$patch: delete
apiVersion: v1
kind: Namespace
metadata:
name: kubeflow-system
name: jobset-system

0 comments on commit ee1b691

Please sign in to comment.