Improve oran_oom helm charts
[it/dep.git] / smo-install / oran_oom / odu-app-ics-version / templates / deployment.yaml
1 #  Copyright (C) 2021 Nordix Foundation. All rights reserved.
2 #  ========================================================================
3 #  Licensed under the Apache License, Version 2.0 (the "License");
4 #  you may not use this file except in compliance with the License.
5 #  You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #  See the License for the specific language governing permissions and
13 #  limitations under the License.
14 #  ============LICENSE_END=================================================
15
16 apiVersion: apps/v1
17 kind: Deployment
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19 spec:
20   replicas: {{ .Values.replicaCount }}
21   selector: {{- include "common.selectors" . | nindent 4 }}
22   template:
23     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
24     spec:
25       {{- with .Values.imagePullSecrets }}
26       imagePullSecrets:
27         {{- toYaml . | nindent 8 }}
28       {{- end }}
29       securityContext:
30         {{- toYaml .Values.podSecurityContext | nindent 8 }}
31       containers:
32         - name: {{ include "common.containername" . }}
33           securityContext:
34             {{- toYaml .Values.securityContext | nindent 12 }}
35           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
36           imagePullPolicy: {{ .Values.image.pullPolicy }}
37           env:
38           - name: CONSUMER_HOST
39             value: "{{ .Values.consumer.host }}"
40           - name: CONSUMER_PORT
41             value: "{{ .Values.consumer.port }}"
42           - name: SDNR_ADDR
43             value: "{{ .Values.sdnr.address }}"
44           - name: SDNR_USER
45             value: "{{ .Values.sdnr.user }}"
46           - name: SDNR_PASSWORD
47             value: "{{ .Values.sdnr.password }}"
48           - name: INFO_COORD_ADDR
49             value: "{{ .Values.informationcoordinator.address }}"
50           - name: NODE_ID
51             value: "{{ .Values.simulator.node }}"
52           ports:
53             - name: http
54               containerPort: 8095
55               protocol: TCP
56           resources:
57             {{- toYaml .Values.resources | nindent 12 }}
58       {{- with .Values.nodeSelector }}
59       nodeSelector:
60         {{- toYaml . | nindent 8 }}
61       {{- end }}
62       {{- with .Values.affinity }}
63       affinity:
64         {{- toYaml . | nindent 8 }}
65       {{- end }}
66       {{- with .Values.tolerations }}
67       tolerations:
68         {{- toYaml . | nindent 8 }}
69       {{- end }}