Durgpal | 7ad4069 | 2018-08-03 07:28:36 +0000 | [diff] [blame] | 1 | # Modifications Copyright © 2018 Amdocs,Bell Canada |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 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 "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 23 | release: {{ include "common.release" . }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 31 | release: {{ include "common.release" . }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 32 | spec: |
| 33 | initContainers: |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 34 | {{- if .Values.global.aafEnabled }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 35 | - command: |
| 36 | - /root/ready.py |
| 37 | args: |
| 38 | - --container-name |
dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 39 | - aaf-locate |
| 40 | env: |
| 41 | - name: NAMESPACE |
| 42 | valueFrom: |
| 43 | fieldRef: |
| 44 | apiVersion: v1 |
| 45 | fieldPath: metadata.namespace |
| 46 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 47 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 48 | name: {{ include "common.name" . }}-aaf-readiness |
Ubuntu | 3d5d180 | 2019-11-14 23:16:17 +0000 | [diff] [blame] | 49 | - name: {{ include "common.name" . }}-dbc-aaf-config |
| 50 | image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}" |
| 51 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 52 | command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"] |
| 53 | volumeMounts: |
| 54 | - mountPath: {{ .Values.persistence.aafCredsPath }} |
| 55 | name: {{ include "common.name" . }}-aaf-config |
| 56 | env: |
| 57 | - name: APP_FQI |
| 58 | value: "{{ .Values.aafConfig.fqi }}" |
| 59 | - name: aaf_locate_url |
| 60 | value: "https://aaf-locate.{{ .Release.Namespace }}:8095" |
| 61 | - name: aaf_locator_container |
| 62 | value: "{{ .Values.global.aafLocatorContainer }}" |
| 63 | - name: aaf_locator_container_ns |
| 64 | value: "{{ .Release.Namespace }}" |
| 65 | - name: aaf_locator_fqdn |
| 66 | value: "{{ .Values.aafConfig.fqdn }}" |
| 67 | - name: aaf_locator_public_fqdn |
| 68 | value: "{{.Values.aafConfig.publicFqdn}}" |
| 69 | - name: aaf_locator_app_ns |
| 70 | value: "{{ .Values.global.aafAppNs }}" |
| 71 | - name: DEPLOY_FQI |
| 72 | value: "{{ .Values.aafConfig.aafDeployFqi }}" |
| 73 | - name: DEPLOY_PASSWORD |
| 74 | valueFrom: |
| 75 | secretKeyRef: |
| 76 | name: {{ include "common.fullname" . }}-secret |
| 77 | key: aaf-deploy-password |
| 78 | - name: cadi_longitude |
| 79 | value: "{{ .Values.aafConfig.cadiLongitude }}" |
| 80 | - name: cadi_latitude |
| 81 | value: "{{ .Values.aafConfig.cadiLatitude }}" |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 82 | {{- end }} |
| 83 | {{- if .Values.PG.enabled }} |
dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 84 | - command: |
| 85 | - /root/ready.py |
| 86 | args: |
| 87 | - --container-name |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 88 | - {{ .Values.postgres.nameOverride }} |
| 89 | env: |
| 90 | - name: NAMESPACE |
| 91 | valueFrom: |
| 92 | fieldRef: |
| 93 | apiVersion: v1 |
| 94 | fieldPath: metadata.namespace |
| 95 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 96 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
dglFromAtt | fb58a9d | 2019-04-12 20:12:26 +0000 | [diff] [blame] | 97 | name: {{ include "common.name" . }}-postgres-readiness |
| 98 | {{- end}} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 99 | containers: |
| 100 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 101 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 102 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 103 | ports: |
| 104 | - containerPort: {{ .Values.service.internalPort }} |
| 105 | - containerPort: {{ .Values.service.internalPort2 }} |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 106 | {{ if eq .Values.liveness.enabled true -}} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 107 | livenessProbe: |
| 108 | httpGet: |
| 109 | port: {{ .Values.service.internalPort }} |
| 110 | path: /webapi/info |
| 111 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
dglFromAtt | ec0918d | 2018-10-17 19:34:49 +0000 | [diff] [blame] | 112 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 113 | readinessProbe: |
| 114 | httpGet: |
dglFromAtt | d9d3f42 | 2018-10-18 21:04:35 +0000 | [diff] [blame] | 115 | host: {{ .Values.dmaapMessageRouterService }} |
| 116 | port: 3904 |
| 117 | path: /topics |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 118 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 119 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 120 | {{ end -}} |
| 121 | volumeMounts: |
| 122 | - mountPath: /etc/localtime |
| 123 | name: localtime |
| 124 | readOnly: true |
dglFromAtt | ec0918d | 2018-10-17 19:34:49 +0000 | [diff] [blame] | 125 | # NOTE: on the following several configMaps, careful to include / at end |
| 126 | # since there may be more than one file in each mountPath |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 127 | - name: {{ include "common.name" . }}-config |
dglFromAtt | 8234007 | 2018-10-16 21:53:34 +0000 | [diff] [blame] | 128 | mountPath: /opt/app/config/conf/ |
pkaras | 837db95 | 2019-04-23 13:45:25 +0200 | [diff] [blame] | 129 | - name: {{ include "common.name" . }}-aaf-config |
| 130 | mountPath: /opt/app/dmaapbc/etc/org.onap.dmaap-bc.props |
| 131 | subPath: org.onap.dmaap-bc.props |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 132 | resources: |
efiacor | e62958b | 2019-09-27 16:54:36 +0100 | [diff] [blame] | 133 | {{ include "common.resources" . }} |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 134 | {{- if .Values.nodeSelector }} |
| 135 | nodeSelector: |
| 136 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 137 | {{- end -}} |
| 138 | {{- if .Values.affinity }} |
| 139 | affinity: |
| 140 | {{ toYaml .Values.affinity | indent 10 }} |
| 141 | {{- end }} |
| 142 | volumes: |
| 143 | - name: localtime |
| 144 | hostPath: |
| 145 | path: /etc/localtime |
| 146 | - name: {{ include "common.name" . }}-config |
| 147 | configMap: |
| 148 | name: {{ include "common.fullname" . }}-config |
pkaras | 837db95 | 2019-04-23 13:45:25 +0200 | [diff] [blame] | 149 | - name: {{ include "common.name" . }}-aaf-config |
| 150 | configMap: |
| 151 | name: {{ include "common.fullname" . }}-aaf-config |
Dominic Lunanuova | e825fee | 2018-04-12 14:40:34 +0000 | [diff] [blame] | 152 | imagePullSecrets: |
| 153 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |