f431a3989bc6f382196677c08c705233286e4c12
[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:
19   name: {{ include "odu-app-ics-version.fullname" . }}
20   labels:
21     {{- include "odu-app-ics-version.labels" . | nindent 4 }}
22 spec:
23   replicas: {{ .Values.replicaCount }}
24   selector:
25     matchLabels:
26       {{- include "odu-app-ics-version.selectorLabels" . | nindent 6 }}
27   template:
28     metadata:
29       {{- with .Values.podAnnotations }}
30       annotations:
31         {{- toYaml . | nindent 8 }}
32       {{- end }}
33       labels:
34         {{- include "odu-app-ics-version.selectorLabels" . | nindent 8 }}
35     spec:
36       {{- with .Values.imagePullSecrets }}
37       imagePullSecrets:
38         {{- toYaml . | nindent 8 }}
39       {{- end }}
40       securityContext:
41         {{- toYaml .Values.podSecurityContext | nindent 8 }}
42       containers:
43         - name: {{ .Chart.Name }}
44           securityContext:
45             {{- toYaml .Values.securityContext | nindent 12 }}
46           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
47           imagePullPolicy: {{ .Values.image.pullPolicy }}
48           env:
49           - name: CONSUMER_HOST
50             value: "{{ .Values.consumer.host }}"
51           - name: CONSUMER_PORT
52             value: "{{ .Values.consumer.port }}"
53           - name: SDNR_ADDR
54             value: "{{ .Values.sdnr.address }}"
55           - name: SDNR_USER
56             value: "{{ .Values.sdnr.user }}"
57           - name: SDNR_PASSWORD
58             value: "{{ .Values.sdnr.password }}"
59           - name: INFO_COORD_ADDR
60             value: "{{ .Values.informationcoordinator.address }}"
61           - name: NODE_ID
62             value: "{{ .Values.simulator.node }}"
63           ports:
64             - name: http
65               containerPort: 8095
66               protocol: TCP
67           resources:
68             {{- toYaml .Values.resources | nindent 12 }}
69       {{- with .Values.nodeSelector }}
70       nodeSelector:
71         {{- toYaml . | nindent 8 }}
72       {{- end }}
73       {{- with .Values.affinity }}
74       affinity:
75         {{- toYaml . | nindent 8 }}
76       {{- end }}
77       {{- with .Values.tolerations }}
78       tolerations:
79         {{- toYaml . | nindent 8 }}
80       {{- end }}