* Add a basic Slurm config
[arvados-k8s.git] / charts / arvados / templates / slurm-controller-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: StatefulSet
7 metadata:
8   name: "arvados-slurm-controller"
9   labels:
10     app: arvados-slurm-controller
11     chart: {{ template "arvados.chart" . }}
12     release: {{ .Release.Name }}
13     heritage: {{ .Release.Service }}
14 spec:
15   replicas: 1
16   serviceName: arvados-slurm-controller
17   selector:
18     matchLabels:
19       app: arvados-slurm-controller
20       release: {{ .Release.Name }}
21   template:
22     metadata:
23       labels:
24         app: arvados-slurm-controller
25         release: {{ .Release.Name }}
26     spec:
27       dnsConfig:
28         searches:
29           - "arvados-slurm-compute.default.svc.cluster.local"
30       containers:
31         - name: {{ .Chart.Name }}
32           hostname: arvados-slurm-controller
33           image: "cure/arvados-slurm-runtime"
34           imagePullPolicy: {{ .Values.image.pullPolicy }}
35           command:
36             - "sh"
37             - "-c"
38             - "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 && slurmctld -D"
39           env:
40             - name : ARVADOS_API_HOST
41               value: "{{ .Values.externalIP }}:444"
42             - name : ARVADOS_API_HOST_INSECURE
43               value: "true"
44             - name : ARVADOS_API_TOKEN
45               value: "{{ .Values.superUserSecret }}"
46           volumeMounts:
47             - name: slurm-configmap
48               mountPath: /etc/slurm-llnl/slurm.conf
49               subPath: slurm.conf
50             - name: slurm-configmap
51               mountPath: /etc/munge/munge.key
52               subPath: munge.key
53
54       volumes:
55         - name: slurm-configmap
56           configMap:
57             name: slurm-configmap
58             defaultMode: 0400
59