blob: 791d93393e98bc06634924d23c29e9caac936727 [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -05001apiVersion: apps/v1beta1
2kind: StatefulSet
3metadata:
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 }}
11spec:
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:
BorislavG8b31f6d2018-05-02 14:06:08 +000021 imagePullSecrets:
22 - name: "{{ include "common.namespace" . }}-docker-registry-key"
Mike Elliott13fed112018-02-28 08:33:33 -050023 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" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000040 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Mike Elliott13fed112018-02-28 08:33:33 -050041 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:
Aaron Hay1d464b52018-05-25 14:58:32 -040048 exec:
49 command:
50 - /opt/appc/bin/health_check.sh
Mike Elliott13fed112018-02-28 08:33:33 -050051 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
52 periodSeconds: {{ .Values.readiness.periodSeconds }}
53 env:
54 - name: MYSQL_ROOT_PASSWORD
55 valueFrom:
56 secretKeyRef:
57 name: {{ template "common.fullname" . }}
58 key: db-root-password
59 - name: SDNC_CONFIG_DIR
60 value: "{{ .Values.config.configDir }}"
61 - name: APPC_CONFIG_DIR
62 value: "{{ .Values.config.configDir }}"
63 - name: DMAAP_TOPIC_ENV
64 value: "{{ .Values.config.dmaapTopic }}"
Aaron Hay145818b2018-06-05 13:23:50 -040065 - name: ENABLE_AAF
66 value: "{{ .Values.config.enableAAF }}"
Mike Elliott13fed112018-02-28 08:33:33 -050067 - name: ENABLE_ODL_CLUSTER
68 value: "{{ .Values.config.enableClustering }}"
69 - name: APPC_REPLICAS
70 value: "{{ .Values.replicaCount }}"
71 volumeMounts:
72 - mountPath: /etc/localtime
73 name: localtime
74 readOnly: true
75 - mountPath: /opt/onap/appc/data/properties/dblib.properties
76 name: onap-appc-data-properties
77 subPath: dblib.properties
78 - mountPath: /opt/onap/appc/data/properties/svclogic.properties
79 name: onap-appc-data-properties
80 subPath: svclogic.properties
81 - mountPath: /opt/onap/appc/data/properties/appc.properties
82 name: onap-appc-data-properties
83 subPath: appc.properties
84 - mountPath: /opt/onap/appc/data/properties/aaiclient.properties
85 name: onap-appc-data-properties
86 subPath: aaiclient.properties
Aaron Hay145818b2018-06-05 13:23:50 -040087 - mountPath: /opt/onap/appc/data/properties/aaa-app-config.xml
88 name: onap-appc-data-properties
89 subPath: aaa-app-config.xml
Mike Elliott13fed112018-02-28 08:33:33 -050090 - mountPath: /opt/onap/appc/svclogic/config/svclogic.properties
91 name: onap-appc-svclogic-config
92 subPath: svclogic.properties
93 - mountPath: /opt/onap/appc/svclogic/bin/showActiveGraphs.sh
94 name: onap-appc-svclogic-bin
95 subPath: showActiveGraphs.sh
96 - mountPath: /opt/onap/appc/bin/startODL.sh
97 name: onap-appc-bin
98 subPath: startODL.sh
99 - mountPath: /opt/onap/appc/bin/installAppcDb.sh
100 name: onap-appc-bin
101 subPath: installAppcDb.sh
Aaron Hay1d464b52018-05-25 14:58:32 -0400102 - mountPath: /opt/onap/appc/bin/health_check.sh
103 name: onap-appc-bin
104 subPath: health_check.sh
Aaron Hay84e2c342018-04-17 12:37:31 -0400105 - mountPath: /opt/onap/ccsdk/data/properties/dblib.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500106 name: onap-sdnc-data-properties
107 subPath: dblib.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400108 - mountPath: /opt/onap/ccsdk/data/properties/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500109 name: onap-sdnc-data-properties
110 subPath: svclogic.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400111 - mountPath: /opt/onap/ccsdk/data/properties/aaiclient.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500112 name: onap-sdnc-data-properties
113 subPath: aaiclient.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400114 - mountPath: /opt/onap/ccsdk/svclogic/config/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500115 name: onap-sdnc-svclogic-config
116 subPath: svclogic.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400117 - mountPath: /opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh
Mike Elliott13fed112018-02-28 08:33:33 -0500118 name: onap-sdnc-svclogic-bin
119 subPath: showActiveGraphs.sh
Aaron Hay84e2c342018-04-17 12:37:31 -0400120 - mountPath: /opt/onap/ccsdk/bin/startODL.sh
Mike Elliott13fed112018-02-28 08:33:33 -0500121 name: onap-sdnc-bin
122 subPath: startODL.sh
Aaron Hay84e2c342018-04-17 12:37:31 -0400123 - mountPath: /opt/onap/ccsdk/bin/installSdncDb.sh
Mike Elliott13fed112018-02-28 08:33:33 -0500124 name: onap-sdnc-bin
125 subPath: installSdncDb.sh
BorislavG3dad2f42018-04-16 10:19:45 +0000126 - mountPath: {{ .Values.persistence.mdsalPath }}
127 name: {{ include "common.fullname" . }}-data
Mike Elliott13fed112018-02-28 08:33:33 -0500128 - mountPath: /var/log/onap
129 name: logs
130 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
131 name: log-config
132 subPath: org.ops4j.pax.logging.cfg
133 resources:
134{{ toYaml .Values.resources | indent 12 }}
135 {{- if .Values.nodeSelector }}
136 nodeSelector:
137{{ toYaml .Values.nodeSelector | indent 10 }}
138 {{- end -}}
139 {{- if .Values.affinity }}
140 affinity:
141{{ toYaml .Values.affinity | indent 10 }}
142 {{- end }}
143
144 # side car containers
145 - name: filebeat-onap
146 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
147 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
148 volumeMounts:
149 - mountPath: /usr/share/filebeat/filebeat.yml
150 name: filebeat-conf
151 subPath: filebeat.yml
152 - mountPath: /var/log/onap
153 name: logs
154 - mountPath: /usr/share/filebeat/data
155 name: data-filebeat
156 volumes:
157 - name: localtime
158 hostPath:
159 path: /etc/localtime
160 - name: filebeat-conf
161 configMap:
162 name: {{ include "common.fullname" . }}-filebeat
163 - name: log-config
164 configMap:
165 name: {{ include "common.fullname" . }}-logging-cfg
166 - name: logs
167 emptyDir: {}
168 - name: data-filebeat
169 emptyDir: {}
170 - name: onap-appc-data-properties
171 configMap:
172 name: {{ include "common.fullname" . }}-onap-appc-data-properties
173 - name: onap-appc-svclogic-config
174 configMap:
175 name: {{ include "common.fullname" . }}-onap-appc-svclogic-config
176 - name: onap-appc-svclogic-bin
177 configMap:
178 name: {{ include "common.fullname" . }}-onap-appc-svclogic-bin
179 defaultMode: 0755
180 - name: onap-appc-bin
181 configMap:
182 name: {{ include "common.fullname" . }}-onap-appc-bin
183 defaultMode: 0755
184 - name: onap-sdnc-data-properties
185 configMap:
186 name: {{ include "common.fullname" . }}-onap-sdnc-data-properties
187 - name: onap-sdnc-svclogic-config
188 configMap:
189 name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config
190 - name: onap-sdnc-svclogic-bin
191 configMap:
192 name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-bin
193 defaultMode: 0755
194 - name: onap-sdnc-bin
195 configMap:
196 name: {{ include "common.fullname" . }}-onap-sdnc-bin
197 defaultMode: 0755
BorislavG8b31f6d2018-05-02 14:06:08 +0000198{{ if not .Values.persistence.enabled }}
BorislavG3dad2f42018-04-16 10:19:45 +0000199 - name: {{ include "common.fullname" . }}-data
200 emptyDir: {}
BorislavG8b31f6d2018-05-02 14:06:08 +0000201{{ else }}
BorislavG3dad2f42018-04-16 10:19:45 +0000202 volumeClaimTemplates:
203 - metadata:
204 name: {{ include "common.fullname" . }}-data
205 labels:
206 name: {{ include "common.fullname" . }}
207 spec:
208 accessModes: [ {{ .Values.persistence.accessMode }} ]
209 storageClassName: {{ include "common.fullname" . }}-data
210 resources:
211 requests:
212 storage: {{ .Values.persistence.size }}
BorislavG8b31f6d2018-05-02 14:06:08 +0000213{{ end }}