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 | |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 25 | spec: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 26 | replicas: {{ .Values.replicaCount }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 27 | selector: |
| 28 | matchLabels: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 29 | app: {{ include "common.name" . }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 30 | template: |
| 31 | metadata: |
| 32 | labels: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 33 | app: {{ include "common.name" . }} |
| 34 | release: {{ .Release.Name }} |
| 35 | name: {{ include "common.name" . }} |
AdrianSlavkovsky | 03cc589 | 2018-03-08 09:55:53 +0100 | [diff] [blame] | 36 | annotations: |
Harish V Kajur | 8e7cbd2 | 2018-05-07 14:02:46 +0000 | [diff] [blame] | 37 | checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
AdrianSlavkovsky | 03cc589 | 2018-03-08 09:55:53 +0100 | [diff] [blame] | 38 | msb.onap.org/service-info: '[ |
| 39 | { |
| 40 | "serviceName": "_aai-generic-query", |
| 41 | "version": "v11", |
| 42 | "url": "/aai/v11/search/generic-query", |
| 43 | "protocol": "REST", |
| 44 | "port": "8446", |
| 45 | "enable_ssl": true, |
| 46 | "lb_policy":"ip_hash", |
| 47 | "visualRange": "1", |
| 48 | "path": "/aai/v11/search/generic-query" |
| 49 | }, |
| 50 | { |
| 51 | "serviceName": "_aai-generic-query", |
| 52 | "version": "v12", |
| 53 | "url": "/aai/v12/search/generic-query", |
| 54 | "protocol": "REST", |
| 55 | "port": "8446", |
| 56 | "enable_ssl": true, |
| 57 | "lb_policy":"ip_hash", |
| 58 | "visualRange": "1", |
| 59 | "path": "/aai/v12/search/generic-query" |
| 60 | }, |
| 61 | { |
| 62 | "serviceName": "_aai-generic-query", |
| 63 | "version": "v13", |
| 64 | "url": "/aai/v13/search/generic-query", |
| 65 | "protocol": "REST", |
| 66 | "port": "8446", |
| 67 | "enable_ssl": true, |
| 68 | "lb_policy":"ip_hash", |
| 69 | "visualRange": "1", |
| 70 | "path": "/aai/v13/search/generic-query" |
| 71 | }, |
| 72 | { |
| 73 | "serviceName": "_aai-nodes-query", |
| 74 | "version": "v11", |
| 75 | "url": "/aai/v11/search/nodes-query", |
| 76 | "protocol": "REST", |
| 77 | "port": "8446", |
| 78 | "enable_ssl": true, |
| 79 | "lb_policy":"ip_hash", |
| 80 | "visualRange": "1", |
| 81 | "path": "/aai/v11/search/nodes-query" |
| 82 | }, |
| 83 | { |
| 84 | "serviceName": "_aai-nodes-query", |
| 85 | "version": "v12", |
| 86 | "url": "/aai/v12/search/nodes-query", |
| 87 | "protocol": "REST", |
| 88 | "port": "8446", |
| 89 | "enable_ssl": true, |
| 90 | "lb_policy":"ip_hash", |
| 91 | "visualRange": "1", |
| 92 | "path": "/aai/v12/search/nodes-query" |
| 93 | }, |
| 94 | { |
| 95 | "serviceName": "_aai-nodes-query", |
| 96 | "version": "v13", |
| 97 | "url": "/aai/v13/search/nodes-query", |
| 98 | "protocol": "REST", |
| 99 | "port": "8446", |
| 100 | "enable_ssl": true, |
| 101 | "lb_policy":"ip_hash", |
| 102 | "visualRange": "1", |
| 103 | "path": "/aai/v13/search/nodes-query" |
| 104 | }, |
| 105 | { |
| 106 | "serviceName": "_aai-query", |
| 107 | "version": "v11", |
| 108 | "url": "/aai/v11/query", |
| 109 | "protocol": "REST", |
| 110 | "port": "8446", |
| 111 | "enable_ssl": true, |
| 112 | "lb_policy":"ip_hash", |
| 113 | "visualRange": "1", |
| 114 | "path": "/aai/v11/query" |
| 115 | }, |
| 116 | { |
| 117 | "serviceName": "_aai-query", |
| 118 | "version": "v12", |
| 119 | "url": "/aai/v12/query", |
| 120 | "protocol": "REST", |
| 121 | "port": "8446", |
| 122 | "enable_ssl": true, |
| 123 | "lb_policy":"ip_hash", |
| 124 | "visualRange": "1", |
| 125 | "path": "/aai/v12/query" |
| 126 | }, |
| 127 | { |
| 128 | "serviceName": "_aai-query", |
| 129 | "version": "v13", |
| 130 | "url": "/aai/v13/query", |
| 131 | "protocol": "REST", |
| 132 | "port": "8446", |
| 133 | "enable_ssl": true, |
| 134 | "lb_policy":"ip_hash", |
| 135 | "visualRange": "1", |
| 136 | "path": "/aai/v13/query" |
| 137 | }, |
| 138 | { |
| 139 | "serviceName": "_aai-named-query", |
| 140 | "url": "/aai/search", |
| 141 | "protocol": "REST", |
| 142 | "port": "8446", |
| 143 | "enable_ssl": true, |
| 144 | "lb_policy":"ip_hash", |
| 145 | "visualRange": "1", |
| 146 | "path": "/aai/search" |
| 147 | }, |
| 148 | { |
| 149 | "serviceName": "aai-generic-query", |
| 150 | "version": "v11", |
| 151 | "url": "/aai/v11/search/generic-query", |
| 152 | "protocol": "REST", |
| 153 | "port": "8446", |
| 154 | "enable_ssl": true, |
| 155 | "lb_policy":"ip_hash", |
| 156 | "visualRange": "1" |
| 157 | }, |
| 158 | { |
| 159 | "serviceName": "aai-generic-query", |
| 160 | "version": "v12", |
| 161 | "url": "/aai/v12/search/generic-query", |
| 162 | "protocol": "REST", |
| 163 | "port": "8446", |
| 164 | "enable_ssl": true, |
| 165 | "lb_policy":"ip_hash", |
| 166 | "visualRange": "1" |
| 167 | }, |
| 168 | { |
| 169 | "serviceName": "aai-generic-query", |
| 170 | "version": "v13", |
| 171 | "url": "/aai/v13/search/generic-query", |
| 172 | "protocol": "REST", |
| 173 | "port": "8446", |
| 174 | "enable_ssl": true, |
| 175 | "lb_policy":"ip_hash", |
| 176 | "visualRange": "1" |
| 177 | }, |
| 178 | { |
| 179 | "serviceName": "aai-nodes-query", |
| 180 | "version": "v11", |
| 181 | "url": "/aai/v11/search/nodes-query", |
| 182 | "protocol": "REST", |
| 183 | "port": "8446", |
| 184 | "enable_ssl": true, |
| 185 | "lb_policy":"ip_hash", |
| 186 | "visualRange": "1" |
| 187 | }, |
| 188 | { |
| 189 | "serviceName": "aai-nodes-query", |
| 190 | "version": "v12", |
| 191 | "url": "/aai/v12/search/nodes-query", |
| 192 | "protocol": "REST", |
| 193 | "port": "8446", |
| 194 | "enable_ssl": true, |
| 195 | "lb_policy":"ip_hash", |
| 196 | "visualRange": "1" |
| 197 | }, |
| 198 | { |
| 199 | "serviceName": "aai-nodes-query", |
| 200 | "version": "v13", |
| 201 | "url": "/aai/v13/search/nodes-query", |
| 202 | "protocol": "REST", |
| 203 | "port": "8446", |
| 204 | "enable_ssl": true, |
| 205 | "lb_policy":"ip_hash", |
| 206 | "visualRange": "1" |
| 207 | }, |
| 208 | { |
| 209 | "serviceName": "aai-query", |
| 210 | "version": "v11", |
| 211 | "url": "/aai/v11/query", |
| 212 | "protocol": "REST", |
| 213 | "port": "8446", |
| 214 | "enable_ssl": true, |
| 215 | "lb_policy":"ip_hash", |
| 216 | "visualRange": "1" |
| 217 | }, |
| 218 | { |
| 219 | "serviceName": "aai-query", |
| 220 | "version": "v12", |
| 221 | "url": "/aai/v12/query", |
| 222 | "protocol": "REST", |
| 223 | "port": "8446", |
| 224 | "enable_ssl": true, |
| 225 | "lb_policy":"ip_hash", |
| 226 | "visualRange": "1" |
| 227 | }, |
| 228 | { |
| 229 | "serviceName": "aai-query", |
| 230 | "version": "v13", |
| 231 | "url": "/aai/v13/query", |
| 232 | "protocol": "REST", |
| 233 | "port": "8446", |
| 234 | "enable_ssl": true, |
| 235 | "lb_policy":"ip_hash", |
| 236 | "visualRange": "1" |
| 237 | }, |
| 238 | { |
| 239 | "serviceName": "aai-named-query", |
| 240 | "url": "/aai/search", |
| 241 | "protocol": "REST", |
| 242 | "port": "8446", |
| 243 | "enable_ssl": true, |
| 244 | "lb_policy":"ip_hash", |
| 245 | "visualRange": "1" |
| 246 | } |
| 247 | ]' |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 248 | spec: |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 249 | hostname: aai-traversal |
kiranya | 52a5783 | 2017-11-22 12:21:55 +0000 | [diff] [blame] | 250 | initContainers: |
| 251 | - command: |
| 252 | - /root/ready.py |
| 253 | args: |
| 254 | - --container-name |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 255 | - aai-cassandra |
| 256 | - --container-name |
kiranya | 52a5783 | 2017-11-22 12:21:55 +0000 | [diff] [blame] | 257 | - aai-resources |
| 258 | env: |
| 259 | - name: NAMESPACE |
| 260 | valueFrom: |
| 261 | fieldRef: |
| 262 | apiVersion: v1 |
| 263 | fieldPath: metadata.namespace |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 264 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 265 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 266 | name: {{ include "common.name" . }}-readiness |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 267 | containers: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 268 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 269 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 270 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 271 | env: |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 272 | - name: DISABLE_UPDATE_QUERY |
| 273 | value: {{ .Values.config.disableUpdateQuery | quote }} |
| 274 | - name: LOCAL_USER_ID |
| 275 | value: {{ .Values.config.userId | quote }} |
| 276 | - name: LOCAL_GROUP_ID |
| 277 | value: {{ .Values.config.groupId | quote }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 278 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 279 | - mountPath: /etc/localtime |
| 280 | name: localtime |
| 281 | readOnly: true |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 282 | - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties |
| 283 | name: {{ include "common.fullname" . }}-db-real-conf |
| 284 | subPath: janusgraph-realtime.properties |
| 285 | - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties |
| 286 | name: {{ include "common.fullname" . }}-db-cached-conf |
| 287 | subPath: janusgraph-cached.properties |
| 288 | - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties |
| 289 | name: {{ include "common.fullname" . }}-aaiconfig-conf |
| 290 | subPath: aaiconfig.properties |
Harish V Kajur | 8e7cbd2 | 2018-05-07 14:02:46 +0000 | [diff] [blame] | 291 | - mountPath: /opt/aai/logroot/AAI-GQ |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 292 | name: {{ include "common.fullname" . }}-logs |
| 293 | - mountPath: /opt/app/aai-traversal/resources/logback.xml |
| 294 | name: {{ include "common.fullname" . }}-log-conf |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 295 | subPath: logback.xml |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 296 | - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml |
| 297 | name: {{ include "common.fullname" . }}-localhost-access-log-conf |
| 298 | subPath: localhost-access-logback.xml |
| 299 | - mountPath: /opt/app/aai-traversal/resources/application.properties |
| 300 | name: {{ include "common.fullname" . }}-springapp-conf |
| 301 | subPath: application.properties |
| 302 | - mountPath: /opt/app/aai-traversal/resources/etc/auth/aai_keystore |
| 303 | name: {{ include "common.fullname" . }}-auth-sec |
| 304 | subPath: aai_keystore |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 305 | ports: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 306 | - containerPort: {{ .Values.service.internalPort }} |
| 307 | - containerPort: {{ .Values.service.internalPort2 }} |
| 308 | # disable liveness probe when breakpoints set in debugger |
| 309 | # so K8s doesn't restart unresponsive container |
| 310 | {{ if .Values.liveness.enabled }} |
| 311 | livenessProbe: |
| 312 | tcpSocket: |
| 313 | port: {{ .Values.service.internalPort }} |
| 314 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 315 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 316 | {{ end }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 317 | readinessProbe: |
| 318 | tcpSocket: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 319 | port: {{ .Values.service.internalPort }} |
| 320 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 321 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 322 | resources: |
| 323 | {{ toYaml .Values.resources | indent 10 }} |
| 324 | {{- if .Values.nodeSelector }} |
| 325 | nodeSelector: |
| 326 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 327 | {{- end -}} |
| 328 | {{- if .Values.affinity }} |
| 329 | affinity: |
| 330 | {{ toYaml .Values.affinity | indent 8 }} |
| 331 | {{- end }} |
| 332 | |
| 333 | # side car containers |
| 334 | - name: filebeat-onap |
| 335 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 336 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 337 | volumeMounts: |
| 338 | - mountPath: /usr/share/filebeat/filebeat.yml |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 339 | subPath: filebeat.yml |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 340 | name: filebeat-conf |
| 341 | - mountPath: /var/log/onap |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 342 | name: {{ include "common.fullname" . }}-logs |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 343 | - mountPath: /usr/share/filebeat/data |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 344 | name: {{ include "common.fullname" . }}-filebeat |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 345 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 346 | - name: localtime |
| 347 | hostPath: |
| 348 | path: /etc/localtime |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 349 | - name: filebeat-conf |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 350 | configMap: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 351 | name: aai-filebeat |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 352 | - name: {{ include "common.fullname" . }}-logs |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 353 | emptyDir: {} |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 354 | - name: {{ include "common.fullname" . }}-filebeat |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 355 | emptyDir: {} |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 356 | - name: {{ include "common.fullname" . }}-log-conf |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 357 | configMap: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 358 | name: {{ include "common.fullname" . }}-log |
vagrant | 1a3a355 | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 359 | - name: {{ include "common.fullname" . }}-localhost-access-log-conf |
| 360 | configMap: |
| 361 | name: {{ include "common.fullname" . }}-localhost-access-log-configmap |
| 362 | - name: {{ include "common.fullname" . }}-db-real-conf |
| 363 | configMap: |
| 364 | name: {{ include "common.fullname" . }}-db-real-configmap |
| 365 | - name: {{ include "common.fullname" . }}-db-cached-conf |
| 366 | configMap: |
| 367 | name: {{ include "common.fullname" . }}-db-cached-configmap |
| 368 | - name: {{ include "common.fullname" . }}-aaiconfig-conf |
| 369 | configMap: |
| 370 | name: {{ include "common.fullname" . }}-aaiconfig-configmap |
| 371 | - name: {{ include "common.fullname" . }}-springapp-conf |
| 372 | configMap: |
| 373 | name: {{ include "common.fullname" . }}-springapp-configmap |
| 374 | - name: {{ include "common.fullname" . }}-realm-conf |
| 375 | configMap: |
| 376 | name: {{ include "common.fullname" . }}-realm-configmap |
| 377 | - name: {{ include "common.fullname" . }}-auth-sec |
| 378 | secret: |
Kajur, Harish (vk250x) | 450e363 | 2018-04-26 11:26:45 -0400 | [diff] [blame] | 379 | secretName: aai-auth-secret |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 380 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 381 | imagePullSecrets: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 382 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |