Michael Arrastia | f0b74b1 | 2018-08-21 13:36:27 +0100 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, AT&T |
| 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 | |
| 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 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 }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: {{ include "common.name" . }} |
| 31 | release: {{ .Release.Name }} |
| 32 | spec: |
| 33 | initContainers: |
| 34 | - command: |
| 35 | - /root/ready.py |
| 36 | args: |
| 37 | - --container-name |
| 38 | - message-router-kafka |
| 39 | env: |
| 40 | - name: NAMESPACE |
| 41 | valueFrom: |
| 42 | fieldRef: |
| 43 | apiVersion: v1 |
| 44 | fieldPath: metadata.namespace |
| 45 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 46 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 47 | name: {{ include "common.name" . }}-readiness |
| 48 | containers: |
| 49 | - name: {{ .Chart.Name }} |
| 50 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 51 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 52 | ports: |
| 53 | - containerPort: {{ .Values.service.internalPort }} |
| 54 | # disable liveness probe when breakpoints set in debugger |
| 55 | # so K8s doesn't restart unresponsive container |
| 56 | {{ if .Values.liveness.enabled }} |
| 57 | livenessProbe: |
| 58 | tcpSocket: |
| 59 | port: {{ .Values.service.internalPort }} |
| 60 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 61 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 62 | {{ end }} |
| 63 | readinessProbe: |
| 64 | tcpSocket: |
| 65 | port: {{ .Values.service.internalPort }} |
| 66 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 67 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 68 | env: |
| 69 | - name: CONFIG_HOME |
| 70 | value: /opt/app/spike/config |
| 71 | - name: KEY_STORE_PASSWORD |
| 72 | valueFrom: |
| 73 | secretKeyRef: |
| 74 | name: {{ template "common.fullname" . }}-pass |
| 75 | key: KEY_STORE_PASSWORD |
| 76 | - name: KEY_MANAGER_PASSWORD |
| 77 | valueFrom: |
| 78 | secretKeyRef: |
| 79 | name: {{ template "common.fullname" . }}-pass |
| 80 | key: KEY_MANAGER_PASSWORD |
| 81 | - name: SERVICE_BEANS |
| 82 | value: /opt/app/spike/dynamic/conf |
| 83 | volumeMounts: |
| 84 | - mountPath: /etc/localtime |
| 85 | name: localtime |
| 86 | readOnly: true |
| 87 | - mountPath: /opt/app/spike/config/auth |
| 88 | name: {{ include "common.fullname" . }}-secrets |
| 89 | - mountPath: /opt/app/spike/dynamic/conf/spike-beans.xml |
| 90 | name: {{ include "common.fullname" . }}-config |
| 91 | subPath: spike-beans.xml |
| 92 | - mountPath: /opt/app/spike/config/spike.properties |
| 93 | subPath: spike.properties |
| 94 | name: {{ include "common.fullname" . }}-config |
Michael Arrastia | c05416c | 2018-11-29 11:35:51 +0000 | [diff] [blame^] | 95 | - mountPath: /opt/app/spike/config/schema-ingest.properties |
| 96 | subPath: schema-ingest.properties |
| 97 | name: {{ include "common.fullname" . }}-config |
| 98 | - mountPath: /opt/app/spike/config/edgeprops-ingest.properties |
| 99 | subPath: edgeprops-ingest.properties |
Michael Arrastia | f0b74b1 | 2018-08-21 13:36:27 +0100 | [diff] [blame] | 100 | name: {{ include "common.fullname" . }}-config |
| 101 | - mountPath: /opt/app/spike/config/model/edge_props |
| 102 | name: {{ include "common.fullname" . }}-edge-props-config |
| 103 | - mountPath: /opt/app/spike/bundleconfig/etc/logback.xml |
| 104 | name: {{ include "common.fullname" . }}-config |
| 105 | subPath: logback.xml |
| 106 | - mountPath: /var/log/onap |
| 107 | name: {{ include "common.fullname" . }}-logs |
| 108 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 109 | {{ include "common.resources" . | indent 12 }} |
Michael Arrastia | f0b74b1 | 2018-08-21 13:36:27 +0100 | [diff] [blame] | 110 | {{- if .Values.nodeSelector }} |
| 111 | nodeSelector: |
| 112 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 113 | {{- end -}} |
| 114 | {{- if .Values.affinity }} |
| 115 | affinity: |
| 116 | {{ toYaml .Values.affinity | indent 10 }} |
| 117 | {{- end }} |
| 118 | |
| 119 | # side car containers |
| 120 | - name: filebeat-onap |
| 121 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 122 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 123 | volumeMounts: |
| 124 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 125 | subPath: filebeat.yml |
| 126 | name: filebeat-conf |
| 127 | - mountPath: /var/log/onap |
| 128 | name: {{ include "common.fullname" . }}-logs |
| 129 | - mountPath: /usr/share/filebeat/data |
| 130 | name: aai-filebeat |
| 131 | |
| 132 | volumes: |
| 133 | - name: localtime |
| 134 | hostPath: |
| 135 | path: /etc/localtime |
| 136 | - name: {{ include "common.fullname" . }}-secrets |
| 137 | secret: |
| 138 | secretName: {{ include "common.fullname" . }}-spike-secrets |
| 139 | - name: {{ include "common.fullname" . }}-config |
| 140 | configMap: |
| 141 | name: {{ include "common.fullname" . }}-configmap |
| 142 | items: |
| 143 | - key: spike.properties |
| 144 | path: spike.properties |
| 145 | - key: spike-beans.xml |
| 146 | path: spike-beans.xml |
Michael Arrastia | c05416c | 2018-11-29 11:35:51 +0000 | [diff] [blame^] | 147 | - key: schema-ingest.properties |
| 148 | path: schema-ingest.properties |
| 149 | - key: edgeprops-ingest.properties |
| 150 | path: edgeprops-ingest.properties |
Michael Arrastia | f0b74b1 | 2018-08-21 13:36:27 +0100 | [diff] [blame] | 151 | - key: logback.xml |
| 152 | path: logback.xml |
| 153 | - name: {{ include "common.fullname" . }}-edge-props-config |
| 154 | configMap: |
| 155 | name: {{ include "common.fullname" . }}-edge-props-configmap |
| 156 | - name: filebeat-conf |
| 157 | configMap: |
| 158 | name: aai-filebeat |
| 159 | - name: {{ include "common.fullname" . }}-logs |
| 160 | emptyDir: {} |
| 161 | - name: aai-filebeat |
| 162 | emptyDir: {} |
| 163 | imagePullSecrets: |
| 164 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |