Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Kubebench: Move manifests development upstream (#217)
Browse files Browse the repository at this point in the history
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 `Kubebench`
from path `apps/kubebench/upstream` of kubeflow/manifests to path
`manifests` of the upstream repo (https://github.com/kubeflow/kubebench).

Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
  • Loading branch information
yanniszark authored Mar 23, 2021
1 parent f1213a2 commit 20063d7
Show file tree
Hide file tree
Showing 14 changed files with 220 additions and 0 deletions.
11 changes: 11 additions & 0 deletions manifests/base/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubebench-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubebench-operator
subjects:
- kind: ServiceAccount
name: kubebench-operator
38 changes: 38 additions & 0 deletions manifests/base/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: kubebench-operator
rules:
- apiGroups:
- kubeflow.org
resources:
- kubebenchjobs
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- pods
- pods/exec
- services
- endpoints
- persistentvolumeclaims
- events
- secrets
verbs:
- '*'
- apiGroups:
- kubeflow.org
resources:
- tfjobs
- pytorchjobs
- mpijobs
verbs:
- '*'
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- '*'
17 changes: 17 additions & 0 deletions manifests/base/config-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kubebench-config
data:
kubebenchconfig.yaml: |
defaultWorkflowAgent:
container:
name: kubebench-workflow-agent
image: gcr.io/kubeflow-images-public/kubebench/workflow-agent:bc682c1
defaultManagedVolumes:
experimentVolume:
name: kubebench-experiment-volume
emptyDir: {}
workflowVolume:
name: kubebench-workflow-volume
emptyDir: {}
11 changes: 11 additions & 0 deletions manifests/base/crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: kubebenchjobs.kubeflow.org
spec:
group: kubeflow.org
names:
kind: KubebenchJob
plural: kubebenchjobs
scope: Namespaced
version: v1alpha2
30 changes: 30 additions & 0 deletions manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kubebench-operator
spec:
selector:
matchLabels:
app: kubebench-operator
template:
metadata:
labels:
app: kubebench-operator
annotations:
sidecar.istio.io/inject: "false"
spec:
volumes:
- name: kubebench-config
configMap:
name: kubebench-config
containers:
- image: gcr.io/kubeflow-images-public/kubebench/kubebench-operator-v1alpha2
name: kubebench-operator
command:
- /app/kubebench-operator-v1alpha2
args:
- --config=/config/kubebenchconfig.yaml
volumeMounts:
- mountPath: /config
name: kubebench-config
serviceAccountName: kubebench-operator
31 changes: 31 additions & 0 deletions manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service-account.yaml
- cluster-role-binding.yaml
- cluster-role.yaml
- crd.yaml
- config-map.yaml
- deployment.yaml
namespace: kubeflow
commonLabels:
kustomize.component: kubebench
configMapGenerator:
- name: parameters
envs:
- params.env
images:
# NOTE: the image for workflow agent should be configured in config-map.yaml
- name: gcr.io/kubeflow-images-public/kubebench/kubebench-operator-v1alpha2
newName: gcr.io/kubeflow-images-public/kubebench/kubebench-operator-v1alpha2
newTag: bc682c1
vars:
- name: clusterDomain
objref:
kind: ConfigMap
name: parameters
apiVersion: v1
fieldref:
fieldpath: data.clusterDomain
configurations:
- params.yaml
2 changes: 2 additions & 0 deletions manifests/base/params.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
namespace=
clusterDomain=cluster.local
3 changes: 3 additions & 0 deletions manifests/base/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
varReference:
- path: metadata/annotations/getambassador.io\/config
kind: Service
6 changes: 6 additions & 0 deletions manifests/base/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: kubebench-operator
name: kubebench-operator
31 changes: 31 additions & 0 deletions manifests/overlays/application/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
name: kubebench
spec:
selector:
matchLabels:
app.kubernetes.io/name: kubebench
app.kubernetes.io/instance: kubebench-v0.7.0
app.kubernetes.io/managed-by: kfctl
app.kubernetes.io/component: kubebench
app.kubernetes.io/part-of: kubeflow
app.kubernetes.io/version: v0.7.0
componentKinds:
- group: core
kind: ConfigMap
- group: apps
kind: Deployment
descriptor:
type: kubebench
version: v1beta1
description: "Makes it easy to run benchmark jobs on Kubeflow with various system and model settings"
maintainers: []
owners: []
keywords:
- kubebench
- kubeflow
links:
- description: About
url: https://github.com/kubeflow/kubebench
addOwnerRef: true
9 changes: 9 additions & 0 deletions manifests/overlays/application/kustomization.yaml
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: kubebench
app.kubernetes.io/name: kubebench
kind: Kustomization
resources:
- application.yaml
8 changes: 8 additions & 0 deletions manifests/overlays/istio/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
resources:
- virtual-service.yaml
configurations:
- params.yaml
3 changes: 3 additions & 0 deletions manifests/overlays/istio/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
varReference:
- path: spec/http/route/destination/host
kind: VirtualService
20 changes: 20 additions & 0 deletions manifests/overlays/istio/virtual-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: kubebench-dashboard
spec:
gateways:
- kubeflow-gateway
hosts:
- '*'
http:
- match:
- uri:
prefix: /dashboard/
rewrite:
uri: /dashboard/
route:
- destination:
host: kubebench-dashboard.$(namespace).svc.$(clusterDomain)
port:
number: 80

0 comments on commit 20063d7

Please sign in to comment.