Piotr Borelowski | 145e6dd | 2020-02-14 16:57:50 +0100 | [diff] [blame] | 1 | # Copyright © 2020 Samsung |
| 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: apps/v1 |
| 16 | kind: Deployment |
| 17 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
| 18 | spec: |
| 19 | selector: {{- include "common.selectors" . | nindent 4 }} |
| 20 | replicas: {{ index .Values.replicaCount }} |
| 21 | template: |
| 22 | metadata: |
| 23 | labels: {{- include "common.labels" . | nindent 8 }} |
| 24 | spec: |
Sylvain Desbureaux | aadf545 | 2020-03-18 18:13:51 +0100 | [diff] [blame] | 25 | initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }} |
Piotr Borelowski | 145e6dd | 2020-02-14 16:57:50 +0100 | [diff] [blame] | 26 | - name: {{ include "common.name" . }}-readiness |
| 27 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 28 | - /app/ready.py |
Piotr Borelowski | 145e6dd | 2020-02-14 16:57:50 +0100 | [diff] [blame] | 29 | args: |
| 30 | - --container-name |
| 31 | - aai |
| 32 | - --container-name |
| 33 | - message-router |
| 34 | env: |
| 35 | - name: NAMESPACE |
| 36 | valueFrom: |
| 37 | fieldRef: |
| 38 | apiVersion: v1 |
| 39 | fieldPath: metadata.namespace |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 40 | image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }} |
Piotr Borelowski | 145e6dd | 2020-02-14 16:57:50 +0100 | [diff] [blame] | 41 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 42 | containers: |
| 43 | - name: {{ include "common.name" . }} |
| 44 | envFrom: |
| 45 | - configMapRef: |
| 46 | name: {{ include "common.fullname" . }}-configmap |
| 47 | image: {{ include "common.repository" . }}/{{ .Values.image }} |
| 48 | resources: {{ include "common.resources" . | nindent 12 }} |
| 49 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
seshukm | 0df1f8e | 2020-08-17 21:45:49 +0530 | [diff] [blame] | 50 | volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }} |
Piotr Borelowski | 145e6dd | 2020-02-14 16:57:50 +0100 | [diff] [blame] | 51 | - name: logs |
| 52 | mountPath: /app/logs |
| 53 | - name: config |
| 54 | mountPath: /app/config |
| 55 | readOnly: true |
| 56 | livenessProbe: |
| 57 | tcpSocket: |
| 58 | port: {{ index .Values.livenessProbe.port }} |
| 59 | initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}} |
| 60 | periodSeconds: {{ index .Values.livenessProbe.periodSeconds}} |
| 61 | successThreshold: {{ index .Values.livenessProbe.successThreshold}} |
| 62 | failureThreshold: {{ index .Values.livenessProbe.failureThreshold}} |
| 63 | ports: {{- include "common.containerPorts" . | nindent 10 }} |
Sylvain Desbureaux | aadf545 | 2020-03-18 18:13:51 +0100 | [diff] [blame] | 64 | volumes: {{ include "so.certificate.volumes" . | nindent 8 }} |
Piotr Borelowski | 145e6dd | 2020-02-14 16:57:50 +0100 | [diff] [blame] | 65 | - name: logs |
| 66 | emptyDir: {} |
| 67 | - name: config |
| 68 | configMap: |
| 69 | name: {{ include "common.fullname" . }}-app-configmap |