vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # 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 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disableSdncSdnc }} |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 16 | apiVersion: apps/v1beta1 |
| 17 | kind: StatefulSet |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 18 | metadata: |
| 19 | name: sdnc |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 20 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 21 | spec: |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 22 | serviceName: "sdnhost-cluster" |
| 23 | replicas: {{ .Values.numberOfODLReplicas }} |
| 24 | podManagementPolicy: Parallel |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 25 | selector: |
| 26 | matchLabels: |
| 27 | app: sdnc |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: sdnc |
| 32 | name: sdnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 33 | spec: |
vasundhra | d76102d | 2017-11-22 13:13:27 +0000 | [diff] [blame] | 34 | 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 49 | containers: |
| 50 | - command: |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 51 | - bash |
| 52 | - "-c" |
| 53 | - | |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 54 | 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 Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 56 | /opt/onap/sdnc/bin/startODL.sh |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 57 | env: |
| 58 | - name: MYSQL_ROOT_PASSWORD |
| 59 | value: openECOMP1.0 |
| 60 | - name: SDNC_CONFIG_DIR |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 61 | value: /opt/onap/sdnc/data/properties |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 62 | - name: ENABLE_ODL_CLUSTER |
| 63 | value: "{{ .Values.enableODLCluster }}" |
| 64 | - name: SDNC_REPLICAS |
| 65 | value: "{{ .Values.numberOfODLReplicas }}" |
kerenj | 9daad02 | 2017-08-23 13:35:43 +0000 | [diff] [blame] | 66 | image: {{ .Values.image.sdnc }} |
| 67 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 68 | name: sdnc-controller-container |
| 69 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 70 | - mountPath: /etc/localtime |
| 71 | name: localtime |
| 72 | readOnly: true |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 73 | - mountPath: /opt/onap/sdnc/data/properties/admportal.json |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame] | 74 | name: sdnc-conf |
| 75 | subPath: admportal.json |
| 76 | - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties |
| 77 | name: sdnc-conf |
| 78 | subPath: aaiclient.properties |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 79 | - mountPath: /var/log/onap |
| 80 | name: sdnc-logs |
| 81 | - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame] | 82 | name: sdnc-logging-cfg-config |
| 83 | subPath: org.ops4j.pax.logging.cfg |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 84 | ports: |
| 85 | - containerPort: 8181 |
Mandeep Khinda | edc5941 | 2017-10-05 12:18:14 +0000 | [diff] [blame] | 86 | - containerPort: 8101 |
Hao Kuang | 27af4a3 | 2017-12-15 20:38:03 +0000 | [diff] [blame] | 87 | - containerPort: 2550 |
| 88 | - containerPort: 8080 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 89 | readinessProbe: |
| 90 | tcpSocket: |
| 91 | port: 8181 |
| 92 | initialDelaySeconds: 5 |
| 93 | periodSeconds: 10 |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 94 | - 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 |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame] | 100 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 101 | - mountPath: /var/log/onap |
| 102 | name: sdnc-logs |
| 103 | - mountPath: /usr/share/filebeat/data |
| 104 | name: sdnc-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 105 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 106 | - name: localtime |
| 107 | hostPath: |
| 108 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 109 | - name: filebeat-conf |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame] | 110 | configMap: |
| 111 | name: sdnc-log-configmap |
| 112 | - name: sdnc-logging-cfg-config |
| 113 | configMap: |
| 114 | name: sdnc-logging-cfg-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 115 | - name: sdnc-logs |
| 116 | emptyDir: {} |
| 117 | - name: sdnc-data-filebeat |
| 118 | emptyDir: {} |
mayankg2703 | eea1d3e | 2018-01-16 05:27:01 +0000 | [diff] [blame] | 119 | - 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 Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 129 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 130 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | d76102d | 2017-11-22 13:13:27 +0000 | [diff] [blame] | 131 | #{{ end }} |