1 # Modifications Copyright © 2018 Amdocs,Bell Canada
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19 selector: {{- include "common.selectors" . | nindent 4 }}
20 replicas: {{ .Values.replicaCount }}
22 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
24 {{- if or .Values.global.aafEnabled .Values.PG.enabled }}
30 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
33 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
35 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
37 - mountPath: /config-input
38 name: {{ include "common.name" . }}-config-input
40 name: {{ include "common.name" . }}-config
41 image: "{{ .Values.global.envsubstImage }}"
42 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 name: {{ include "common.name" . }}-update-config
45 {{- if .Values.global.aafEnabled }}
46 - name: {{ include "common.name" . }}-aaf-readiness
61 fieldPath: metadata.namespace
62 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 - name: {{ include "common.name" . }}-aaf-config
65 image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
66 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
67 command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"]
69 - mountPath: {{ .Values.persistence.aafCredsPath }}
70 name: {{ include "common.name" . }}-aaf-config-vol
73 value: "{{ .Values.aafConfig.fqi }}"
74 - name: aaf_locate_url
75 value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
76 - name: aaf_locator_container
77 value: "{{ .Values.global.aafLocatorContainer }}"
78 - name: aaf_locator_container_ns
79 value: "{{ .Release.Namespace }}"
80 - name: aaf_locator_fqdn
81 value: "{{ .Values.aafConfig.fqdn }}"
82 - name: aaf_locator_public_fqdn
83 value: "{{.Values.aafConfig.publicFqdn}}"
84 - name: aaf_locator_app_ns
85 value: "{{ .Values.global.aafAppNs }}"
87 value: "{{ .Values.aafConfig.aafDeployFqi }}"
88 - name: DEPLOY_PASSWORD
91 name: {{ include "common.fullname" . }}-secret
92 key: aaf-deploy-password
93 - name: cadi_longitude
94 value: "{{ .Values.aafConfig.cadiLongitude }}"
96 value: "{{ .Values.aafConfig.cadiLatitude }}"
97 - name: {{ include "common.name" . }}-permission-fixer
98 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
99 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
101 - mountPath: {{ .Values.persistence.aafCredsPath }}
102 name: {{ include "common.name" . }}-aaf-config-vol
103 command: ["chown","-Rf","1000:1001", "/opt/app/"]
104 # See AAF-425 for explanation of why this is needed.
105 # This artifact is provisioned in AAF for both pks12 and jks format and apparently
106 # the cadi library is not using the jks password on the jks keystore.
107 # So, this attempts to "fix" the credential property file until this is fixed properly.
108 - name: {{ include "common.name" . }}-cred-fixer
109 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
110 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
112 - mountPath: {{ .Values.persistence.aafCredsPath }}
113 name: {{ include "common.name" . }}-aaf-config-vol
115 args: [ "-c", "sed -i -e '/cadi_keystore_password=/d' -e '/cadi_keystore_password_jks/p' -e 's/cadi_keystore_password_jks/cadi_keystore_password/' -e 's/dmaap-bc.p12/dmaap-bc.jks/' /opt/app/osaaf/local/org.onap.dmaap-bc.cred.props" ]
118 {{- if .Values.PG.enabled }}
119 - name: {{ include "common.name" . }}-postgres-readiness
124 - {{ .Values.postgres.nameOverride }}
130 fieldPath: metadata.namespace
131 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
132 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
136 - name: {{ include "common.name" . }}
137 image: "{{ .Values.repository }}/{{ .Values.image }}"
138 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
139 ports: {{ include "common.containerPorts" . | nindent 10 }}
140 {{ if eq .Values.liveness.enabled true -}}
143 port: {{ .Values.liveness.port }}
145 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
146 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
147 periodSeconds: {{ .Values.liveness.periodSeconds }}
151 port: {{ .Values.readiness.port }}
153 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
154 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
155 periodSeconds: {{ .Values.readiness.periodSeconds }}
157 - mountPath: /etc/localtime
160 - mountPath: {{ .Values.persistence.aafCredsPath }}
161 name: {{ include "common.name" . }}-aaf-config-vol
162 # NOTE: on the following several configMaps, careful to include / at end
163 # since there may be more than one file in each mountPath
164 - name: {{ include "common.name" . }}-config
165 mountPath: /opt/app/config/conf/
166 resources: {{ include "common.resources" . | nindent 12 }}
167 {{- if .Values.nodeSelector }}
168 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
170 {{- if .Values.affinity }}
171 affinity: {{ toYaml .Values.affinity | nindent 10 }}
177 - name: {{ include "common.name" . }}-config-input
179 name: {{ include "common.fullname" . }}-config
180 - name: {{ include "common.name" . }}-aaf-config-vol
182 - name: {{ include "common.name" . }}-config
186 - name: "{{ include "common.namespace" . }}-docker-registry-key"