yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disableSdncSdnc }} |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 2 | apiVersion: apps/v1beta1 |
| 3 | kind: StatefulSet |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 4 | metadata: |
| 5 | name: sdnc |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 6 | namespace: "{{ .Values.nsPrefix }}-sdnc" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 7 | spec: |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 8 | serviceName: "sdnhost-cluster" |
| 9 | replicas: {{ .Values.numberOfODLReplicas }} |
| 10 | podManagementPolicy: Parallel |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 11 | selector: |
| 12 | matchLabels: |
| 13 | app: sdnc |
| 14 | template: |
| 15 | metadata: |
| 16 | labels: |
| 17 | app: sdnc |
| 18 | name: sdnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 19 | spec: |
vasundhra | d76102d | 2017-11-22 13:13:27 +0000 | [diff] [blame] | 20 | 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 35 | containers: |
| 36 | - command: |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 37 | - 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 43 | env: |
| 44 | - name: MYSQL_ROOT_PASSWORD |
| 45 | value: openECOMP1.0 |
| 46 | - name: SDNC_CONFIG_DIR |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 47 | value: /opt/onap/sdnc/data/properties |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 48 | - name: ENABLE_ODL_CLUSTER |
| 49 | value: "{{ .Values.enableODLCluster }}" |
| 50 | - name: SDNC_REPLICAS |
| 51 | value: "{{ .Values.numberOfODLReplicas }}" |
kerenj | 9daad02 | 2017-08-23 13:35:43 +0000 | [diff] [blame] | 52 | image: {{ .Values.image.sdnc }} |
| 53 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 54 | name: sdnc-controller-container |
| 55 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 56 | - mountPath: /etc/localtime |
| 57 | name: localtime |
| 58 | readOnly: true |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 59 | - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties |
Mandeep Khinda | 9f35481 | 2017-08-25 16:18:28 +0000 | [diff] [blame] | 60 | name: sdnc-aaiclient-properties |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 61 | - mountPath: /opt/onap/sdnc/data/properties/admportal.json |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 62 | 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 67 | ports: |
| 68 | - containerPort: 8181 |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 69 | - containerPort: 8101 |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 70 | - containerPort: 2550 |
| 71 | - containerPort: 8080 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 72 | readinessProbe: |
| 73 | tcpSocket: |
| 74 | port: 8181 |
| 75 | initialDelaySeconds: 5 |
| 76 | periodSeconds: 10 |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 77 | - 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 87 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 88 | - name: localtime |
| 89 | hostPath: |
| 90 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 91 | - 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 Khinda | 9f35481 | 2017-08-25 16:18:28 +0000 | [diff] [blame] | 101 | - name: sdnc-aaiclient-properties |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 102 | hostPath: |
Mandeep Khinda | 9f35481 | 2017-08-25 16:18:28 +0000 | [diff] [blame] | 103 | 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 Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 107 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 108 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | d76102d | 2017-11-22 13:13:27 +0000 | [diff] [blame] | 109 | #{{ end }} |