1 # Copyright © 2017 Amdocs, Bell Canada
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 apiVersion: apps/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
26 serviceName: {{ include "common.servicename" . }}-cluster
27 replicas: {{ .Values.replicaCount }}
28 podManagementPolicy: Parallel
32 app: {{ include "common.name" . }}
33 release: {{ .Release.Name }}
40 - {{ .Values.config.mariadbGalera.chartName }}
46 fieldPath: metadata.namespace
47 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
48 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 name: {{ include "common.name" . }}-readiness
50 - name: {{ include "common.name" . }}-chown
52 command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} ; chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certpersistence.certPath }}"]
54 - mountPath: {{ .Values.persistence.mdsalPath }}
55 name: {{ include "common.fullname" . }}-mdsal
56 - mountPath: {{ .Values.certpersistence.certPath }}
57 name: {{ include "common.fullname" . }}-certs
59 - name: {{ include "common.name" . }}
60 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
62 command: ["/bin/bash"]
63 args: ["-c", "/opt/sdnc/bin/startODL.sh"]
65 - containerPort: {{ .Values.service.internalPort }}
66 - containerPort: {{ .Values.service.internalPort2 }}
67 - containerPort: {{ .Values.service.internalPort3 }}
68 - containerPort: {{ .Values.service.clusterPort }}
71 port: {{ .Values.service.internalPort }}
72 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
73 periodSeconds: {{ .Values.readiness.periodSeconds }}
75 - name: MYSQL_ROOT_PASSWORD
78 name: {{ template "common.fullname" . }}
80 - name: ODL_ADMIN_PASSWORD
83 name: {{ template "common.fullname" . }}-odl
85 - name: SDNC_DB_PASSWORD
88 name: {{ template "common.fullname" . }}-sdnctl
89 key: db-sdnctl-password
90 - name: SDNC_CONFIG_DIR
91 value: "{{ .Values.config.configDir }}"
92 - name: ENABLE_ODL_CLUSTER
93 value: "{{ .Values.config.enableClustering }}"
94 - name: MY_ODL_CLUSTER
95 value: "{{ .Values.config.myODLCluster }}"
96 - name: PEER_ODL_CLUSTER
97 value: "{{ .Values.config.peerODLCluster }}"
98 - name: IS_PRIMARY_CLUSTER
99 value: "{{ .Values.config.isPrimaryCluster }}"
101 value: "{{ .Values.config.geoEnabled}}"
102 - name: SDNC_REPLICAS
103 value: "{{ .Values.replicaCount }}"
105 value: "{{.Values.config.mariadbGalera.serviceName}}.{{.Release.Namespace}}"
107 value: "{{ .Values.config.javaHome}}"
109 - mountPath: /etc/localtime
112 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
113 name: sdnc-logging-cfg-config
114 subPath: org.ops4j.pax.logging.cfg
115 - mountPath: {{ .Values.config.binDir }}/startODL.sh
118 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
120 subPath: installSdncDb.sh
121 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
123 subPath: aaiclient.properties
124 - mountPath: {{ .Values.config.configDir }}/dblib.properties
126 subPath: dblib.properties
127 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
129 subPath: lcm-dg.properties
130 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
132 subPath: svclogic.properties
133 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
135 subPath: svclogic.properties
136 - mountPath: {{ .Values.config.configDir }}/netbox.properties
138 subPath: netbox.properties
139 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
141 subPath: blueprints-processor-adaptor.properties
142 - mountPath: {{ .Values.persistence.mdsalPath }}
143 name: {{ include "common.fullname" . }}-mdsal
144 - mountPath: /var/log/onap
146 - mountPath: {{ .Values.certpersistence.certPath }}
147 name: {{ include "common.fullname" . }}-certs
149 {{ include "common.resources" . | indent 12 }}
150 {{- if .Values.nodeSelector }}
152 {{ toYaml .Values.nodeSelector | indent 10 }}
154 {{- if .Values.affinity }}
156 {{ toYaml .Values.affinity | indent 10 }}
159 # side car containers
160 - name: filebeat-onap
161 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
162 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
164 - mountPath: /usr/share/filebeat/filebeat.yml
166 subPath: filebeat.yml
167 - mountPath: /var/log/onap
169 - mountPath: /usr/share/filebeat/data
172 - name: "{{ include "common.namespace" . }}-docker-registry-key"
179 - name: data-filebeat
181 - name: filebeat-conf
183 name: {{ include "common.fullname" . }}-filebeat-configmap
184 - name: sdnc-logging-cfg-config
186 name: {{ include "common.fullname" . }}-log-configmap
189 name: {{ include "common.fullname" . }}-bin
193 name: {{ include "common.fullname" . }}-properties
195 - name: {{ include "common.fullname" . }}-certs
196 {{ if .Values.certpersistence.enabled }}
197 persistentVolumeClaim:
198 claimName: {{ include "common.fullname" . }}-pvc-certs
202 {{ if not .Values.persistence.enabled }}
203 - name: {{ include "common.fullname" . }}-mdsal
206 volumeClaimTemplates:
208 name: {{ include "common.fullname" . }}-mdsal
210 name: {{ include "common.fullname" . }}
212 accessModes: [ {{ .Values.persistence.accessMode }} ]
213 storageClassName: {{ include "common.fullname" . }}-mdsal
216 storage: {{ .Values.persistence.size }}
219 name: {{ include "common.fullname" . }}