This repository has been archived by the owner on Sep 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
PyTorch Operator: Move manifests development upstream #320
Merged
k8s-ci-robot
merged 1 commit into
kubeflow:master
from
arrikto:feature-move-pytorch-operator-manifests-upstream
Feb 25, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: pytorchjobs.kubeflow.org | ||
spec: | ||
additionalPrinterColumns: | ||
- JSONPath: .status.conditions[-1:].type | ||
name: State | ||
type: string | ||
- JSONPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
group: kubeflow.org | ||
names: | ||
kind: PyTorchJob | ||
plural: pytorchjobs | ||
singular: pytorchjob | ||
scope: Namespaced | ||
subresources: | ||
status: {} | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
pytorchReplicaSpecs: | ||
properties: | ||
Master: | ||
properties: | ||
replicas: | ||
maximum: 1 | ||
minimum: 1 | ||
type: integer | ||
Worker: | ||
properties: | ||
replicas: | ||
minimum: 1 | ||
type: integer | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- crd.yaml |
42 changes: 42 additions & 0 deletions
42
manifests/pytorch-job-crds/overlays/application/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: pytorch-job-crds | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: pytorch-job-crds | ||
app.kubernetes.io/instance: pytorch-job-crds-v0.7.0 | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/component: pytorch | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/managed-by: kfctl | ||
componentKinds: | ||
- group: core | ||
kind: Service | ||
- group: apps | ||
kind: Deployment | ||
- group: core | ||
kind: ServiceAccount | ||
- group: kubeflow.org | ||
kind: PyTorchJob | ||
descriptor: | ||
type: "pytorch-job-crds" | ||
version: "v1" | ||
description: "Pytorch-job-crds contains the \"PyTorchJob\" custom resource definition." | ||
maintainers: | ||
- name: Johnu George | ||
email: [email protected] | ||
owners: | ||
- name: Johnu George | ||
email: [email protected] | ||
keywords: | ||
- "pytorchjob" | ||
- "pytorch-operator" | ||
- "pytorch-training" | ||
links: | ||
- description: About | ||
url: "https://github.com/kubeflow/pytorch-operator" | ||
- description: Docs | ||
url: "https://www.kubeflow.org/docs/reference/pytorchjob/v1/pytorch/" | ||
addOwnerRef: true |
9 changes: 9 additions & 0 deletions
9
manifests/pytorch-job-crds/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
bases: | ||
- ../../base | ||
commonLabels: | ||
app.kubernetes.io/component: pytorch | ||
app.kubernetes.io/name: pytorch-job-crds | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app: pytorch-operator | ||
name: pytorch-operator | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: pytorch-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: pytorch-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app: pytorch-operator | ||
name: pytorch-operator | ||
rules: | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- pytorchjobs | ||
- pytorchjobs/status | ||
- pytorchjobs/finalizers | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- apiextensions.k8s.io | ||
resources: | ||
- customresourcedefinitions | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
- services | ||
- endpoints | ||
- events | ||
verbs: | ||
- '*' | ||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kubeflow-pytorchjobs-admin | ||
labels: | ||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true" | ||
aggregationRule: | ||
clusterRoleSelectors: | ||
- matchLabels: | ||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-pytorchjobs-admin: "true" | ||
rules: [] | ||
|
||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kubeflow-pytorchjobs-edit | ||
labels: | ||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true" | ||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-pytorchjobs-admin: "true" | ||
rules: | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- pytorchjobs | ||
- pytorchjobs/status | ||
- pytorchjobs/finalizers | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- delete | ||
- deletecollection | ||
- patch | ||
- update | ||
|
||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kubeflow-pytorchjobs-view | ||
labels: | ||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true" | ||
rules: | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- pytorchjobs | ||
- pytorchjobs/status | ||
- pytorchjobs/finalizers | ||
verbs: | ||
- get | ||
- list | ||
- watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: pytorch-operator | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: pytorch-operator | ||
template: | ||
metadata: | ||
labels: | ||
name: pytorch-operator | ||
annotations: | ||
sidecar.istio.io/inject: "false" | ||
spec: | ||
containers: | ||
- command: | ||
- /pytorch-operator.v1 | ||
- --alsologtostderr | ||
- -v=1 | ||
- --monitoring-port=8443 | ||
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.6.0-18-g5e36a57 | ||
name: pytorch-operator | ||
serviceAccountName: pytorch-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: kubeflow | ||
resources: | ||
- cluster-role-binding.yaml | ||
- cluster-role.yaml | ||
- deployment.yaml | ||
- service-account.yaml | ||
- service.yaml | ||
commonLabels: | ||
kustomize.component: pytorch-operator | ||
images: | ||
- name: gcr.io/kubeflow-images-public/pytorch-operator | ||
newName: gcr.io/kubeflow-images-public/pytorch-operator | ||
newTag: vmaster-g518f9c76 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pytorchDefaultImage=null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove this file |
||
deploymentScope=cluster | ||
deploymentNamespace=null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: pytorch-operator | ||
name: pytorch-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
prometheus.io/path: /metrics | ||
prometheus.io/port: "8443" | ||
prometheus.io/scrape: "true" | ||
labels: | ||
app: pytorch-operator | ||
name: pytorch-operator | ||
spec: | ||
ports: | ||
- name: monitoring-port | ||
port: 8443 | ||
targetPort: 8443 | ||
selector: | ||
name: pytorch-operator | ||
type: ClusterIP | ||
|
44 changes: 44 additions & 0 deletions
44
manifests/pytorch-operator/overlays/application/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: pytorch-operator | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: pytorch-operator | ||
app.kubernetes.io/instance: pytorch-operator-v0.7.0 | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/component: pytorch | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/managed-by: kfctl | ||
componentKinds: | ||
- group: core | ||
kind: Service | ||
- group: apps | ||
kind: Deployment | ||
- group: core | ||
kind: ConfigMap | ||
- group: core | ||
kind: ServiceAccount | ||
- group: kubeflow.org | ||
kind: PyTorchJob | ||
descriptor: | ||
type: "pytorch-operator" | ||
version: "v1" | ||
description: "Pytorch-operator allows users to create and manage the \"PyTorchJob\" custom resource." | ||
maintainers: | ||
- name: Johnu George | ||
email: [email protected] | ||
owners: | ||
- name: Johnu George | ||
email: [email protected] | ||
keywords: | ||
- "pytorchjob" | ||
- "pytorch-operator" | ||
- "pytorch-training" | ||
links: | ||
- description: About | ||
url: "https://github.com/kubeflow/pytorch-operator" | ||
- description: Docs | ||
url: "https://www.kubeflow.org/docs/reference/pytorchjob/v1/pytorch/" | ||
addOwnerRef: true |
9 changes: 9 additions & 0 deletions
9
manifests/pytorch-operator/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
bases: | ||
- ../../base | ||
commonLabels: | ||
app.kubernetes.io/component: pytorch | ||
app.kubernetes.io/name: pytorch-operator | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we disable istio for the PyTorchJob controller ?