blob: 1f020377bd2208d1aeed612467b51adba87338b8 [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
BorislavG8bfc6cf2018-02-27 15:04:26 +00006 namespace: "{{ .Values.nsPrefix }}"
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 - |
BorislavG8bfc6cf2018-02-27 15:04:26 +000040 sed -i 's/dbhost/sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.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.{{ .Values.nsPrefix }}.svc.cluster.local/' /opt/onap/sdnc/data/properties/dblib.properties
Hao Kuang27af4a32017-12-15 20:38:03 +000042 /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/admportal.json
mayankg2703eea1d3e2018-01-16 05:27:01 +000060 name: sdnc-conf
61 subPath: admportal.json
62 - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
63 name: sdnc-conf
64 subPath: aaiclient.properties
yurynd0707be2017-09-27 14:54:18 +030065 - mountPath: /var/log/onap
66 name: sdnc-logs
67 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
mayankg2703eea1d3e2018-01-16 05:27:01 +000068 name: sdnc-logging-cfg-config
69 subPath: org.ops4j.pax.logging.cfg
Mandeep Khindad6ea9872017-06-24 11:49:37 -040070 ports:
71 - containerPort: 8181
Mandeep Khindaedc59412017-10-05 12:18:14 +000072 - containerPort: 8101
Hao Kuang27af4a32017-12-15 20:38:03 +000073 - containerPort: 2550
74 - containerPort: 8080
Mandeep Khindad6ea9872017-06-24 11:49:37 -040075 readinessProbe:
76 tcpSocket:
77 port: 8181
78 initialDelaySeconds: 5
79 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +030080 - image: {{ .Values.image.filebeat }}
81 imagePullPolicy: {{ .Values.pullPolicy }}
82 name: filebeat-onap
83 volumeMounts:
84 - mountPath: /usr/share/filebeat/filebeat.yml
85 name: filebeat-conf
mayankg2703eea1d3e2018-01-16 05:27:01 +000086 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +030087 - mountPath: /var/log/onap
88 name: sdnc-logs
89 - mountPath: /usr/share/filebeat/data
90 name: sdnc-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040091 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030092 - name: localtime
93 hostPath:
94 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +030095 - name: filebeat-conf
mayankg2703eea1d3e2018-01-16 05:27:01 +000096 configMap:
97 name: sdnc-log-configmap
98 - name: sdnc-logging-cfg-config
99 configMap:
100 name: sdnc-logging-cfg-configmap
yurynd0707be2017-09-27 14:54:18 +0300101 - name: sdnc-logs
102 emptyDir: {}
103 - name: sdnc-data-filebeat
104 emptyDir: {}
mayankg2703eea1d3e2018-01-16 05:27:01 +0000105 - name: sdnc-conf
106 configMap:
107 name: sdnc-conf-configmap
108 items:
109 - key: admportal.json
110 path: admportal.json
111 mode: 0755
112 - key: aaiclient.properties
113 path: aaiclient.properties
114 mode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300115 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000116 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhrad76102d2017-11-22 13:13:27 +0000117#{{ end }}