022350d8bdbe5106ac99a242a2f0a7b5d996e3c4
[it/dep.git] / ric-aux / helm / mrsub / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ include "mrsub.fullname" . }}
5   labels:
6     app.kubernetes.io/name: {{ include "mrsub.name" . }}
7     helm.sh/chart: {{ include "mrsub.chart" . }}
8     app.kubernetes.io/instance: {{ .Release.Name }}
9     app.kubernetes.io/managed-by: {{ .Release.Service }}
10 spec:
11   replicas: {{ .Values.replicaCount }}
12   selector:
13     matchLabels:
14       app.kubernetes.io/name: {{ include "mrsub.name" . }}
15       app.kubernetes.io/instance: {{ .Release.Name }}
16   template:
17     metadata:
18       labels:
19         app.kubernetes.io/name: {{ include "mrsub.name" . }}
20         app.kubernetes.io/instance: {{ .Release.Name }}
21     spec:
22       containers:
23         - name: {{ .Chart.Name }}
24           image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
25           imagePullPolicy: {{ .Values.image.pullPolicy }}
26           command: ["/scripts/mrsub.sh"]
27           #command: ["sleep"]
28           #args: ["3600"]
29           volumeMounts:
30             - mountPath: /scripts
31               name: script
32           envFrom:
33             - configMapRef:
34                 name: {{ include "mrsub.configmapname" . }}-env
35       volumes:
36       - name: script
37         configMap:
38           name: {{ include "mrsub.configmapname" . }}-bin
39           defaultMode: 0744
40
41       {{- with .Values.nodeSelector }}
42       nodeSelector:
43         {{- toYaml . | nindent 8 }}
44       {{- end }}
45     {{- with .Values.affinity }}
46       affinity:
47         {{- toYaml . | nindent 8 }}
48     {{- end }}
49     {{- with .Values.tolerations }}
50       tolerations:
51         {{- toYaml . | nindent 8 }}
52     {{- end }}