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