blob: 3ba37af197cba1a3751f53327936ba258ed060ce [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disableSdncSdnc }}
Hao Kuang27af4a32017-12-15 20:38:03 +00002apiVersion: apps/v1beta1
3kind: StatefulSet
Mandeep Khindad6ea9872017-06-24 11:49:37 -04004metadata:
5 name: sdnc
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00006 namespace: "{{ .Values.nsPrefix }}-sdnc"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
Hao Kuang27af4a32017-12-15 20:38:03 +00008 serviceName: "sdnhost-cluster"
9 replicas: {{ .Values.numberOfODLReplicas }}
10 podManagementPolicy: Parallel
Mandeep Khindad6ea9872017-06-24 11:49:37 -040011 selector:
12 matchLabels:
13 app: sdnc
14 template:
15 metadata:
16 labels:
17 app: sdnc
18 name: sdnc
Mandeep Khindad6ea9872017-06-24 11:49:37 -040019 spec:
vasundhrad76102d2017-11-22 13:13:27 +000020 initContainers:
21 - command:
22 - /root/ready.py
23 args:
24 - --container-name
25 - sdnc-db-container
26 env:
27 - name: NAMESPACE
28 valueFrom:
29 fieldRef:
30 apiVersion: v1
31 fieldPath: metadata.namespace
32 image: {{ .Values.image.readiness }}
33 imagePullPolicy: {{ .Values.pullPolicy }}
34 name: sdnc-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040035 containers:
36 - command:
Hao Kuang27af4a32017-12-15 20:38:03 +000037 - bash
38 - "-c"
39 - |
40 sed -i 's/dbhost/sdnc-dbhost-0.dbhost.onap-sdnc.svc.cluster.local/g' /opt/onap/sdnc/data/properties/svclogic.properties
41 sed -i 's/^\(org.onap.ccsdk.sli.jdbc.hosts=\).*/\1sdnc-dbhost-0.dbhost.onap-sdnc.svc.cluster.local/' /opt/onap/sdnc/data/properties/dblib.properties
42 /opt/onap/sdnc/bin/startODL.sh
Mandeep Khindad6ea9872017-06-24 11:49:37 -040043 env:
44 - name: MYSQL_ROOT_PASSWORD
45 value: openECOMP1.0
46 - name: SDNC_CONFIG_DIR
Mandeep Khindaedc59412017-10-05 12:18:14 +000047 value: /opt/onap/sdnc/data/properties
Hao Kuang27af4a32017-12-15 20:38:03 +000048 - name: ENABLE_ODL_CLUSTER
49 value: "{{ .Values.enableODLCluster }}"
50 - name: SDNC_REPLICAS
51 value: "{{ .Values.numberOfODLReplicas }}"
kerenj9daad022017-08-23 13:35:43 +000052 image: {{ .Values.image.sdnc }}
53 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040054 name: sdnc-controller-container
55 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030056 - mountPath: /etc/localtime
57 name: localtime
58 readOnly: true
Mandeep Khindaedc59412017-10-05 12:18:14 +000059 - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
Mandeep Khinda9f354812017-08-25 16:18:28 +000060 name: sdnc-aaiclient-properties
Mandeep Khindaedc59412017-10-05 12:18:14 +000061 - mountPath: /opt/onap/sdnc/data/properties/admportal.json
yurynd0707be2017-09-27 14:54:18 +030062 name: sdnc-admportal-json
63 - mountPath: /var/log/onap
64 name: sdnc-logs
65 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
66 name: sdnc-log-config
Mandeep Khindad6ea9872017-06-24 11:49:37 -040067 ports:
68 - containerPort: 8181
Mandeep Khindaedc59412017-10-05 12:18:14 +000069 - containerPort: 8101
Hao Kuang27af4a32017-12-15 20:38:03 +000070 - containerPort: 2550
71 - containerPort: 8080
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072 readinessProbe:
73 tcpSocket:
74 port: 8181
75 initialDelaySeconds: 5
76 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +030077 - image: {{ .Values.image.filebeat }}
78 imagePullPolicy: {{ .Values.pullPolicy }}
79 name: filebeat-onap
80 volumeMounts:
81 - mountPath: /usr/share/filebeat/filebeat.yml
82 name: filebeat-conf
83 - mountPath: /var/log/onap
84 name: sdnc-logs
85 - mountPath: /usr/share/filebeat/data
86 name: sdnc-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040087 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030088 - name: localtime
89 hostPath:
90 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030091 - name: filebeat-conf
92 hostPath:
93 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
94 - name: sdnc-log-config
95 hostPath:
96 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdnc/org.ops4j.pax.logging.cfg
97 - name: sdnc-logs
98 emptyDir: {}
99 - name: sdnc-data-filebeat
100 emptyDir: {}
Mandeep Khinda9f354812017-08-25 16:18:28 +0000101 - name: sdnc-aaiclient-properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400102 hostPath:
Mandeep Khinda9f354812017-08-25 16:18:28 +0000103 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
104 - name: sdnc-admportal-json
105 hostPath:
106 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300107 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000108 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhrad76102d2017-11-22 13:13:27 +0000109#{{ end }}