Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, AT&T |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Bell Canada |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [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 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
| 32 | release: {{ .Release.Name }} |
| 33 | spec: |
| 34 | containers: |
| 35 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 36 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 37 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 38 | ports: |
| 39 | - containerPort: {{ .Values.service.internalPort }} |
| 40 | # disable liveness probe when breakpoints set in debugger |
| 41 | # so K8s doesn't restart unresponsive container |
| 42 | {{ if .Values.liveness.enabled }} |
| 43 | livenessProbe: |
| 44 | tcpSocket: |
| 45 | port: {{ .Values.service.internalPort }} |
| 46 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 47 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 48 | {{ end }} |
| 49 | readinessProbe: |
| 50 | tcpSocket: |
| 51 | port: {{ .Values.service.internalPort }} |
| 52 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 53 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 54 | env: |
| 55 | - name: CONFIG_HOME |
| 56 | value: /opt/app/babel/config |
| 57 | - name: KEY_STORE_PASSWORD |
| 58 | valueFrom: |
| 59 | secretKeyRef: |
| 60 | name: {{ template "common.fullname" . }}-pass |
| 61 | key: KEY_STORE_PASSWORD |
| 62 | - name: KEY_MANAGER_PASSWORD |
| 63 | valueFrom: |
| 64 | secretKeyRef: |
| 65 | name: {{ template "common.fullname" . }}-pass |
| 66 | key: KEY_MANAGER_PASSWORD |
| 67 | volumeMounts: |
| 68 | - mountPath: /etc/localtime |
| 69 | name: localtime |
| 70 | readOnly: true |
| 71 | - mountPath: /opt/app/babel/config/artifact-generator.properties |
| 72 | name: {{ include "common.fullname" . }}-config |
| 73 | subPath: artifact-generator.properties |
Alexis de Talhouët | 7b12522 | 2018-09-19 09:02:33 -0400 | [diff] [blame^] | 74 | - mountPath: /opt/app/babel/config/filter-types.properties |
| 75 | name: {{ include "common.fullname" . }}-config |
| 76 | subPath: filter-types.properties |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 77 | - mountPath: /opt/app/babel/config/babel-auth.properties |
| 78 | name: {{ include "common.fullname" . }}-config |
| 79 | subPath: babel-auth.properties |
| 80 | - mountPath: /opt/app/babel/config/auth |
| 81 | name: {{ include "common.fullname" . }}-secrets |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 82 | - mountPath: /var/log/onap |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 83 | name: {{ include "common.fullname" . }}-logs |
Jimmy Forsyth | b4b0948 | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 84 | - mountPath: /opt/app/babel/config/logback.xml |
| 85 | name: {{ include "common.fullname" . }}-config |
| 86 | subPath: logback.xml |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 87 | resources: |
| 88 | {{ toYaml .Values.resources | indent 12 }} |
| 89 | {{- if .Values.nodeSelector }} |
| 90 | nodeSelector: |
| 91 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 92 | {{- end -}} |
| 93 | {{- if .Values.affinity }} |
| 94 | affinity: |
| 95 | {{ toYaml .Values.affinity | indent 10 }} |
| 96 | {{- end }} |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 97 | |
| 98 | # side car containers |
| 99 | - name: filebeat-onap |
| 100 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 101 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 102 | volumeMounts: |
| 103 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 104 | subPath: filebeat.yml |
| 105 | name: filebeat-conf |
| 106 | - mountPath: /var/log/onap |
| 107 | name: {{ include "common.fullname" . }}-logs |
| 108 | - mountPath: /usr/share/filebeat/data |
| 109 | name: aai-filebeat |
| 110 | |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 111 | volumes: |
| 112 | - name: localtime |
| 113 | hostPath: |
| 114 | path: /etc/localtime |
| 115 | - name: {{ include "common.fullname" . }}-config |
| 116 | configMap: |
| 117 | name: {{ include "common.fullname" . }}-configmap |
| 118 | items: |
| 119 | - key: artifact-generator.properties |
| 120 | path: artifact-generator.properties |
Alexis de Talhouët | 7b12522 | 2018-09-19 09:02:33 -0400 | [diff] [blame^] | 121 | - key: filter-types.properties |
| 122 | path: filter-types.properties |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 123 | - key: babel-auth.properties |
| 124 | path: babel-auth.properties |
Jimmy Forsyth | b4b0948 | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 125 | - key: logback.xml |
| 126 | path: logback.xml |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 127 | - name: {{ include "common.fullname" . }}-secrets |
| 128 | secret: |
| 129 | secretName: {{ include "common.fullname" . }}-babel-secrets |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 130 | - name: filebeat-conf |
| 131 | configMap: |
| 132 | name: aai-filebeat |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 133 | - name: {{ include "common.fullname" . }}-logs |
| 134 | emptyDir: {} |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 135 | - name: aai-filebeat |
| 136 | emptyDir: {} |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 137 | imagePullSecrets: |
| 138 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |