Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 476308f

Browse files
authored
PyTorch Operator: Move manifests development upstream (#320)
As part of the work of wg-manifests for 1.3 (kubeflow/manifests#1735), we are moving manifests development in upstream repos. This gives the application developers full ownership of their manifests, tracked in a single place. This commit copies the manifests for application `PyTorch Operator` from path `apps/pytorch-job/upstream` of kubeflow/manifests to path `manifests` of the upstream repo (https://github.com/kubeflow/pytorch-operator). Signed-off-by: Yannis Zarkadas <[email protected]>
1 parent 6293efc commit 476308f

File tree

13 files changed

+329
-0
lines changed

13 files changed

+329
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: pytorchjobs.kubeflow.org
5+
spec:
6+
additionalPrinterColumns:
7+
- JSONPath: .status.conditions[-1:].type
8+
name: State
9+
type: string
10+
- JSONPath: .metadata.creationTimestamp
11+
name: Age
12+
type: date
13+
group: kubeflow.org
14+
names:
15+
kind: PyTorchJob
16+
plural: pytorchjobs
17+
singular: pytorchjob
18+
scope: Namespaced
19+
subresources:
20+
status: {}
21+
validation:
22+
openAPIV3Schema:
23+
properties:
24+
spec:
25+
properties:
26+
pytorchReplicaSpecs:
27+
properties:
28+
Master:
29+
properties:
30+
replicas:
31+
maximum: 1
32+
minimum: 1
33+
type: integer
34+
Worker:
35+
properties:
36+
replicas:
37+
minimum: 1
38+
type: integer
39+
versions:
40+
- name: v1
41+
served: true
42+
storage: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- crd.yaml
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: app.k8s.io/v1beta1
2+
kind: Application
3+
metadata:
4+
name: pytorch-job-crds
5+
spec:
6+
selector:
7+
matchLabels:
8+
app.kubernetes.io/name: pytorch-job-crds
9+
app.kubernetes.io/instance: pytorch-job-crds-v0.7.0
10+
app.kubernetes.io/version: v0.7.0
11+
app.kubernetes.io/component: pytorch
12+
app.kubernetes.io/part-of: kubeflow
13+
app.kubernetes.io/managed-by: kfctl
14+
componentKinds:
15+
- group: core
16+
kind: Service
17+
- group: apps
18+
kind: Deployment
19+
- group: core
20+
kind: ServiceAccount
21+
- group: kubeflow.org
22+
kind: PyTorchJob
23+
descriptor:
24+
type: "pytorch-job-crds"
25+
version: "v1"
26+
description: "Pytorch-job-crds contains the \"PyTorchJob\" custom resource definition."
27+
maintainers:
28+
- name: Johnu George
29+
30+
owners:
31+
- name: Johnu George
32+
33+
keywords:
34+
- "pytorchjob"
35+
- "pytorch-operator"
36+
- "pytorch-training"
37+
links:
38+
- description: About
39+
url: "https://github.com/kubeflow/pytorch-operator"
40+
- description: Docs
41+
url: "https://www.kubeflow.org/docs/reference/pytorchjob/v1/pytorch/"
42+
addOwnerRef: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
bases:
3+
- ../../base
4+
commonLabels:
5+
app.kubernetes.io/component: pytorch
6+
app.kubernetes.io/name: pytorch-job-crds
7+
kind: Kustomization
8+
resources:
9+
- application.yaml
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1beta1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
labels:
5+
app: pytorch-operator
6+
name: pytorch-operator
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: pytorch-operator
11+
subjects:
12+
- kind: ServiceAccount
13+
name: pytorch-operator
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
apiVersion: rbac.authorization.k8s.io/v1beta1
2+
kind: ClusterRole
3+
metadata:
4+
labels:
5+
app: pytorch-operator
6+
name: pytorch-operator
7+
rules:
8+
- apiGroups:
9+
- kubeflow.org
10+
resources:
11+
- pytorchjobs
12+
- pytorchjobs/status
13+
- pytorchjobs/finalizers
14+
verbs:
15+
- '*'
16+
- apiGroups:
17+
- apiextensions.k8s.io
18+
resources:
19+
- customresourcedefinitions
20+
verbs:
21+
- '*'
22+
- apiGroups:
23+
- ""
24+
resources:
25+
- pods
26+
- services
27+
- endpoints
28+
- events
29+
verbs:
30+
- '*'
31+
---
32+
33+
apiVersion: rbac.authorization.k8s.io/v1
34+
kind: ClusterRole
35+
metadata:
36+
name: kubeflow-pytorchjobs-admin
37+
labels:
38+
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
39+
aggregationRule:
40+
clusterRoleSelectors:
41+
- matchLabels:
42+
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-pytorchjobs-admin: "true"
43+
rules: []
44+
45+
---
46+
47+
apiVersion: rbac.authorization.k8s.io/v1
48+
kind: ClusterRole
49+
metadata:
50+
name: kubeflow-pytorchjobs-edit
51+
labels:
52+
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
53+
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-pytorchjobs-admin: "true"
54+
rules:
55+
- apiGroups:
56+
- kubeflow.org
57+
resources:
58+
- pytorchjobs
59+
- pytorchjobs/status
60+
- pytorchjobs/finalizers
61+
verbs:
62+
- get
63+
- list
64+
- watch
65+
- create
66+
- delete
67+
- deletecollection
68+
- patch
69+
- update
70+
71+
---
72+
73+
apiVersion: rbac.authorization.k8s.io/v1
74+
kind: ClusterRole
75+
metadata:
76+
name: kubeflow-pytorchjobs-view
77+
labels:
78+
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
79+
rules:
80+
- apiGroups:
81+
- kubeflow.org
82+
resources:
83+
- pytorchjobs
84+
- pytorchjobs/status
85+
- pytorchjobs/finalizers
86+
verbs:
87+
- get
88+
- list
89+
- watch
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: pytorch-operator
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
name: pytorch-operator
10+
template:
11+
metadata:
12+
labels:
13+
name: pytorch-operator
14+
annotations:
15+
sidecar.istio.io/inject: "false"
16+
spec:
17+
containers:
18+
- command:
19+
- /pytorch-operator.v1
20+
- --alsologtostderr
21+
- -v=1
22+
- --monitoring-port=8443
23+
env:
24+
- name: MY_POD_NAMESPACE
25+
valueFrom:
26+
fieldRef:
27+
fieldPath: metadata.namespace
28+
- name: MY_POD_NAME
29+
valueFrom:
30+
fieldRef:
31+
fieldPath: metadata.name
32+
image: gcr.io/kubeflow-images-public/pytorch-operator:v0.6.0-18-g5e36a57
33+
name: pytorch-operator
34+
serviceAccountName: pytorch-operator
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: kubeflow
4+
resources:
5+
- cluster-role-binding.yaml
6+
- cluster-role.yaml
7+
- deployment.yaml
8+
- service-account.yaml
9+
- service.yaml
10+
commonLabels:
11+
kustomize.component: pytorch-operator
12+
images:
13+
- name: gcr.io/kubeflow-images-public/pytorch-operator
14+
newName: gcr.io/kubeflow-images-public/pytorch-operator
15+
newTag: vmaster-g518f9c76
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pytorchDefaultImage=null
2+
deploymentScope=cluster
3+
deploymentNamespace=null
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
labels:
5+
app: pytorch-operator
6+
name: pytorch-operator

0 commit comments

Comments
 (0)