[PORTAL-NG] Publish ui and bff charts in OOM
[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       imagePullSecrets:
28       - name: "{{ include "common.namespace" . }}-docker-registry-key"
29       containers:
30         - name: {{ .Chart.Name }}
31           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.imageName }}:{{ .Values.image.tag | default .Chart.AppVersion }}
32           imagePullPolicy: {{ .Values.image.pullPolicy }}
33           envFrom:
34           - configMapRef:
35               name: {{ include "common.fullname" . }}-configmap
36           ports: {{ include "common.containerPorts" . | nindent 12  }}
37           livenessProbe:
38             httpGet:
39               path: /
40               port: http
41             initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
42             failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
43           readinessProbe:
44             httpGet:
45               path: /
46               port: http
47             initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
48             failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
49           volumeMounts:
50           - name: tiles-icons
51             mountPath: {{ .Values.nginx.tilesIconsPath }}
52             readOnly: true
53           - name: tiles-json
54             mountPath: {{ .Values.nginx.tilesPath }}
55             subPath: tiles.json
56             readOnly: true
57           resources: {{ include "common.resources" . | nindent 12 }}
58         {{- with .Values.nodeSelector }}
59         nodeSelector:
60           {{- toYaml . | nindent 10 }}
61         {{- end }}
62         {{- with .Values.affinity }}
63         affinity:
64           {{- toYaml . | nindent 10 }}
65         {{- end }}
66         {{- with .Values.tolerations }}
67         tolerations:
68           {{- toYaml . | nindent 10 }}
69         {{- end }}
70       volumes:
71         - name: tiles-icons
72           configMap:
73             name: {{ include "common.fullname" . }}-tiles-icons
74         - name: tiles-json
75           configMap:
76             name: {{ include "common.fullname" . }}-tiles-json
77             items:
78             - key: tiles.json
79               path: tiles.json