Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / portal-ng / components / portal-ng-ui / templates / deployment.yaml
1 {{/*
2 # Copyright © 2022 Deutsche Telekom
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 */}}
16 ---
17 apiVersion: apps/v1
18 kind: Deployment
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 spec:
21   selector: {{- include "common.selectors" . | nindent 4 }}
22   replicas: {{ .Values.replicaCount }}
23   revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
24   template:
25     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
26     spec:
27       {{- include "common.imagePullSecrets" . | nindent 6 }}
28       containers:
29         - name: {{ .Chart.Name }}
30           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.imageName }}:{{ .Values.image.tag | default .Chart.AppVersion }}
31           imagePullPolicy: {{ .Values.image.pullPolicy }}
32           envFrom:
33           - configMapRef:
34               name: {{ include "common.fullname" . }}-configmap
35           ports: {{ include "common.containerPorts" . | nindent 12  }}
36           livenessProbe:
37             httpGet:
38               path: /
39               port: {{ .Values.service.internalPort}}
40             initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
41             failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
42           readinessProbe:
43             httpGet:
44               path: /
45               port: {{ .Values.service.internalPort}}
46             initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
47             failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
48           volumeMounts:
49           - name: tiles-icons
50             mountPath: {{ .Values.nginx.tilesIconsPath }}
51             readOnly: true
52           - name: tiles-json
53             mountPath: {{ .Values.nginx.tilesPath }}
54             subPath: tiles.json
55             readOnly: true
56           resources: {{ include "common.resources" . | nindent 12 }}
57         {{- with .Values.nodeSelector }}
58         nodeSelector:
59           {{- toYaml . | nindent 10 }}
60         {{- end }}
61         {{- with .Values.affinity }}
62         affinity:
63           {{- toYaml . | nindent 10 }}
64         {{- end }}
65         {{- with .Values.tolerations }}
66         tolerations:
67           {{- toYaml . | nindent 10 }}
68         {{- end }}
69       volumes:
70         - name: tiles-icons
71           configMap:
72             name: {{ include "common.fullname" . }}-tiles-icons
73         - name: tiles-json
74           configMap:
75             name: {{ include "common.fullname" . }}-tiles-json
76             items:
77             - key: tiles.json
78               path: tiles.json