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