Merge "[AAI] Make aai log level configurable"
[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           - name: nginx-config
57             mountPath: /etc/nginx/conf.d/default.conf
58             subPath: default.conf
59             readOnly: true
60           - name: env-js
61             mountPath: /usr/share/nginx/html/assets/env.js
62             subPath: env.js
63             readOnly: true
64           - name: version-json
65             mountPath: /usr/share/nginx/html/assets/version.json
66             subPath: version.json
67             readOnly: true
68           - name: tmp-volume
69             mountPath: /tmp
70           - name: nginx-cache-volume
71             mountPath: /var/cache/nginx
72           resources: {{ include "common.resources" . | nindent 12 }}
73         {{- with .Values.nodeSelector }}
74         nodeSelector:
75           {{- toYaml . | nindent 10 }}
76         {{- end }}
77         {{- with .Values.affinity }}
78         affinity:
79           {{- toYaml . | nindent 10 }}
80         {{- end }}
81         {{- with .Values.tolerations }}
82         tolerations:
83           {{- toYaml . | nindent 10 }}
84         {{- end }}
85       volumes:
86         - name: tiles-icons
87           configMap:
88             name: {{ include "common.fullname" . }}-tiles-icons
89         - name: tiles-json
90           configMap:
91             name: {{ include "common.fullname" . }}-tiles-json
92             items:
93             - key: tiles.json
94               path: tiles.json
95         - name: nginx-config
96           configMap:
97             name: {{ include "common.fullname" . }}-nginx-config
98         - name: env-js
99           configMap:
100             name: {{ include "common.fullname" . }}-env-js
101         - name: version-json
102           configMap:
103             name: {{ include "common.fullname" . }}-version-json
104         - name: tmp-volume
105           emptyDir:
106             sizeLimit: 64Mi
107         - name: nginx-cache-volume
108           emptyDir:
109             sizeLimit: 64Mi