Permalink
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (66 sloc) 1.43 KB
# Deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: dask-scheduler
namespace: dask
spec:
replicas: 1
template:
metadata:
labels:
app: dask-scheduler
spec:
serviceAccountName: dask-autoscaler
automountServiceAccountToken: true
containers:
- image: daskdev/dask:latest
command: ["/bin/bash"]
args: ["/opt/scheduler/run.sh"]
imagePullPolicy: Always
name: dask-scheduler
ports:
- containerPort: 8787
- containerPort: 8786
resources:
requests:
cpu: 100m
memory: 1Gi
volumeMounts:
- name: config-volume
mountPath: /opt/scheduler
volumes:
- name: config-volume
configMap:
name: scheduler
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: dask-autoscaler
namespace: dask
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
namespace: dask
name: dask-autoscaler
rules:
- apiGroups: [""]
resources: ["deployment"]
resourceNames: ["dask-workers"]
verbs: ["update", "get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: dask-autoscaler
namespace: dask
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: dask-autoscaler
subjects:
- kind: ServiceAccount
name: dask-autoscaler
namespace: dask