blob: 3b078964623482a7588e21b603da4f72c65be51d [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disableSdncSdnc }}
Hao Kuang27af4a32017-12-15 20:38:03 +000016apiVersion: apps/v1beta1
17kind: StatefulSet
Mandeep Khindad6ea9872017-06-24 11:49:37 -040018metadata:
19 name: sdnc
BorislavG8bfc6cf2018-02-27 15:04:26 +000020 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040021spec:
Hao Kuang27af4a32017-12-15 20:38:03 +000022 serviceName: "sdnhost-cluster"
23 replicas: {{ .Values.numberOfODLReplicas }}
24 podManagementPolicy: Parallel
Mandeep Khindad6ea9872017-06-24 11:49:37 -040025 selector:
26 matchLabels:
27 app: sdnc
28 template:
29 metadata:
30 labels:
31 app: sdnc
32 name: sdnc
Mandeep Khindad6ea9872017-06-24 11:49:37 -040033 spec:
vasundhrad76102d2017-11-22 13:13:27 +000034 initContainers:
35 - command:
36 - /root/ready.py
37 args:
38 - --container-name
39 - sdnc-db-container
40 env:
41 - name: NAMESPACE
42 valueFrom:
43 fieldRef:
44 apiVersion: v1
45 fieldPath: metadata.namespace
46 image: {{ .Values.image.readiness }}
47 imagePullPolicy: {{ .Values.pullPolicy }}
48 name: sdnc-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040049 containers:
50 - command:
Hao Kuang27af4a32017-12-15 20:38:03 +000051 - bash
52 - "-c"
53 - |
BorislavG8bfc6cf2018-02-27 15:04:26 +000054 sed -i 's/dbhost/sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/g' /opt/onap/sdnc/data/properties/svclogic.properties
55 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 +000056 /opt/onap/sdnc/bin/startODL.sh
Mandeep Khindad6ea9872017-06-24 11:49:37 -040057 env:
58 - name: MYSQL_ROOT_PASSWORD
59 value: openECOMP1.0
60 - name: SDNC_CONFIG_DIR
Mandeep Khindaedc59412017-10-05 12:18:14 +000061 value: /opt/onap/sdnc/data/properties
Hao Kuang27af4a32017-12-15 20:38:03 +000062 - name: ENABLE_ODL_CLUSTER
63 value: "{{ .Values.enableODLCluster }}"
64 - name: SDNC_REPLICAS
65 value: "{{ .Values.numberOfODLReplicas }}"
kerenj9daad022017-08-23 13:35:43 +000066 image: {{ .Values.image.sdnc }}
67 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040068 name: sdnc-controller-container
69 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030070 - mountPath: /etc/localtime
71 name: localtime
72 readOnly: true
Mandeep Khindaedc59412017-10-05 12:18:14 +000073 - mountPath: /opt/onap/sdnc/data/properties/admportal.json
mayankg2703eea1d3e2018-01-16 05:27:01 +000074 name: sdnc-conf
75 subPath: admportal.json
76 - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
77 name: sdnc-conf
78 subPath: aaiclient.properties
yurynd0707be2017-09-27 14:54:18 +030079 - mountPath: /var/log/onap
80 name: sdnc-logs
81 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
mayankg2703eea1d3e2018-01-16 05:27:01 +000082 name: sdnc-logging-cfg-config
83 subPath: org.ops4j.pax.logging.cfg
Mandeep Khindad6ea9872017-06-24 11:49:37 -040084 ports:
85 - containerPort: 8181
Mandeep Khindaedc59412017-10-05 12:18:14 +000086 - containerPort: 8101
Hao Kuang27af4a32017-12-15 20:38:03 +000087 - containerPort: 2550
88 - containerPort: 8080
Mandeep Khindad6ea9872017-06-24 11:49:37 -040089 readinessProbe:
90 tcpSocket:
91 port: 8181
92 initialDelaySeconds: 5
93 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +030094 - image: {{ .Values.image.filebeat }}
95 imagePullPolicy: {{ .Values.pullPolicy }}
96 name: filebeat-onap
97 volumeMounts:
98 - mountPath: /usr/share/filebeat/filebeat.yml
99 name: filebeat-conf
mayankg2703eea1d3e2018-01-16 05:27:01 +0000100 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300101 - mountPath: /var/log/onap
102 name: sdnc-logs
103 - mountPath: /usr/share/filebeat/data
104 name: sdnc-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400105 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300106 - name: localtime
107 hostPath:
108 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300109 - name: filebeat-conf
mayankg2703eea1d3e2018-01-16 05:27:01 +0000110 configMap:
111 name: sdnc-log-configmap
112 - name: sdnc-logging-cfg-config
113 configMap:
114 name: sdnc-logging-cfg-configmap
yurynd0707be2017-09-27 14:54:18 +0300115 - name: sdnc-logs
116 emptyDir: {}
117 - name: sdnc-data-filebeat
118 emptyDir: {}
mayankg2703eea1d3e2018-01-16 05:27:01 +0000119 - name: sdnc-conf
120 configMap:
121 name: sdnc-conf-configmap
122 items:
123 - key: admportal.json
124 path: admportal.json
125 mode: 0755
126 - key: aaiclient.properties
127 path: aaiclient.properties
128 mode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300129 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000130 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhrad76102d2017-11-22 13:13:27 +0000131#{{ end }}