From 0140805d2ef87a1d3cd2c1fd0c5951300433b337 Mon Sep 17 00:00:00 2001 From: Xinmin Du <10803082+doris-xm@user.noreply.gitee.com> Date: Thu, 9 Jan 2025 22:34:16 +0800 Subject: [PATCH] Add the manifests overlay for Kubeflow Training V2 Signed-off-by: Xinmin Du <10803082+doris-xm@user.noreply.gitee.com> --- .../kubeflow/kubeflow-training-roles.yaml | 91 +++++++++++++++++++ .../v2/overlays/kubeflow/kustomization.yaml | 15 +++ 2 files changed, 106 insertions(+) create mode 100644 manifests/v2/overlays/kubeflow/kubeflow-training-roles.yaml create mode 100644 manifests/v2/overlays/kubeflow/kustomization.yaml diff --git a/manifests/v2/overlays/kubeflow/kubeflow-training-roles.yaml b/manifests/v2/overlays/kubeflow/kubeflow-training-roles.yaml new file mode 100644 index 0000000000..6b38240eb5 --- /dev/null +++ b/manifests/v2/overlays/kubeflow/kubeflow-training-roles.yaml @@ -0,0 +1,91 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeflow-training-admin-v2 + labels: + rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true" +aggregationRule: + clusterRoleSelectors: + - matchLabels: + rbac.authorization.kubeflow.org/aggregate-to-kubeflow-training-admin: "true" +rules: [] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeflow-training-edit-v2 + labels: + rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true" + rbac.authorization.kubeflow.org/aggregate-to-kubeflow-training-admin: "true" +rules: + - apiGroups: + - kubeflow.org + resources: + - trainjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - kubeflow.org + resources: + - clustertrainingruntimes + - trainingruntimes + verbs: + - get + - list + - watch + - apiGroups: + - kubeflow.org + resources: + - trainjobs/status + verbs: + - get + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - get + - list + - watch + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeflow-training-view-v2 + labels: + rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true" +rules: + - apiGroups: + - kubeflow.org + resources: + - clustertrainingruntimes + - trainingruntimes + - trainjobs + verbs: + - get + - list + - watch + - apiGroups: + - kubeflow.org + resources: + - trainjobs/status + verbs: + - get \ No newline at end of file diff --git a/manifests/v2/overlays/kubeflow/kustomization.yaml b/manifests/v2/overlays/kubeflow/kustomization.yaml new file mode 100644 index 0000000000..5994be9475 --- /dev/null +++ b/manifests/v2/overlays/kubeflow/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kubeflow +resources: + - ../../base + - kubeflow-training-roles.yaml + - https://github.com/kubernetes-sigs/jobset/releases/download/v0.6.0/manifests.yaml +images: + - name: kubeflow/training-operator-v2 + newTag: latest +secretGenerator: + - name: training-operator-v2-webhook-cert + namespace: kubeflow-system + options: + disableNameSuffixHash: true \ No newline at end of file