* Upgrade base image to ruby 2.7
[arvados-k8s.git] / charts / arvados / templates / api-server-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-api-server"
9   labels:
10     app: arvados-api-server
11     chart: {{ template "arvados.chart" . }}
12     release: {{ .Release.Name }}
13     heritage: {{ .Release.Service }}
14 spec:
15   selector:
16     matchLabels:
17       app: arvados-api-server
18       release: {{ .Release.Name }}
19   template:
20     metadata:
21       labels:
22         app: arvados-api-server
23         release: {{ .Release.Name }}
24     spec:
25       containers:
26         - name: arvados-api-server
27           image: "cure/arvados-rails-runtime"
28           imagePullPolicy: {{ .Values.image.pullPolicy }}
29           command:
30             - "sh"
31             - "-c"
32             - "install /init-scripts/*.sh /etc/my_init.d && /usr/local/bin/bootstrap.sh arvados-api-server={{ .Values.arvados.versions.distribution.arvadosApiServer }} arvados-server={{ .Values.arvados.versions.distribution.arvadosApiServer }} && cd /var/www/arvados-api/current && exec /sbin/my_init"
33           env:
34             - name: RAILS_ENV
35               value: "production"
36           volumeMounts:
37             - name: api-server-configmap
38               mountPath: /init-scripts/90-init-db.sh
39               subPath: 90-init-db.sh
40             - name: etc-configmap
41               mountPath: /etc/arvados/config.yml
42               subPath: config.yml
43             - name: api-server-configmap
44               mountPath: /create-workbench-api-client.rb
45               subPath: create-workbench-api-client.rb
46             - name: api-server-configmap
47               mountPath: /etc/nginx/sites-enabled/api-server.conf
48               subPath: nginx.conf
49             {{- if .Values.customCABundle }}
50             - name: custom-ca-bundle-volume
51               mountPath: /etc/ssl/certs/ca-certificates.crt
52               subPath: custom-ca-bundle.pem
53             {{- end }}
54         - name: arvados-controller
55           image: "cure/arvados-runtime"
56           imagePullPolicy: {{ .Values.image.pullPolicy }}
57           command:
58             - "sh"
59             - "-c"
60             - "/usr/local/bin/bootstrap.sh arvados-controller={{ .Values.arvados.versions.distribution.arvadosController }} && arvados-controller"
61           volumeMounts:
62             - name: etc-configmap
63               mountPath: /etc/arvados/config.yml
64               subPath: config.yml
65         - name: nginx
66           image: "nginx:1.17"
67           imagePullPolicy: {{ .Values.image.pullPolicy }}
68           volumeMounts:
69             - name: nginx-configmap
70               mountPath: /etc/nginx/conf.d/default.conf
71               subPath: nginx.conf
72             - name: ssl-configmap
73               mountPath: /etc/nginx/ssl.crt
74               subPath: cert
75             - name: ssl-configmap
76               mountPath: /etc/nginx/ssl.key
77               subPath: key
78       volumes:
79         - name: api-server-configmap
80           configMap:
81             name: arvados-api-server-configmap
82         - name: etc-configmap
83           configMap:
84             name: etc-configmap
85         - name: ssl-configmap
86           configMap:
87             name: ssl-configmap
88         - name: nginx-configmap
89           configMap:
90             name: arvados-api-server-https-configmap
91         {{- if .Values.customCABundle }}
92         - name: custom-ca-bundle-volume
93           configMap:
94             name: custom-ca-bundle-configmap
95         {{- end }}