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

Commit 306edb5

Browse files
johnugeorgek8s-ci-robot
authored andcommitted
Adding Operator deployment manifests (#119)
* Adding kubernetes manifests instead of helm charts * Adding namespace
1 parent 8510667 commit 306edb5

File tree

9 files changed

+85
-107
lines changed

9 files changed

+85
-107
lines changed

manifests/crd.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: pytorchjobs.kubeflow.org
5+
spec:
6+
group: kubeflow.org
7+
names:
8+
kind: PyTorchJob
9+
plural: pytorchjobs
10+
singular: pytorchjob
11+
scope: Namespaced
12+
validation:
13+
openAPIV3Schema:
14+
properties:
15+
spec:
16+
properties:
17+
pytorchReplicaSpecs:
18+
properties:
19+
Master:
20+
properties:
21+
replicas:
22+
maximum: 1
23+
minimum: 1
24+
type: integer
25+
Worker:
26+
properties:
27+
replicas:
28+
minimum: 1
29+
type: integer
30+
version: v1beta1

manifests/deployment.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: pytorch-operator
5+
namespace: kubeflow
6+
spec:
7+
replicas: 1
8+
template:
9+
metadata:
10+
labels:
11+
name: pytorch-operator
12+
spec:
13+
containers:
14+
- command:
15+
- /pytorch-operator.v1beta1
16+
- --alsologtostderr
17+
- -v=1
18+
env:
19+
- name: MY_POD_NAMESPACE
20+
valueFrom:
21+
fieldRef:
22+
fieldPath: metadata.namespace
23+
- name: MY_POD_NAME
24+
valueFrom:
25+
fieldRef:
26+
fieldPath: metadata.name
27+
image: gcr.io/kubeflow-images-public/pytorch-operator:v0.4.0
28+
name: pytorch-operator
29+
serviceAccountName: pytorch-operator

manifests/namespace.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: kubeflow
Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
1-
{{ if .Values.rbac.install }}
2-
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
3-
kind: ClusterRole
1+
apiVersion: v1
2+
kind: ServiceAccount
43
metadata:
4+
labels:
5+
app: pytorch-operator
56
name: pytorch-operator
7+
namespace: kubeflow
8+
---
9+
apiVersion: rbac.authorization.k8s.io/v1beta1
10+
kind: ClusterRole
11+
metadata:
612
labels:
713
app: pytorch-operator
14+
name: pytorch-operator
815
rules:
916
- apiGroups:
1017
- kubeflow.org
1118
resources:
1219
- pytorchjobs
1320
verbs:
14-
- "*"
21+
- '*'
1522
- apiGroups:
1623
- apiextensions.k8s.io
1724
resources:
1825
- customresourcedefinitions
1926
verbs:
20-
- "*"
27+
- '*'
2128
- apiGroups:
2229
- storage.k8s.io
2330
resources:
2431
- storageclasses
2532
verbs:
26-
- "*"
33+
- '*'
2734
- apiGroups:
2835
- batch
2936
resources:
3037
- jobs
3138
verbs:
32-
- "*"
39+
- '*'
3340
- apiGroups:
3441
- ""
3542
resources:
@@ -40,27 +47,27 @@ rules:
4047
- persistentvolumeclaims
4148
- events
4249
verbs:
43-
- "*"
50+
- '*'
4451
- apiGroups:
4552
- apps
4653
- extensions
4754
resources:
4855
- deployments
4956
verbs:
50-
- "*"
57+
- '*'
5158
---
59+
apiVersion: rbac.authorization.k8s.io/v1beta1
5260
kind: ClusterRoleBinding
53-
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
5461
metadata:
55-
name: pytorch-operator
5662
labels:
5763
app: pytorch-operator
58-
subjects:
59-
- kind: ServiceAccount
6064
name: pytorch-operator
61-
namespace: {{ .Release.Namespace }}
6265
roleRef:
6366
apiGroup: rbac.authorization.k8s.io
6467
kind: ClusterRole
6568
name: pytorch-operator
66-
{{ end }}
69+
subjects:
70+
- kind: ServiceAccount
71+
name: pytorch-operator
72+
namespace: kubeflow
73+
---

pytorch-operator-chart/Chart.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

pytorch-operator-chart/templates/crd.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

pytorch-operator-chart/templates/deployment.yaml

Lines changed: 0 additions & 46 deletions
This file was deleted.

pytorch-operator-chart/templates/service-account.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

pytorch-operator-chart/values.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)