Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 1 | {{/* |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 15 | */}} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 16 | |
| 17 | apiVersion: apps/v1beta1 |
| 18 | kind: StatefulSet |
| 19 | metadata: |
| 20 | name: {{ include "common.fullname" . }} |
| 21 | namespace: {{ include "common.namespace" . }} |
| 22 | labels: |
| 23 | app: {{ include "common.name" . }} |
| 24 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 25 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 26 | heritage: {{ .Release.Service }} |
| 27 | spec: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 28 | serviceName: {{ include "common.servicename" . }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 29 | replicas: {{ .Values.replicaCount }} |
| 30 | podManagementPolicy: Parallel |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 35 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 36 | spec: |
| 37 | initContainers: |
| 38 | - command: |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 39 | - sh |
| 40 | args: |
| 41 | - -c |
| 42 | - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done" |
| 43 | env: |
| 44 | - name: AAI_CLIENT_NAME |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 45 | {{- 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] | 46 | - name: AAI_CLIENT_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 47 | {{- 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] | 48 | - name: MODELSERVICE_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 49 | {{- 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] | 50 | - name: MODELSERVICE_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 51 | {{- 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] | 52 | - name: RESTCONF_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 53 | {{- 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] | 54 | - name: RESTCONF_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 55 | {{- 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] | 56 | - name: ANSIBLE_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 57 | {{- 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] | 58 | - name: ANSIBLE_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 59 | {{- 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] | 60 | - name: SCALEOUT_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 61 | {{- 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] | 62 | - name: SCALEOUT_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 63 | {{- 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] | 64 | - name: NETBOX_APIKEY |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 65 | {{- 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] | 66 | - name: SDNC_DB_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 67 | {{- 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] | 68 | - name: SDNC_DB_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 69 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }} |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 70 | volumeMounts: |
| 71 | - mountPath: /config-input |
| 72 | name: config-input |
| 73 | - mountPath: /config |
| 74 | name: properties |
| 75 | image: "{{ .Values.global.envsubstImage }}" |
| 76 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 77 | name: {{ include "common.name" . }}-update-config |
| 78 | |
| 79 | - command: |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 80 | - /root/ready.py |
| 81 | args: |
| 82 | - --container-name |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 83 | - {{ include "common.mariadbService" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 84 | env: |
| 85 | - name: NAMESPACE |
| 86 | valueFrom: |
| 87 | fieldRef: |
| 88 | apiVersion: v1 |
| 89 | fieldPath: metadata.namespace |
| 90 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 91 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 92 | name: {{ include "common.name" . }}-readiness |
Agarwal, Ruchira (ra1926) | ec7c75e | 2019-10-01 17:36:24 +0000 | [diff] [blame] | 93 | {{ if .Values.global.aafEnabled }} |
| 94 | - name: {{ include "common.name" . }}-aaf-readiness |
| 95 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 96 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 97 | command: |
| 98 | - /root/ready.py |
| 99 | args: |
| 100 | - --container-name |
| 101 | - aaf-locate |
| 102 | env: |
| 103 | - name: NAMESPACE |
| 104 | valueFrom: |
| 105 | fieldRef: |
| 106 | apiVersion: v1 |
| 107 | fieldPath: metadata.namespace |
| 108 | - name: {{ include "common.name" . }}-aaf |
| 109 | image: {{ .Values.global.repository }}/{{ .Values.aaf_init.agentImage }} |
| 110 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 111 | volumeMounts: |
| 112 | - mountPath: {{ .Values.certpersistence.certPath }} |
| 113 | name: {{ include "common.fullname" . }}-certs |
| 114 | command: |
| 115 | - bash |
| 116 | - -c |
| 117 | - | |
| 118 | /opt/app/aaf_config/bin/agent.sh && |
| 119 | cd /opt/app/osaaf/local && |
| 120 | /opt/app/aaf_config/bin/agent.sh local showpass | grep cadi_keystore_password= | cut -d= -f 2 > /opt/app/osaaf/local/.pass 2>&1 |
| 121 | env: |
| 122 | - name: APP_FQI |
| 123 | value: "{{ .Values.aaf_init.fqi }}" |
| 124 | - name: aaf_locate_url |
| 125 | value: "https://aaf-locate.{{ .Release.Namespace}}:8095" |
| 126 | - name: aaf_locator_container |
| 127 | value: "oom" |
| 128 | - name: aaf_locator_container_ns |
| 129 | value: "{{ .Release.Namespace }}" |
| 130 | - name: aaf_locator_fqdn |
| 131 | value: "{{ .Values.aaf_init.fqdn }}" |
| 132 | - name: aaf_locator_app_ns |
| 133 | value: "{{ .Values.aaf_init.app_ns }}" |
| 134 | - name: DEPLOY_FQI |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 135 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aaf-creds" "key" "login") | indent 12 }} |
Agarwal, Ruchira (ra1926) | ec7c75e | 2019-10-01 17:36:24 +0000 | [diff] [blame] | 136 | - name: DEPLOY_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 137 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aaf-creds" "key" "password") | indent 12 }} |
Agarwal, Ruchira (ra1926) | ec7c75e | 2019-10-01 17:36:24 +0000 | [diff] [blame] | 138 | - name: cadi_longitude |
| 139 | value: "{{ .Values.aaf_init.cadi_longitude }}" |
| 140 | - name: cadi_latitude |
| 141 | value: "{{ .Values.aaf_init.cadi_latitude }}" |
| 142 | {{ end }} |
Timoney, Dan (dt5972) | ba4d2eb | 2019-05-07 13:32:42 -0400 | [diff] [blame] | 143 | - name: {{ include "common.name" . }}-chown |
| 144 | image: "busybox" |
| 145 | command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} ; chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certpersistence.certPath }}"] |
| 146 | volumeMounts: |
| 147 | - mountPath: {{ .Values.persistence.mdsalPath }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 148 | name: {{ include "common.fullname" . }}-data |
Timoney, Dan (dt5972) | ba4d2eb | 2019-05-07 13:32:42 -0400 | [diff] [blame] | 149 | - mountPath: {{ .Values.certpersistence.certPath }} |
| 150 | name: {{ include "common.fullname" . }}-certs |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 151 | containers: |
| 152 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 153 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 154 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 155 | command: ["/bin/bash"] |
| 156 | args: ["-c", "/opt/sdnc/bin/startODL.sh"] |
| 157 | ports: |
| 158 | - containerPort: {{ .Values.service.internalPort }} |
| 159 | - containerPort: {{ .Values.service.internalPort2 }} |
| 160 | - containerPort: {{ .Values.service.internalPort3 }} |
| 161 | - containerPort: {{ .Values.service.clusterPort }} |
| 162 | readinessProbe: |
| 163 | tcpSocket: |
| 164 | port: {{ .Values.service.internalPort }} |
| 165 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 166 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 167 | env: |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 168 | - name: MYSQL_ROOT_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 169 | {{- 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] | 170 | - name: ODL_ADMIN_USERNAME |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 171 | {{- 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] | 172 | - name: ODL_ADMIN_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 173 | {{- 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] | 174 | - name: SDNC_DB_USER |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 175 | {{- 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] | 176 | - name: SDNC_DB_PASSWORD |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 177 | {{- 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] | 178 | - name: SDNC_CONFIG_DIR |
| 179 | value: "{{ .Values.config.configDir }}" |
| 180 | - name: ENABLE_ODL_CLUSTER |
| 181 | value: "{{ .Values.config.enableClustering }}" |
| 182 | - name: MY_ODL_CLUSTER |
| 183 | value: "{{ .Values.config.myODLCluster }}" |
| 184 | - name: PEER_ODL_CLUSTER |
| 185 | value: "{{ .Values.config.peerODLCluster }}" |
| 186 | - name: IS_PRIMARY_CLUSTER |
| 187 | value: "{{ .Values.config.isPrimaryCluster }}" |
| 188 | - name: GEO_ENABLED |
| 189 | value: "{{ .Values.config.geoEnabled}}" |
| 190 | - name: SDNC_AAF_ENABLED |
| 191 | value: "{{ .Values.global.aafEnabled}}" |
| 192 | - name: SDNC_REPLICAS |
| 193 | value: "{{ .Values.replicaCount }}" |
| 194 | - name: MYSQL_HOST |
| 195 | value: {{ include "common.mariadbService" . }} |
| 196 | - name: JAVA_HOME |
| 197 | value: "{{ .Values.config.javaHome}}" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 198 | volumeMounts: |
| 199 | - mountPath: /etc/localtime |
| 200 | name: localtime |
| 201 | readOnly: true |
| 202 | - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg |
| 203 | name: sdnc-logging-cfg-config |
| 204 | subPath: org.ops4j.pax.logging.cfg |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 205 | - mountPath: {{ .Values.config.binDir }}/startODL.sh |
| 206 | name: bin |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 207 | subPath: startODL.sh |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 208 | - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh |
| 209 | name: bin |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 210 | subPath: installSdncDb.sh |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 211 | - mountPath: {{ .Values.config.configDir }}/aaiclient.properties |
| 212 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 213 | subPath: aaiclient.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 214 | - mountPath: {{ .Values.config.configDir }}/dblib.properties |
| 215 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 216 | subPath: dblib.properties |
jmac | 7c43467 | 2018-05-11 20:14:17 +0000 | [diff] [blame] | 217 | - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties |
| 218 | name: properties |
| 219 | subPath: lcm-dg.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 220 | - mountPath: {{ .Values.config.configDir }}/svclogic.properties |
| 221 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 222 | subPath: svclogic.properties |
| 223 | - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 224 | name: properties |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 225 | subPath: svclogic.properties |
Alexis de Talhouët | 43c67e0 | 2018-09-20 16:49:16 -0400 | [diff] [blame] | 226 | - mountPath: {{ .Values.config.configDir }}/netbox.properties |
| 227 | name: properties |
| 228 | subPath: netbox.properties |
| 229 | - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties |
| 230 | name: properties |
| 231 | subPath: blueprints-processor-adaptor.properties |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 232 | - mountPath: {{ .Values.persistence.mdsalPath }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 233 | name: {{ include "common.fullname" . }}-data |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 234 | - mountPath: /var/log/onap |
| 235 | name: logs |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 236 | - mountPath: {{ .Values.certpersistence.certPath }} |
| 237 | name: {{ include "common.fullname" . }}-certs |
Timoney, Dan (dt5972) | 5877477 | 2019-08-21 16:50:54 -0400 | [diff] [blame] | 238 | - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml |
| 239 | name: properties |
| 240 | subPath: akka.conf |
| 241 | - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg |
| 242 | name: properties |
| 243 | subPath: org.opendaylight.controller.cluster.datastore.cfg |
| 244 | - mountPath: {{ .Values.config.odl.binDir }}/setenv |
| 245 | name: properties |
| 246 | subPath: setenv |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 247 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 248 | {{ include "common.resources" . | indent 12 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 249 | {{- if .Values.nodeSelector }} |
| 250 | nodeSelector: |
| 251 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 252 | {{- end -}} |
| 253 | {{- if .Values.affinity }} |
| 254 | affinity: |
| 255 | {{ toYaml .Values.affinity | indent 10 }} |
| 256 | {{- end }} |
| 257 | |
| 258 | # side car containers |
| 259 | - name: filebeat-onap |
| 260 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 261 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 262 | volumeMounts: |
| 263 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 264 | name: filebeat-conf |
| 265 | subPath: filebeat.yml |
| 266 | - mountPath: /var/log/onap |
| 267 | name: logs |
| 268 | - mountPath: /usr/share/filebeat/data |
| 269 | name: data-filebeat |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 270 | imagePullSecrets: |
| 271 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 272 | volumes: |
| 273 | - name: localtime |
| 274 | hostPath: |
| 275 | path: /etc/localtime |
| 276 | - name: logs |
| 277 | emptyDir: {} |
| 278 | - name: data-filebeat |
| 279 | emptyDir: {} |
| 280 | - name: filebeat-conf |
| 281 | configMap: |
| 282 | name: {{ include "common.fullname" . }}-filebeat-configmap |
| 283 | - name: sdnc-logging-cfg-config |
| 284 | configMap: |
| 285 | name: {{ include "common.fullname" . }}-log-configmap |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 286 | - name: bin |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 287 | configMap: |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 288 | name: {{ include "common.fullname" . }}-bin |
| 289 | defaultMode: 0755 |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 290 | - name: config-input |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 291 | configMap: |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 292 | name: {{ include "common.fullname" . }}-properties |
| 293 | defaultMode: 0644 |
Krzysztof Opasiak | cc97c73 | 2020-02-25 23:31:20 +0100 | [diff] [blame] | 294 | - name: properties |
| 295 | emptyDir: |
| 296 | medium: Memory |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 297 | - name: {{ include "common.fullname" . }}-certs |
| 298 | {{ if .Values.certpersistence.enabled }} |
| 299 | persistentVolumeClaim: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 300 | claimName: {{ include "common.fullname" . }}-certs |
Rahul Tyagi | 44cc1ac | 2019-03-02 06:15:35 +0000 | [diff] [blame] | 301 | {{ else }} |
| 302 | emptyDir: {} |
| 303 | {{ end }} |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 304 | {{ if not .Values.persistence.enabled }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 305 | - name: {{ include "common.fullname" . }}-data |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 306 | emptyDir: {} |
| 307 | {{ else }} |
| 308 | volumeClaimTemplates: |
| 309 | - metadata: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 310 | name: {{ include "common.fullname" . }}-data |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 311 | labels: |
| 312 | name: {{ include "common.fullname" . }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 313 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 314 | release: "{{ include "common.release" . }}" |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 315 | heritage: "{{ .Release.Service }}" |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 316 | spec: |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 317 | accessModes: |
| 318 | - {{ .Values.persistence.accessMode }} |
| 319 | storageClassName: {{ include "common.storageClass" . }} |
jmac | 8d6dc96 | 2018-04-26 14:26:55 +0000 | [diff] [blame] | 320 | resources: |
| 321 | requests: |
| 322 | storage: {{ .Values.persistence.size }} |
Sylvain Desbureaux | 25e01d5 | 2019-12-09 11:06:39 +0100 | [diff] [blame] | 323 | {{- end }} |