Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [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 |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [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 }}" |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [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 |
kj | 05b57f8 | 2018-03-28 18:10:32 +0300 | [diff] [blame] | 42 | {{ if .Values.liveness.enabled }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 43 | livenessProbe: |
| 44 | tcpSocket: |
| 45 | port: {{ .Values.service.internalPort }} |
| 46 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 47 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
kj | 05b57f8 | 2018-03-28 18:10:32 +0300 | [diff] [blame] | 48 | {{ end }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 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/champ-service/appconfig" |
| 57 | - name: GRAPHIMPL |
| 58 | value: "janus-deps" |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 59 | - name: KEY_STORE_PASSWORD |
| 60 | valueFrom: |
| 61 | secretKeyRef: |
| 62 | name: {{ template "common.fullname" . }}-pass |
| 63 | key: KEY_STORE_PASSWORD |
| 64 | - name: KEY_MANAGER_PASSWORD |
| 65 | valueFrom: |
| 66 | secretKeyRef: |
| 67 | name: {{ template "common.fullname" . }}-pass |
| 68 | key: KEY_MANAGER_PASSWORD |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 69 | - name: SERVICE_BEANS |
| 70 | value: "/opt/app/champ-service/dynamic/conf" |
| 71 | volumeMounts: |
| 72 | - mountPath: /etc/localtime |
| 73 | name: localtime |
| 74 | readOnly: true |
| 75 | - mountPath: /opt/app/champ-service/appconfig/champ-api.properties |
| 76 | name: {{ include "common.fullname" . }}-config |
| 77 | subPath: champ-api.properties |
| 78 | - mountPath: /opt/app/champ-service/appconfig/auth |
| 79 | name: {{ include "common.fullname" . }}-secrets |
| 80 | - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml |
| 81 | name: {{ include "common.fullname" . }}-dynamic-config |
| 82 | subPath: champ-beans.xml |
Shwetank Dave | b4333f9 | 2018-08-14 09:55:46 -0400 | [diff] [blame] | 83 | - mountPath: /opt/app/champ-service/bundleconfig/etc/logback.xml |
| 84 | name: {{ include "common.fullname" . }}-logback-config |
| 85 | subPath: logback.xml |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 86 | - mountPath: /var/log/onap |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 87 | name: {{ include "common.fullname" . }}-logs |
| 88 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame^] | 89 | {{ include "common.resources" . | indent 12 }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 90 | {{- if .Values.nodeSelector }} |
| 91 | nodeSelector: |
| 92 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 93 | {{- end -}} |
| 94 | {{- if .Values.affinity }} |
| 95 | affinity: |
| 96 | {{ toYaml .Values.affinity | indent 10 }} |
| 97 | {{- end }} |
| 98 | |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 99 | # side car containers |
| 100 | - name: filebeat-onap |
| 101 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 102 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 103 | volumeMounts: |
| 104 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 105 | subPath: filebeat.yml |
| 106 | name: filebeat-conf |
| 107 | - mountPath: /var/log/onap |
| 108 | name: {{ include "common.fullname" . }}-logs |
| 109 | - mountPath: /usr/share/filebeat/data |
| 110 | name: aai-filebeat |
| 111 | |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 112 | volumes: |
| 113 | - name: localtime |
| 114 | hostPath: |
| 115 | path: /etc/localtime |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 116 | - name: {{ include "common.fullname" . }}-config |
| 117 | configMap: |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 118 | name: {{ include "common.fullname" . }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 119 | items: |
| 120 | - key: champ-api.properties |
| 121 | path: champ-api.properties |
| 122 | - name: {{ include "common.fullname" . }}-secrets |
| 123 | secret: |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 124 | secretName: {{ include "common.fullname" . }}-champ |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 125 | - name: {{ include "common.fullname" . }}-dynamic-config |
| 126 | configMap: |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 127 | name: {{ include "common.fullname" . }}-dynamic |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 128 | items: |
| 129 | - key: champ-beans.xml |
| 130 | path: champ-beans.xml |
| 131 | - name: {{ include "common.fullname" . }}-logs |
| 132 | emptyDir: {} |
Shwetank Dave | b4333f9 | 2018-08-14 09:55:46 -0400 | [diff] [blame] | 133 | - name: {{ include "common.fullname" . }}-logback-config |
| 134 | configMap: |
| 135 | name: {{ include "common.fullname" . }}-log-configmap |
| 136 | items: |
| 137 | - key: logback.xml |
| 138 | path: logback.xml |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 139 | - name: filebeat-conf |
| 140 | configMap: |
| 141 | name: aai-filebeat |
| 142 | - name: aai-filebeat |
| 143 | emptyDir: {} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 144 | imagePullSecrets: |
| 145 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |