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