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/admportal.json |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame^] | 60 | name: sdnc-conf |
| 61 | subPath: admportal.json |
| 62 | - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties |
| 63 | name: sdnc-conf |
| 64 | subPath: aaiclient.properties |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 65 | - mountPath: /var/log/onap |
| 66 | name: sdnc-logs |
| 67 | - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame^] | 68 | name: sdnc-logging-cfg-config |
| 69 | subPath: org.ops4j.pax.logging.cfg |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 70 | ports: |
| 71 | - containerPort: 8181 |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 72 | - containerPort: 8101 |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 73 | - containerPort: 2550 |
| 74 | - containerPort: 8080 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 75 | readinessProbe: |
| 76 | tcpSocket: |
| 77 | port: 8181 |
| 78 | initialDelaySeconds: 5 |
| 79 | periodSeconds: 10 |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 80 | - 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 |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame^] | 86 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 87 | - mountPath: /var/log/onap |
| 88 | name: sdnc-logs |
| 89 | - mountPath: /usr/share/filebeat/data |
| 90 | name: sdnc-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 91 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 92 | - name: localtime |
| 93 | hostPath: |
| 94 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 95 | - name: filebeat-conf |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame^] | 96 | configMap: |
| 97 | name: sdnc-log-configmap |
| 98 | - name: sdnc-logging-cfg-config |
| 99 | configMap: |
| 100 | name: sdnc-logging-cfg-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 101 | - name: sdnc-logs |
| 102 | emptyDir: {} |
| 103 | - name: sdnc-data-filebeat |
| 104 | emptyDir: {} |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame^] | 105 | - 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 Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 115 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 116 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | d76102d | 2017-11-22 13:13:27 +0000 | [diff] [blame] | 117 | #{{ end }} |