[AAI] Remove AAF/TLS config from charts
[oom.git] / kubernetes / aai / components / aai-modelloader / templates / deployment.yaml
1 {{/*
2 # Copyright © 2018 Amdocs, AT&T
3 # Modifications Copyright © 2018 Bell Canada
4 # Modifications Copyright © 2020-2021 Orange
5 # Modifications Copyright © 2023 Nordix Foundation
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #       http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 */}}
19
20 apiVersion: apps/v1
21 kind: Deployment
22 metadata:
23   name: {{ include "common.fullname" . }}
24   namespace: {{ include "common.namespace" . }}
25   labels:
26     app: {{ include "common.name" . }}
27     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
28     release: {{ include "common.release" . }}
29     heritage: {{ .Release.Service }}
30 spec:
31   replicas: {{ .Values.replicaCount }}
32   strategy:
33     type: {{ .Values.updateStrategy.type }}
34     {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
35     rollingUpdate:
36       maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
37       maxSurge: {{ .Values.updateStrategy.maxSurge }}
38     {{- end }}
39   selector:
40     matchLabels:
41       app: {{ include "common.name" . }}
42   template:
43     metadata:
44       labels:
45         app: {{ include "common.name" . }}
46         release: {{ include "common.release" . }}
47       name: {{ include "common.name" . }}
48     spec:
49       {{- if .Values.nodeSelector }}
50       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
51       {{- end -}}
52       {{- if .Values.affinity }}
53       affinity: {{ toYaml .Values.affinity | nindent 8 }}
54       {{- end }}
55       containers:
56       - name: {{ include "common.name" . }}
57         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
58         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
59         env:
60         - name: CONFIG_HOME
61           value: /opt/app/model-loader/config/
62         - name: SASL_JAAS_CONFIG
63           valueFrom:
64             secretKeyRef:
65               name: {{ include "common.name" . }}-ku
66               key: sasl.jaas.config
67         volumeMounts:
68         - mountPath: /etc/localtime
69           name: localtime
70           readOnly: true
71         - mountPath: /opt/app/model-loader/config/model-loader.properties
72           subPath: model-loader.properties
73           name: prop-config
74         - mountPath: {{ .Values.log.path }}
75           name: logs
76         - mountPath: /opt/app/model-loader/logback.xml
77           name: log-config
78           subPath: logback.xml
79         resources: {{ include "common.resources" . | nindent 10 }}
80       # side car containers
81         {{ include "common.log.sidecar" . | nindent 6 }}
82       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
83       volumes:
84       - name: localtime
85         hostPath:
86           path: /etc/localtime
87       - name: prop-config
88         configMap:
89           name: {{ include "common.fullname" . }}-prop
90       - name: logs
91         emptyDir: {}
92       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
93       - name: log-config
94         configMap:
95           name: {{ include "common.fullname" . }}-log
96       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
97       imagePullSecrets:
98       - name: "{{ include "common.namespace" . }}-docker-registry-key"