Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 1 | {{/* |
egernug | 2757833 | 2020-03-26 10:27:55 +0000 | [diff] [blame] | 2 | # Copyright © 2020 Samsung Electronics |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 3 | # Copyright © 2017 Amdocs, Bell Canada |
Remigiusz Janeczek | 42177a1 | 2020-12-10 13:10:15 +0100 | [diff] [blame] | 4 | # Copyright © 2021 Nokia |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 17 | */}} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 18 | |
Grzegorz-Lis | 1318a77 | 2020-07-23 15:08:43 +0200 | [diff] [blame] | 19 | apiVersion: apps/v1 |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 20 | kind: StatefulSet |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 21 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 22 | spec: |
Grzegorz-Lis | 1318a77 | 2020-07-23 15:08:43 +0200 | [diff] [blame] | 23 | selector: |
| 24 | matchLabels: |
| 25 | app: {{ include "common.name" . }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 26 | serviceName: {{ include "common.servicename" . }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 27 | replicas: {{ .Values.replicaCount }} |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 28 | selector: {{- include "common.selectors" . | nindent 4 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 29 | podManagementPolicy: Parallel |
| 30 | template: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 31 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 32 | spec: |
| 33 | initContainers: |
| 34 | - command: |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 35 | - sh |
| 36 | args: |
| 37 | - -c |
| 38 | - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done" |
| 39 | env: |
| 40 | - name: AAI_CLIENT_NAME |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 41 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 42 | - name: AAI_CLIENT_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 43 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 44 | - name: MODELSERVICE_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 45 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 46 | - name: MODELSERVICE_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 47 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 48 | - name: RESTCONF_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 49 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 50 | - name: RESTCONF_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 51 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 52 | - name: ANSIBLE_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 53 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 54 | - name: ANSIBLE_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 55 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 56 | - name: SCALEOUT_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 57 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 58 | - name: SCALEOUT_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 59 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 60 | - name: NETBOX_APIKEY |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 61 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 62 | - name: SDNC_DB_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 63 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 64 | - name: SDNC_DB_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 65 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }} |
Alexander Dehn | 2ae954d | 2020-10-20 15:57:42 +0000 | [diff] [blame] | 66 | - name: ODL_ADMIN_USERNAME |
| 67 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }} |
| 68 | - name: ODL_ADMIN_PASSWORD |
| 69 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }} |
demskeq8 | 9d26b33 | 2021-01-14 16:45:28 +0100 | [diff] [blame] | 70 | {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }} |
| 71 | - name: DMAAP_HTTP_PROXY_USERNAME |
| 72 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }} |
| 73 | - name: DMAAP_HTTP_PROXY_PASSWORD |
| 74 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }} |
| 75 | {{- end }} |
| 76 | |
Alexander Dehn | 2ae954d | 2020-10-20 15:57:42 +0000 | [diff] [blame] | 77 | |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 78 | volumeMounts: |
| 79 | - mountPath: /config-input |
| 80 | name: config-input |
| 81 | - mountPath: /config |
| 82 | name: properties |
Sylvain Desbureaux | cbc703c | 2020-11-19 17:52:07 +0100 | [diff] [blame] | 83 | image: {{ include "repositoryGenerator.image.envsubst" . }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 84 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 85 | name: {{ include "common.name" . }}-update-config |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 86 | {{ if .Values.dgbuilder.enabled -}} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 87 | - command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 88 | - /app/ready.py |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 89 | args: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 90 | {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 91 | - --container-name |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 92 | - {{ include "common.mariadbService" . }} |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 93 | {{ end -}} |
| 94 | {{ if .Values.config.sdnr.enabled -}} |
| 95 | - --container-name |
| 96 | - {{ include "common.name" . }}-sdnrdb-init-job |
| 97 | {{ end -}} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 98 | env: |
| 99 | - name: NAMESPACE |
| 100 | valueFrom: |
| 101 | fieldRef: |
| 102 | apiVersion: v1 |
| 103 | fieldPath: metadata.namespace |
Sylvain Desbureaux | cbc703c | 2020-11-19 17:52:07 +0100 | [diff] [blame] | 104 | image: {{ include "repositoryGenerator.image.readiness" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 105 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 106 | name: {{ include "common.name" . }}-readiness |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 107 | {{ end -}} |
Krzysztof Opasiak | 8ab4547 | 2020-05-12 12:53:50 +0200 | [diff] [blame] | 108 | {{ include "common.certInitializer.initContainer" . | indent 6 }} |
Remigiusz Janeczek | 42177a1 | 2020-12-10 13:10:15 +0100 | [diff] [blame] | 109 | {{ include "common.certServiceClient.initContainer" . | indent 6 }} |
| 110 | - name: {{ include "common.name" . }}-chown |
Sylvain Desbureaux | cbc703c | 2020-11-19 17:52:07 +0100 | [diff] [blame] | 111 | image: {{ include "repositoryGenerator.image.busybox" . }} |
Lucjan Bryndza | 5c63e93 | 2020-06-25 08:43:23 +0000 | [diff] [blame] | 112 | command: |
| 113 | - sh |
| 114 | args: |
| 115 | - -c |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 116 | - | |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 117 | mkdir {{ .Values.persistence.mdsalPath }}/journal |
Remigiusz Janeczek | 42177a1 | 2020-12-10 13:10:15 +0100 | [diff] [blame] | 118 | mkdir {{ .Values.persistence.mdsalPath }}/snapshots |
demskeq8 | 3b3b7fd | 2021-02-18 09:41:59 +0100 | [diff] [blame] | 119 | mkdir {{ .Values.persistence.mdsalPath }}/daexim |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 120 | chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} |
Lucjan Bryndza | 5c63e93 | 2020-06-25 08:43:23 +0000 | [diff] [blame] | 121 | {{- if .Values.global.aafEnabled }} |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 122 | chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }} |
Lucjan Bryndza | 5c63e93 | 2020-06-25 08:43:23 +0000 | [diff] [blame] | 123 | {{- end }} |
Timoney, Dan (dt5972) | ba4d2eb | 2019-05-07 13:32:42 -0400 | [diff] [blame] | 124 | volumeMounts: |
Krzysztof Opasiak | 8ab4547 | 2020-05-12 12:53:50 +0200 | [diff] [blame] | 125 | {{ include "common.certInitializer.volumeMount" . | indent 10 }} |
Timoney, Dan (dt5972) | ba4d2eb | 2019-05-07 13:32:42 -0400 | [diff] [blame] | 126 | - mountPath: {{ .Values.persistence.mdsalPath }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 127 | name: {{ include "common.fullname" . }}-data |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 128 | containers: |
| 129 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | cbc703c | 2020-11-19 17:52:07 +0100 | [diff] [blame] | 130 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 131 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Piotr Marcinkiewicz | af82e2b | 2021-02-11 11:23:31 +0100 | [diff] [blame] | 132 | {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }} |
| 133 | {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }} |
| 134 | lifecycle: |
| 135 | postStart: |
| 136 | exec: |
| 137 | command: ["sh", "-c", {{$linkCommand | quote}} ] |
| 138 | {{- end }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 139 | command: ["/bin/bash"] |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 140 | args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"] |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 141 | ports: |
| 142 | - containerPort: {{ .Values.service.internalPort }} |
| 143 | - containerPort: {{ .Values.service.internalPort2 }} |
| 144 | - containerPort: {{ .Values.service.internalPort3 }} |
| 145 | - containerPort: {{ .Values.service.clusterPort }} |
| 146 | readinessProbe: |
| 147 | tcpSocket: |
| 148 | port: {{ .Values.service.internalPort }} |
| 149 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 150 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 151 | env: |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 152 | - name: MYSQL_ROOT_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 153 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 154 | - name: ODL_ADMIN_USERNAME |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 155 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 156 | - name: ODL_ADMIN_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 157 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 158 | - name: SDNC_DB_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 159 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 160 | - name: SDNC_DB_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 161 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 162 | - name: SDNC_CONFIG_DIR |
| 163 | value: "{{ .Values.config.configDir }}" |
| 164 | - name: ENABLE_ODL_CLUSTER |
| 165 | value: "{{ .Values.config.enableClustering }}" |
| 166 | - name: MY_ODL_CLUSTER |
| 167 | value: "{{ .Values.config.myODLCluster }}" |
| 168 | - name: PEER_ODL_CLUSTER |
| 169 | value: "{{ .Values.config.peerODLCluster }}" |
| 170 | - name: IS_PRIMARY_CLUSTER |
| 171 | value: "{{ .Values.config.isPrimaryCluster }}" |
| 172 | - name: GEO_ENABLED |
| 173 | value: "{{ .Values.config.geoEnabled}}" |
| 174 | - name: SDNC_AAF_ENABLED |
| 175 | value: "{{ .Values.global.aafEnabled}}" |
| 176 | - name: SDNC_REPLICAS |
| 177 | value: "{{ .Values.replicaCount }}" |
| 178 | - name: MYSQL_HOST |
| 179 | value: {{ include "common.mariadbService" . }} |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 180 | - name: MDSAL_PATH |
| 181 | value: {{ .Values.persistence.mdsalPath }} |
| 182 | - name: DAEXIM_PATH |
| 183 | value: {{ .Values.persistence.daeximPath }} |
| 184 | - name: JOURNAL_PATH |
| 185 | value: {{ .Values.persistence.journalPath }} |
| 186 | - name: SNAPSHOTS_PATH |
| 187 | value: {{ .Values.persistence.snapshotsPath }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 188 | - name: JAVA_HOME |
| 189 | value: "{{ .Values.config.javaHome}}" |
Dan Timoney | a98765b | 2020-09-14 11:57:55 -0400 | [diff] [blame] | 190 | - name: JAVA_OPTS |
| 191 | value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}" |
Sylvain Desbureaux | bcf7251 | 2020-07-22 10:45:18 +0200 | [diff] [blame] | 192 | - name: KARAF_CONSOLE_LOG_LEVEL |
| 193 | value: "{{ include "common.log.level" . }}" |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 194 | - name: SDNRWT |
| 195 | value: "{{ .Values.config.sdnr.enabled | default "false"}}" |
| 196 | {{- if eq .Values.config.sdnr.mode "web" }} |
| 197 | - name: SDNRDM |
| 198 | value: "true" |
| 199 | {{- end }} |
| 200 | - name: SDNRONLY |
| 201 | value: "{{ .Values.config.sdnr.sdnronly | default "false" }}" |
| 202 | - name: SDNRDBURL |
| 203 | {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}} |
| 204 | value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}" |
| 205 | {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }} |
| 206 | - name: SDNRDBTRUSTALLCERTS |
| 207 | value: "true" |
Piotr Marcinkiewicz | af82e2b | 2021-02-11 11:23:31 +0100 | [diff] [blame] | 208 | {{- end }} |
| 209 | {{- if .Values.global.cmpv2Enabled }} |
| 210 | - name: ODL_CERT_DIR |
| 211 | value: {{ (mustFirst (.Values.certificates)).mountPath }} |
| 212 | {{- end }} |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 213 | |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 214 | volumeMounts: |
Krzysztof Opasiak | 8ab4547 | 2020-05-12 12:53:50 +0200 | [diff] [blame] | 215 | {{ include "common.certInitializer.volumeMount" . | indent 10 }} |
Remigiusz Janeczek | 42177a1 | 2020-12-10 13:10:15 +0100 | [diff] [blame] | 216 | {{ include "common.certServiceClient.volumeMounts" . | indent 10 }} |
Piotr Marcinkiewicz | 5957101 | 2021-01-12 17:37:08 +0100 | [diff] [blame] | 217 | {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }} |
| 218 | {{ include "common.certManager.volumeMounts" . | indent 10 }} |
| 219 | {{- end }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 220 | - mountPath: /etc/localtime |
| 221 | name: localtime |
| 222 | readOnly: true |
| 223 | - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg |
| 224 | name: sdnc-logging-cfg-config |
| 225 | subPath: org.ops4j.pax.logging.cfg |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 226 | - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh |
| 227 | name: bin |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 228 | subPath: installSdncDb.sh |
Dan Timoney | 2ee28a5 | 2021-01-15 16:39:50 -0500 | [diff] [blame] | 229 | - mountPath: {{ .Values.config.binDir }}/createLinks.sh |
| 230 | name: bin |
| 231 | subPath: createLinks.sh |
Konrad Bańka | 5ea1db3 | 2020-04-06 14:32:46 +0200 | [diff] [blame] | 232 | - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties |
| 233 | name: properties |
| 234 | subPath: aaiclient.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 235 | - mountPath: {{ .Values.config.configDir }}/aaiclient.properties |
| 236 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 237 | subPath: aaiclient.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 238 | - mountPath: {{ .Values.config.configDir }}/dblib.properties |
| 239 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 240 | subPath: dblib.properties |
jmac | 7c43467 | 2018-05-11 20:14:17 +0000 | [diff] [blame] | 241 | - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties |
| 242 | name: properties |
| 243 | subPath: lcm-dg.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 244 | - mountPath: {{ .Values.config.configDir }}/svclogic.properties |
| 245 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 246 | subPath: svclogic.properties |
| 247 | - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 248 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 249 | subPath: svclogic.properties |
Alexis de Talhouët | 43c67e0 | 2018-09-20 16:49:16 -0400 | [diff] [blame] | 250 | - mountPath: {{ .Values.config.configDir }}/netbox.properties |
| 251 | name: properties |
| 252 | subPath: netbox.properties |
| 253 | - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties |
| 254 | name: properties |
| 255 | subPath: blueprints-processor-adaptor.properties |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 256 | - mountPath: {{ .Values.persistence.mdsalPath }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 257 | name: {{ include "common.fullname" . }}-data |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 258 | - mountPath: /var/log/onap |
| 259 | name: logs |
Timoney, Dan (dt5972) | 5877477 | 2019-08-21 16:50:54 -0400 | [diff] [blame] | 260 | - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml |
| 261 | name: properties |
| 262 | subPath: akka.conf |
| 263 | - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg |
| 264 | name: properties |
| 265 | subPath: org.opendaylight.controller.cluster.datastore.cfg |
Dan Timoney | 9520e7c | 2021-01-12 11:10:58 -0500 | [diff] [blame] | 266 | - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg |
| 267 | name: properties |
| 268 | subPath: org.opendaylight.aaa.filterchain.cfg |
Timoney, Dan (dt5972) | 5877477 | 2019-08-21 16:50:54 -0400 | [diff] [blame] | 269 | - mountPath: {{ .Values.config.odl.binDir }}/setenv |
| 270 | name: properties |
| 271 | subPath: setenv |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 272 | - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties |
| 273 | name: properties |
| 274 | subPath: mountpoint-registrar.properties |
| 275 | - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties |
| 276 | name: properties |
| 277 | subPath: mountpoint-state-provider.properties |
demskeq8 | a86300a | 2021-02-10 09:53:33 +0100 | [diff] [blame] | 278 | - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg |
| 279 | name: properties |
| 280 | subPath: org.opendaylight.daexim.cfg |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 281 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 282 | {{ include "common.resources" . | indent 12 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 283 | {{- if .Values.nodeSelector }} |
| 284 | nodeSelector: |
| 285 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 286 | {{- end -}} |
| 287 | {{- if .Values.affinity }} |
| 288 | affinity: |
| 289 | {{ toYaml .Values.affinity | indent 10 }} |
| 290 | {{- end }} |
| 291 | |
| 292 | # side car containers |
| 293 | - name: filebeat-onap |
Sylvain Desbureaux | cbc703c | 2020-11-19 17:52:07 +0100 | [diff] [blame] | 294 | image: {{ include "repositoryGenerator.image.logging" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 295 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 296 | volumeMounts: |
| 297 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 298 | name: filebeat-conf |
| 299 | subPath: filebeat.yml |
| 300 | - mountPath: /var/log/onap |
| 301 | name: logs |
| 302 | - mountPath: /usr/share/filebeat/data |
| 303 | name: data-filebeat |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 304 | imagePullSecrets: |
| 305 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 306 | volumes: |
| 307 | - name: localtime |
| 308 | hostPath: |
| 309 | path: /etc/localtime |
| 310 | - name: logs |
| 311 | emptyDir: {} |
| 312 | - name: data-filebeat |
| 313 | emptyDir: {} |
| 314 | - name: filebeat-conf |
| 315 | configMap: |
| 316 | name: {{ include "common.fullname" . }}-filebeat-configmap |
| 317 | - name: sdnc-logging-cfg-config |
| 318 | configMap: |
| 319 | name: {{ include "common.fullname" . }}-log-configmap |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 320 | - name: bin |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 321 | configMap: |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 322 | name: {{ include "common.fullname" . }}-bin |
| 323 | defaultMode: 0755 |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 324 | - name: config-input |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 325 | configMap: |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 326 | name: {{ include "common.fullname" . }}-properties |
| 327 | defaultMode: 0644 |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 328 | - name: properties |
| 329 | emptyDir: |
| 330 | medium: Memory |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 331 | {{ if not .Values.persistence.enabled }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 332 | - name: {{ include "common.fullname" . }}-data |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 333 | emptyDir: {} |
| 334 | {{ else }} |
Krzysztof Opasiak | 8ab4547 | 2020-05-12 12:53:50 +0200 | [diff] [blame] | 335 | {{ include "common.certInitializer.volumes" . | nindent 8 }} |
Remigiusz Janeczek | 42177a1 | 2020-12-10 13:10:15 +0100 | [diff] [blame] | 336 | {{ include "common.certServiceClient.volumes" . | nindent 8 }} |
Piotr Marcinkiewicz | 5957101 | 2021-01-12 17:37:08 +0100 | [diff] [blame] | 337 | {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }} |
| 338 | {{ include "common.certManager.volumes" . | nindent 8 }} |
| 339 | {{- end }} |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 340 | volumeClaimTemplates: |
| 341 | - metadata: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 342 | name: {{ include "common.fullname" . }}-data |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 343 | labels: |
| 344 | name: {{ include "common.fullname" . }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 345 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 346 | release: "{{ include "common.release" . }}" |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 347 | heritage: "{{ .Release.Service }}" |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 348 | spec: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 349 | accessModes: |
| 350 | - {{ .Values.persistence.accessMode }} |
| 351 | storageClassName: {{ include "common.storageClass" . }} |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 352 | resources: |
| 353 | requests: |
| 354 | storage: {{ .Values.persistence.size }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 355 | {{- end }} |