* Add a basic Slurm config
[arvados-k8s.git] / charts / arvados / templates / crunch-dispatch-slurm-deployment.yaml
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 apiVersion: apps/v1
6 kind: Deployment
7 metadata:
8   name: "arvados-crunch-dispatch-slurm"
9   labels:
10     app: arvados-crunch-dispatch-slurm
11     chart: {{ template "arvados.chart" . }}
12     release: {{ .Release.Name }}
13     heritage: {{ .Release.Service }}
14 spec:
15   replicas: 1
16   serviceName: arvados-crunch-dispatch-slurm
17   selector:
18     matchLabels:
19       app: arvados-crunch-dispatch-slurm
20       release: {{ .Release.Name }}
21   template:
22     metadata:
23       labels:
24         app: arvados-crunch-dispatch-slurm
25         release: {{ .Release.Name }}
26     spec:
27       containers:
28         - name: {{ .Chart.Name }}
29           hostname: arvados-crunch-dispatch-slurm
30           image: "cure/arvados-slurm-runtime"
31           imagePullPolicy: {{ .Values.image.pullPolicy }}
32           command:
33             - "sh"
34             - "-c"
35             - "/usr/local/bin/bootstrap.sh crunch-dispatch-slurm={{ .Values.arvados.versions.distribution.crunchDispatchSlurm }} && mkdir /munge && cp -p /etc/munge/munge.key /munge && chown munge:munge /munge/munge.key && mkdir /var/slurm && chmod 700 /var/slurm && sudo -u munge munged --key-file=/munge/munge.key && crunch-dispatch-slurm"
36           env:
37             - name : ARVADOS_API_HOST
38               value: "{{ .Values.externalIP }}:444"
39             - name : ARVADOS_API_HOST_INSECURE
40               value: "true"
41             - name : ARVADOS_API_TOKEN
42               value: "{{ .Values.superUserSecret }}"
43           volumeMounts:
44             - name: slurm-configmap
45               mountPath: /etc/slurm-llnl/slurm.conf
46               subPath: slurm.conf
47             - name: slurm-configmap
48               mountPath: /etc/munge/munge.key
49               subPath: munge.key
50             - name: crunch-dispatch-slurm-configmap
51               mountPath: /etc/arvados/crunch-dispatch-slurm/crunch-dispatch-slurm.yml
52               subPath: crunch-dispatch-slurm.yml
53
54       volumes:
55         - name: slurm-configmap
56           configMap:
57             name: slurm-configmap
58             defaultMode: 0400
59         - name: crunch-dispatch-slurm-configmap
60           configMap:
61             name: crunch-dispatch-slurm-configmap
62