kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 AT&T |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 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. |
| 15 | |
| 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ include "common.fullname" . }} |
| 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }} |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 24 | release: {{ .Release.Name }} |
| 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | selector: |
| 29 | matchLabels: |
| 30 | app: {{ include "common.name" . }} |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ include "common.name" . }} |
| 35 | release: {{ .Release.Name }} |
| 36 | name: {{ include "common.name" . }} |
| 37 | spec: |
| 38 | containers: |
| 39 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 40 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 41 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 42 | env: |
| 43 | - name: CONFIG_HOME |
| 44 | value: /opt/app/search-data-service/config/ |
| 45 | - name: KEY_STORE_PASSWORD |
| 46 | value: {{ .Values.config.keyStorePassword }} |
| 47 | - name: KEY_MANAGER_PASSWORD |
| 48 | value: {{ .Values.config.keyManagerPassword }} |
| 49 | volumeMounts: |
| 50 | - mountPath: /etc/localtime |
| 51 | name: localtime |
| 52 | readOnly: true |
| 53 | - mountPath: /opt/app/search-data-service/config/filter-config.json |
| 54 | subPath: filter-config.json |
| 55 | name: {{ include "common.fullname" . }}-service-config |
| 56 | - mountPath: /opt/app/search-data-service/config/elastic-search.properties |
| 57 | subPath: elastic-search.properties |
| 58 | name: {{ include "common.fullname" . }}-service-config |
| 59 | - mountPath: /opt/app/search-data-service/config/analysis-config.json |
Edwin Lawrance | 52b0c7e | 2018-07-16 19:55:15 +0100 | [diff] [blame] | 60 | subPath: analysis-config.json |
| 61 | name: {{ include "common.fullname" . }}-service-config |
| 62 | - mountPath: /opt/app/search-data-service/config/es-payload-translation.json |
| 63 | subPath: es-payload-translation.json |
| 64 | name: {{ include "common.fullname" . }}-service-config |
| 65 | - mountPath: /opt/app/search-data-service/config/dynamic-custom-template.json |
| 66 | subPath: dynamic-custom-template.json |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 67 | name: {{ include "common.fullname" . }}-service-config |
| 68 | - mountPath: /opt/app/search-data-service/config/auth/tomcat_keystore |
| 69 | subPath: tomcat_keystore |
| 70 | name: {{ include "common.fullname" . }}-service-auth-config |
| 71 | - mountPath: /opt/app/search-data-service/config/auth/search_policy.json |
| 72 | subPath: search_policy.json |
| 73 | name: {{ include "common.fullname" . }}-search-policy-config |
| 74 | - mountPath: /var/log/onap |
| 75 | name: {{ include "common.fullname" . }}-service-logs |
| 76 | - mountPath: /opt/app/search-data-service/bundleconfig/etc/logback.xml |
| 77 | name: {{ include "common.fullname" . }}-service-log-conf |
| 78 | subPath: logback.xml |
| 79 | ports: |
| 80 | - containerPort: {{ .Values.service.internalPort }} |
| 81 | # disable liveness probe when breakpoints set in debugger |
| 82 | # so K8s doesn't restart unresponsive container |
| 83 | {{- if eq .Values.liveness.enabled true }} |
| 84 | livenessProbe: |
| 85 | tcpSocket: |
| 86 | port: {{ .Values.service.internalPort }} |
| 87 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 88 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 89 | {{ end -}} |
| 90 | readinessProbe: |
| 91 | tcpSocket: |
| 92 | port: {{ .Values.service.internalPort }} |
| 93 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 94 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 95 | resources: |
rajeshkalai | 9fcfbce | 2018-09-20 06:36:28 -0400 | [diff] [blame] | 96 | {{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }} |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 97 | {{- if .Values.nodeSelector }} |
| 98 | nodeSelector: |
| 99 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 100 | {{- end -}} |
| 101 | {{- if .Values.affinity }} |
| 102 | affinity: |
| 103 | {{ toYaml .Values.affinity | indent 8 }} |
| 104 | {{- end }} |
| 105 | |
| 106 | # side car containers |
| 107 | - name: filebeat-onap |
| 108 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 109 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 110 | volumeMounts: |
| 111 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 112 | subPath: filebeat.yml |
| 113 | name: filebeat-conf |
| 114 | - mountPath: /var/log/onap |
| 115 | name: {{ include "common.fullname" . }}-service-logs |
| 116 | - mountPath: /usr/share/filebeat/data |
| 117 | name: {{ include "common.fullname" . }}-service-filebeat |
| 118 | |
| 119 | volumes: |
| 120 | - name: localtime |
| 121 | hostPath: |
| 122 | path: /etc/localtime |
| 123 | - name: {{ include "common.fullname" . }}-service-config |
| 124 | configMap: |
| 125 | name: {{ include "common.fullname" . }} |
| 126 | - name: {{ include "common.fullname" . }}-service-auth-config |
| 127 | secret: |
| 128 | secretName: {{ include "common.fullname" . }}-keystone |
| 129 | - name: {{ include "common.fullname" . }}-search-policy-config |
| 130 | secret: |
| 131 | secretName: {{ include "common.fullname" . }}-policy |
| 132 | - name: filebeat-conf |
| 133 | configMap: |
| 134 | name: aai-filebeat |
| 135 | - name: {{ include "common.fullname" . }}-service-logs |
| 136 | emptyDir: {} |
| 137 | - name: {{ include "common.fullname" . }}-service-filebeat |
| 138 | emptyDir: {} |
| 139 | - name: {{ include "common.fullname" . }}-service-log-conf |
| 140 | configMap: |
| 141 | name: {{ include "common.fullname" . }}-service-log |
| 142 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
| 143 | imagePullSecrets: |
| 144 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |