blob: d2da2ec7569d00a0183d2b02083a4fcd8de9b3af [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:
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 Hay84e2c342018-04-17 12:37:31 -040096 - mountPath: /opt/onap/ccsdk/data/properties/dblib.properties
Mike Elliott13fed112018-02-28 08:33:33 -050097 name: onap-sdnc-data-properties
98 subPath: dblib.properties
Aaron Hay84e2c342018-04-17 12:37:31 -040099 - mountPath: /opt/onap/ccsdk/data/properties/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500100 name: onap-sdnc-data-properties
101 subPath: svclogic.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400102 - mountPath: /opt/onap/ccsdk/data/properties/aaiclient.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500103 name: onap-sdnc-data-properties
104 subPath: aaiclient.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400105 - mountPath: /opt/onap/ccsdk/svclogic/config/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -0500106 name: onap-sdnc-svclogic-config
107 subPath: svclogic.properties
Aaron Hay84e2c342018-04-17 12:37:31 -0400108 - mountPath: /opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh
Mike Elliott13fed112018-02-28 08:33:33 -0500109 name: onap-sdnc-svclogic-bin
110 subPath: showActiveGraphs.sh
Aaron Hay84e2c342018-04-17 12:37:31 -0400111 - mountPath: /opt/onap/ccsdk/bin/startODL.sh
Mike Elliott13fed112018-02-28 08:33:33 -0500112 name: onap-sdnc-bin
113 subPath: startODL.sh
Aaron Hay84e2c342018-04-17 12:37:31 -0400114 - mountPath: /opt/onap/ccsdk/bin/installSdncDb.sh
Mike Elliott13fed112018-02-28 08:33:33 -0500115 name: onap-sdnc-bin
116 subPath: installSdncDb.sh
BorislavG3dad2f42018-04-16 10:19:45 +0000117 - mountPath: {{ .Values.persistence.mdsalPath }}
118 name: {{ include "common.fullname" . }}-data
Mike Elliott13fed112018-02-28 08:33:33 -0500119 - 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
BorislavG8b31f6d2018-05-02 14:06:08 +0000189{{ if not .Values.persistence.enabled }}
BorislavG3dad2f42018-04-16 10:19:45 +0000190 - name: {{ include "common.fullname" . }}-data
191 emptyDir: {}
BorislavG8b31f6d2018-05-02 14:06:08 +0000192{{ else }}
BorislavG3dad2f42018-04-16 10:19:45 +0000193 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 }}
BorislavG8b31f6d2018-05-02 14:06:08 +0000204{{ end }}