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

Commit

Permalink
Adding Operator deployment manifests (#119)
Browse files Browse the repository at this point in the history
* Adding kubernetes manifests instead of helm charts

* Adding namespace
  • Loading branch information
johnugeorge authored and k8s-ci-robot committed Jan 3, 2019
1 parent 8510667 commit 306edb5
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 107 deletions.
30 changes: 30 additions & 0 deletions manifests/crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: pytorchjobs.kubeflow.org
spec:
group: kubeflow.org
names:
kind: PyTorchJob
plural: pytorchjobs
singular: pytorchjob
scope: Namespaced
validation:
openAPIV3Schema:
properties:
spec:
properties:
pytorchReplicaSpecs:
properties:
Master:
properties:
replicas:
maximum: 1
minimum: 1
type: integer
Worker:
properties:
replicas:
minimum: 1
type: integer
version: v1beta1
29 changes: 29 additions & 0 deletions manifests/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: pytorch-operator
namespace: kubeflow
spec:
replicas: 1
template:
metadata:
labels:
name: pytorch-operator
spec:
containers:
- command:
- /pytorch-operator.v1beta1
- --alsologtostderr
- -v=1
env:
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
image: gcr.io/kubeflow-images-public/pytorch-operator:v0.4.0
name: pytorch-operator
serviceAccountName: pytorch-operator
4 changes: 4 additions & 0 deletions manifests/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: kubeflow
37 changes: 22 additions & 15 deletions pytorch-operator-chart/templates/rbac.yaml → manifests/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
{{ if .Values.rbac.install }}
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
kind: ClusterRole
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: pytorch-operator
name: pytorch-operator
namespace: kubeflow
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: pytorch-operator
name: pytorch-operator
rules:
- apiGroups:
- kubeflow.org
resources:
- pytorchjobs
verbs:
- "*"
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- "*"
- '*'
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- "*"
- '*'
- apiGroups:
- batch
resources:
- jobs
verbs:
- "*"
- '*'
- apiGroups:
- ""
resources:
Expand All @@ -40,27 +47,27 @@ rules:
- persistentvolumeclaims
- events
verbs:
- "*"
- '*'
- apiGroups:
- apps
- extensions
resources:
- deployments
verbs:
- "*"
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
metadata:
name: pytorch-operator
labels:
app: pytorch-operator
subjects:
- kind: ServiceAccount
name: pytorch-operator
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: pytorch-operator
{{ end }}
subjects:
- kind: ServiceAccount
name: pytorch-operator
namespace: kubeflow
---
6 changes: 0 additions & 6 deletions pytorch-operator-chart/Chart.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions pytorch-operator-chart/templates/crd.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions pytorch-operator-chart/templates/deployment.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions pytorch-operator-chart/templates/service-account.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions pytorch-operator-chart/values.yaml

This file was deleted.

0 comments on commit 306edb5

Please sign in to comment.