dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 1 | |
Durgpal | 7ad4069 | 2018-08-03 07:28:36 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Amdocs,Bell Canada |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [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 | initContainers: |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 35 | {{- if .Values.global.aafEnabled }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 36 | - command: |
| 37 | - /root/ready.py |
| 38 | args: |
| 39 | - --container-name |
dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 40 | - aaf-locate |
| 41 | env: |
| 42 | - name: NAMESPACE |
| 43 | valueFrom: |
| 44 | fieldRef: |
| 45 | apiVersion: v1 |
| 46 | fieldPath: metadata.namespace |
| 47 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 48 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 49 | name: {{ include "common.name" . }}-aaf-readiness |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 50 | {{- end }} |
| 51 | {{- if .Values.PG.enabled }} |
dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 52 | - command: |
| 53 | - /root/ready.py |
| 54 | args: |
| 55 | - --container-name |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 56 | - {{ .Values.postgres.nameOverride }} |
| 57 | env: |
| 58 | - name: NAMESPACE |
| 59 | valueFrom: |
| 60 | fieldRef: |
| 61 | apiVersion: v1 |
| 62 | fieldPath: metadata.namespace |
| 63 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 64 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 65 | name: {{ include "common.name" . }}-postgres-readiness |
| 66 | {{- end}} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 67 | containers: |
| 68 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 69 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 70 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 71 | ports: |
| 72 | - containerPort: {{ .Values.service.internalPort }} |
| 73 | - containerPort: {{ .Values.service.internalPort2 }} |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 74 | {{ if eq .Values.liveness.enabled true -}} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 75 | livenessProbe: |
| 76 | httpGet: |
| 77 | port: {{ .Values.service.internalPort }} |
| 78 | path: /webapi/info |
| 79 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
dglFromAtt | ec0918d | 2018-10-17 19:34:49 +0000 | [diff] [blame] | 80 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 81 | readinessProbe: |
| 82 | httpGet: |
dglFromAtt | d9d3f42 | 2018-10-18 21:04:35 +0000 | [diff] [blame] | 83 | host: {{ .Values.dmaapMessageRouterService }} |
| 84 | port: 3904 |
| 85 | path: /topics |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 86 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 87 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 88 | {{ end -}} |
| 89 | volumeMounts: |
| 90 | - mountPath: /etc/localtime |
| 91 | name: localtime |
| 92 | readOnly: true |
dglFromAtt | ec0918d | 2018-10-17 19:34:49 +0000 | [diff] [blame] | 93 | # NOTE: on the following several configMaps, careful to include / at end |
| 94 | # since there may be more than one file in each mountPath |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 95 | - name: {{ include "common.name" . }}-config |
dglFromAtt | 8234007 | 2018-10-16 21:53:34 +0000 | [diff] [blame] | 96 | mountPath: /opt/app/config/conf/ |
pkaras | 837db95 | 2019-04-23 13:45:25 +0200 | [diff] [blame] | 97 | - name: {{ include "common.name" . }}-aaf-config |
| 98 | mountPath: /opt/app/dmaapbc/etc/org.onap.dmaap-bc.props |
| 99 | subPath: org.onap.dmaap-bc.props |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 100 | resources: |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 101 | {{ include "common.resources" . }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 102 | {{- if .Values.nodeSelector }} |
| 103 | nodeSelector: |
| 104 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 105 | {{- end -}} |
| 106 | {{- if .Values.affinity }} |
| 107 | affinity: |
| 108 | {{ toYaml .Values.affinity | indent 10 }} |
| 109 | {{- end }} |
| 110 | volumes: |
| 111 | - name: localtime |
| 112 | hostPath: |
| 113 | path: /etc/localtime |
| 114 | - name: {{ include "common.name" . }}-config |
| 115 | configMap: |
| 116 | name: {{ include "common.fullname" . }}-config |
pkaras | 837db95 | 2019-04-23 13:45:25 +0200 | [diff] [blame] | 117 | - name: {{ include "common.name" . }}-aaf-config |
| 118 | configMap: |
| 119 | name: {{ include "common.fullname" . }}-aaf-config |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 120 | imagePullSecrets: |
| 121 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |