Mukul | 2b4e753 | 2018-08-03 10:41:29 +0000 | [diff] [blame] | 1 | # Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. 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 | |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 15 | apiVersion: apps/v1beta1 |
| 16 | kind: StatefulSet |
| 17 | metadata: |
| 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 23 | release: {{ include "common.release" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | serviceName: "{{ .Values.service.name }}-cluster" |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | podManagementPolicy: Parallel |
| 29 | template: |
| 30 | metadata: |
| 31 | labels: |
| 32 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 33 | release: {{ include "common.release" . }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 34 | spec: |
| 35 | initContainers: |
Taka Cho | 31eb245 | 2019-06-24 21:10:50 -0400 | [diff] [blame] | 36 | - name: {{ include "common.name" . }}-readiness |
| 37 | command: |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 38 | - /root/ready.py |
| 39 | args: |
| 40 | - --container-name |
pramod | 47b1b82 | 2018-08-28 15:41:45 +0000 | [diff] [blame] | 41 | - {{.Values.config.mariadbGaleraContName}} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 42 | env: |
| 43 | - name: NAMESPACE |
| 44 | valueFrom: |
| 45 | fieldRef: |
| 46 | apiVersion: v1 |
| 47 | fieldPath: metadata.namespace |
| 48 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 49 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Taka Cho | 31eb245 | 2019-06-24 21:10:50 -0400 | [diff] [blame] | 50 | - name: {{ include "common.name" . }}-chown |
| 51 | image: "busybox" |
| 52 | command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}"] |
| 53 | volumeMounts: |
| 54 | - mountPath: {{ .Values.persistence.mdsalPath }} |
| 55 | name: {{ include "common.fullname" . }}-data |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 56 | containers: |
| 57 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 58 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 59 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 60 | command: |
| 61 | - /opt/appc/bin/startODL.sh |
| 62 | ports: |
| 63 | - containerPort: {{ .Values.service.internalPort }} |
| 64 | - containerPort: {{ .Values.service.externalPort2 }} |
| 65 | readinessProbe: |
Taka Cho | cdc4266 | 2019-11-08 16:08:38 -0500 | [diff] [blame] | 66 | tcpSocket: |
| 67 | port: {{ .Values.service.internalPort }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 68 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 69 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 70 | env: |
| 71 | - name: MYSQL_ROOT_PASSWORD |
| 72 | valueFrom: |
| 73 | secretKeyRef: |
| 74 | name: {{ template "common.fullname" . }} |
| 75 | key: db-root-password |
| 76 | - name: SDNC_CONFIG_DIR |
| 77 | value: "{{ .Values.config.configDir }}" |
| 78 | - name: APPC_CONFIG_DIR |
| 79 | value: "{{ .Values.config.configDir }}" |
| 80 | - name: DMAAP_TOPIC_ENV |
| 81 | value: "{{ .Values.config.dmaapTopic }}" |
Aaron Hay | 145818b | 2018-06-05 13:23:50 -0400 | [diff] [blame] | 82 | - name: ENABLE_AAF |
| 83 | value: "{{ .Values.config.enableAAF }}" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 84 | - name: ENABLE_ODL_CLUSTER |
| 85 | value: "{{ .Values.config.enableClustering }}" |
| 86 | - name: APPC_REPLICAS |
| 87 | value: "{{ .Values.replicaCount }}" |
| 88 | volumeMounts: |
| 89 | - mountPath: /etc/localtime |
| 90 | name: localtime |
| 91 | readOnly: true |
| 92 | - mountPath: /opt/onap/appc/data/properties/dblib.properties |
| 93 | name: onap-appc-data-properties |
| 94 | subPath: dblib.properties |
| 95 | - mountPath: /opt/onap/appc/data/properties/svclogic.properties |
| 96 | name: onap-appc-data-properties |
| 97 | subPath: svclogic.properties |
| 98 | - mountPath: /opt/onap/appc/data/properties/appc.properties |
| 99 | name: onap-appc-data-properties |
| 100 | subPath: appc.properties |
| 101 | - mountPath: /opt/onap/appc/data/properties/aaiclient.properties |
| 102 | name: onap-appc-data-properties |
| 103 | subPath: aaiclient.properties |
Aaron Hay | 3395df2 | 2018-10-30 18:31:41 -0400 | [diff] [blame] | 104 | - mountPath: /opt/onap/appc/data/properties/cadi.properties |
| 105 | name: onap-appc-data-properties |
| 106 | subPath: cadi.properties |
Aaron Hay | 145818b | 2018-06-05 13:23:50 -0400 | [diff] [blame] | 107 | - mountPath: /opt/onap/appc/data/properties/aaa-app-config.xml |
| 108 | name: onap-appc-data-properties |
| 109 | subPath: aaa-app-config.xml |
Taka Cho | 870b943 | 2019-08-23 15:14:41 -0400 | [diff] [blame] | 110 | - mountPath: /opt/onap/appc/data/properties/bath_config.csv |
| 111 | name: onap-appc-data-properties |
| 112 | subPath: bath_config.csv |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 113 | - mountPath: /opt/onap/appc/svclogic/config/svclogic.properties |
| 114 | name: onap-appc-svclogic-config |
| 115 | subPath: svclogic.properties |
| 116 | - mountPath: /opt/onap/appc/svclogic/bin/showActiveGraphs.sh |
| 117 | name: onap-appc-svclogic-bin |
| 118 | subPath: showActiveGraphs.sh |
| 119 | - mountPath: /opt/onap/appc/bin/startODL.sh |
| 120 | name: onap-appc-bin |
| 121 | subPath: startODL.sh |
| 122 | - mountPath: /opt/onap/appc/bin/installAppcDb.sh |
| 123 | name: onap-appc-bin |
| 124 | subPath: installAppcDb.sh |
Aaron Hay | 1d464b5 | 2018-05-25 14:58:32 -0400 | [diff] [blame] | 125 | - mountPath: /opt/onap/appc/bin/health_check.sh |
| 126 | name: onap-appc-bin |
| 127 | subPath: health_check.sh |
Aaron Hay | 84e2c34 | 2018-04-17 12:37:31 -0400 | [diff] [blame] | 128 | - mountPath: /opt/onap/ccsdk/data/properties/dblib.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 129 | name: onap-sdnc-data-properties |
| 130 | subPath: dblib.properties |
Aaron Hay | 84e2c34 | 2018-04-17 12:37:31 -0400 | [diff] [blame] | 131 | - mountPath: /opt/onap/ccsdk/data/properties/svclogic.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 132 | name: onap-sdnc-data-properties |
| 133 | subPath: svclogic.properties |
Aaron Hay | 84e2c34 | 2018-04-17 12:37:31 -0400 | [diff] [blame] | 134 | - mountPath: /opt/onap/ccsdk/data/properties/aaiclient.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 135 | name: onap-sdnc-data-properties |
| 136 | subPath: aaiclient.properties |
Aaron Hay | 84e2c34 | 2018-04-17 12:37:31 -0400 | [diff] [blame] | 137 | - mountPath: /opt/onap/ccsdk/svclogic/config/svclogic.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 138 | name: onap-sdnc-svclogic-config |
| 139 | subPath: svclogic.properties |
Aaron Hay | 84e2c34 | 2018-04-17 12:37:31 -0400 | [diff] [blame] | 140 | - mountPath: /opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 141 | name: onap-sdnc-svclogic-bin |
| 142 | subPath: showActiveGraphs.sh |
Aaron Hay | 84e2c34 | 2018-04-17 12:37:31 -0400 | [diff] [blame] | 143 | - mountPath: /opt/onap/ccsdk/bin/installSdncDb.sh |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 144 | name: onap-sdnc-bin |
| 145 | subPath: installSdncDb.sh |
BorislavG | 3dad2f4 | 2018-04-16 10:19:45 +0000 | [diff] [blame] | 146 | - mountPath: {{ .Values.persistence.mdsalPath }} |
| 147 | name: {{ include "common.fullname" . }}-data |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 148 | - mountPath: /var/log/onap |
| 149 | name: logs |
Taka Cho | e1e2e1c | 2019-09-17 13:42:28 -0400 | [diff] [blame] | 150 | - mountPath: /opt/onap/appc/data/org.ops4j.pax.logging.cfg |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 151 | name: log-config |
| 152 | subPath: org.ops4j.pax.logging.cfg |
| 153 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 154 | {{ include "common.resources" . | indent 12 }} |
GregSulek | 973bfad | 2018-09-19 06:48:37 -0400 | [diff] [blame] | 155 | {{- if .Values.nodeSelector }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 156 | nodeSelector: |
| 157 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 158 | {{- end -}} |
| 159 | {{- if .Values.affinity }} |
| 160 | affinity: |
| 161 | {{ toYaml .Values.affinity | indent 10 }} |
| 162 | {{- end }} |
| 163 | |
| 164 | # side car containers |
| 165 | - name: filebeat-onap |
| 166 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 167 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 168 | volumeMounts: |
| 169 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 170 | name: filebeat-conf |
| 171 | subPath: filebeat.yml |
| 172 | - mountPath: /var/log/onap |
| 173 | name: logs |
| 174 | - mountPath: /usr/share/filebeat/data |
| 175 | name: data-filebeat |
| 176 | volumes: |
| 177 | - name: localtime |
| 178 | hostPath: |
| 179 | path: /etc/localtime |
| 180 | - name: filebeat-conf |
| 181 | configMap: |
| 182 | name: {{ include "common.fullname" . }}-filebeat |
| 183 | - name: log-config |
| 184 | configMap: |
| 185 | name: {{ include "common.fullname" . }}-logging-cfg |
| 186 | - name: logs |
| 187 | emptyDir: {} |
| 188 | - name: data-filebeat |
| 189 | emptyDir: {} |
| 190 | - name: onap-appc-data-properties |
| 191 | configMap: |
| 192 | name: {{ include "common.fullname" . }}-onap-appc-data-properties |
| 193 | - name: onap-appc-svclogic-config |
| 194 | configMap: |
| 195 | name: {{ include "common.fullname" . }}-onap-appc-svclogic-config |
| 196 | - name: onap-appc-svclogic-bin |
| 197 | configMap: |
| 198 | name: {{ include "common.fullname" . }}-onap-appc-svclogic-bin |
| 199 | defaultMode: 0755 |
| 200 | - name: onap-appc-bin |
| 201 | configMap: |
| 202 | name: {{ include "common.fullname" . }}-onap-appc-bin |
| 203 | defaultMode: 0755 |
| 204 | - name: onap-sdnc-data-properties |
| 205 | configMap: |
| 206 | name: {{ include "common.fullname" . }}-onap-sdnc-data-properties |
| 207 | - name: onap-sdnc-svclogic-config |
| 208 | configMap: |
| 209 | name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config |
| 210 | - name: onap-sdnc-svclogic-bin |
| 211 | configMap: |
| 212 | name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-bin |
| 213 | defaultMode: 0755 |
| 214 | - name: onap-sdnc-bin |
| 215 | configMap: |
| 216 | name: {{ include "common.fullname" . }}-onap-sdnc-bin |
| 217 | defaultMode: 0755 |
BorislavG | 8b31f6d | 2018-05-02 14:06:08 +0000 | [diff] [blame] | 218 | {{ if not .Values.persistence.enabled }} |
BorislavG | 3dad2f4 | 2018-04-16 10:19:45 +0000 | [diff] [blame] | 219 | - name: {{ include "common.fullname" . }}-data |
| 220 | emptyDir: {} |
BorislavG | 8b31f6d | 2018-05-02 14:06:08 +0000 | [diff] [blame] | 221 | {{ else }} |
BorislavG | 3dad2f4 | 2018-04-16 10:19:45 +0000 | [diff] [blame] | 222 | volumeClaimTemplates: |
| 223 | - metadata: |
| 224 | name: {{ include "common.fullname" . }}-data |
| 225 | labels: |
| 226 | name: {{ include "common.fullname" . }} |
Sylvain Desbureaux | 5f46e6e | 2019-11-29 09:19:40 +0100 | [diff] [blame] | 227 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 228 | release: "{{ include "common.release" . }}" |
Sylvain Desbureaux | 5f46e6e | 2019-11-29 09:19:40 +0100 | [diff] [blame] | 229 | heritage: "{{ .Release.Service }}" |
BorislavG | 3dad2f4 | 2018-04-16 10:19:45 +0000 | [diff] [blame] | 230 | spec: |
Sylvain Desbureaux | 5f46e6e | 2019-11-29 09:19:40 +0100 | [diff] [blame] | 231 | accessModes: |
| 232 | - {{ .Values.persistence.accessMode }} |
| 233 | storageClassName: {{ include "common.storageClass" . }} |
BorislavG | 3dad2f4 | 2018-04-16 10:19:45 +0000 | [diff] [blame] | 234 | resources: |
| 235 | requests: |
| 236 | storage: {{ .Values.persistence.size }} |
BorislavG | 8b31f6d | 2018-05-02 14:06:08 +0000 | [diff] [blame] | 237 | {{ end }} |