Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, AT&T, 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 | |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 15 | apiVersion: apps/v1 |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 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 "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 23 | release: {{ include "common.release" . }} |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 26 | selector: |
| 27 | matchLabels: |
| 28 | app: {{ include "common.name" . }} |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 29 | replicas: {{ .Values.replicaCount }} |
| 30 | template: |
| 31 | metadata: |
| 32 | labels: |
| 33 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 34 | release: {{ include "common.release" . }} |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 35 | spec: |
| 36 | initContainers: |
| 37 | - name: {{ include "common.name" . }}-readiness |
| 38 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 39 | - /app/ready.py |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 40 | args: |
| 41 | - --container-name |
| 42 | - "sdc-dcae-be" |
| 43 | env: |
| 44 | - name: NAMESPACE |
| 45 | valueFrom: |
| 46 | fieldRef: |
| 47 | apiVersion: v1 |
| 48 | fieldPath: metadata.namespace |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 49 | image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 50 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 51 | |
| 52 | containers: |
| 53 | - name: {{ include "common.name" . }} |
| 54 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 55 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 56 | ports: |
| 57 | - containerPort: {{ .Values.service.internalPort }} |
| 58 | - containerPort: {{ .Values.service.internalPort2 }} |
| 59 | {{ if eq .Values.liveness.enabled true }} |
| 60 | livenessProbe: |
| 61 | tcpSocket: |
k.kedron | c784bbd | 2019-09-05 18:28:16 +0200 | [diff] [blame] | 62 | port: {{ .Values.service.internalPort2 }} |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 63 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 64 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 65 | {{ end }} |
| 66 | readinessProbe: |
| 67 | httpGet: |
| 68 | path: /healthcheck |
| 69 | port: {{ .Values.service.internalPort }} |
| 70 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 71 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 72 | env: |
| 73 | - name: ENVNAME |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame^] | 74 | value: {{ .Values.env.name }} |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 75 | - name: JAVA_OPTIONS |
| 76 | value: {{ .Values.config.javaOptions }} |
| 77 | - name: HOST_IP |
| 78 | valueFrom: |
| 79 | fieldRef: |
| 80 | fieldPath: status.podIP |
| 81 | volumeMounts: |
| 82 | - name: {{ include "common.fullname" . }}-environments |
MichaelMorris | b137f7e | 2020-03-15 17:44:48 +0000 | [diff] [blame] | 83 | mountPath: /var/lib/jetty/chef-solo/environments/ |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 84 | - name: {{ include "common.fullname" . }}-localtime |
| 85 | mountPath: /etc/localtime |
| 86 | readOnly: true |
| 87 | - name: {{ include "common.fullname" . }}-logs |
| 88 | mountPath: /var/log/onap |
| 89 | resources: |
| 90 | {{ include "common.resources" . | indent 12 }} |
| 91 | {{- if .Values.nodeSelector }} |
| 92 | nodeSelector: |
| 93 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 94 | {{- end -}} |
| 95 | {{- if .Values.affinity }} |
| 96 | affinity: |
| 97 | {{ toYaml .Values.affinity | indent 10 }} |
| 98 | {{- end }} |
| 99 | # side car containers |
| 100 | - name: {{ include "common.name" . }}-filebeat-onap |
| 101 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 102 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 103 | volumeMounts: |
| 104 | - name: {{ include "common.fullname" . }}-filebeat-conf |
| 105 | mountPath: /usr/share/filebeat/filebeat.yml |
| 106 | subPath: filebeat.yml |
| 107 | - name: {{ include "common.fullname" . }}-logs |
| 108 | mountPath: /var/log/onap |
| 109 | - name: {{ include "common.fullname" . }}-data-filebeat |
| 110 | mountPath: /usr/share/filebeat/data |
| 111 | volumes: |
| 112 | - name: {{ include "common.fullname" . }}-localtime |
| 113 | hostPath: |
| 114 | path: /etc/localtime |
| 115 | - name: {{ include "common.fullname" . }}-filebeat-conf |
| 116 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 117 | name: {{ include "common.release" . }}-sdc-filebeat-configmap |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 118 | - name: {{ include "common.fullname" . }}-data-filebeat |
| 119 | emptyDir: {} |
| 120 | - name: {{ include "common.fullname" . }}-environments |
| 121 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 122 | name: {{ include "common.release" . }}-sdc-environments-configmap |
Areli, Fuss (af732p) | 307fdc7 | 2018-05-29 14:40:03 +0300 | [diff] [blame] | 123 | defaultMode: 0755 |
| 124 | - name: {{ include "common.fullname" . }}-logs |
| 125 | emptyDir: {} |
| 126 | imagePullSecrets: |
| 127 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |