2 # Modifications Copyright © 2018 Amdocs,Bell Canada
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21 selector: {{- include "common.selectors" . | nindent 4 }}
22 replicas: {{ .Values.replicaCount }}
24 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
26 {{ include "common.podSecurityContext" . | indent 6 | trim}}
27 {{- if or .Values.global.aafEnabled .Values.PG.enabled }}
33 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
36 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
38 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
40 - mountPath: /config-input
41 name: {{ include "common.name" . }}-config-input
43 name: {{ include "common.name" . }}-config
44 image: {{ include "repositoryGenerator.image.envsubst" . }}
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
46 name: {{ include "common.name" . }}-update-config
47 {{ include "common.certInitializer.initContainer" . | nindent 6 }}
48 - name: {{ include "common.name" . }}-permission-fixer
51 image: {{ include "repositoryGenerator.image.busybox" . }}
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
54 command: ["chown","-Rf","1000:1001", "/opt/app/"]
55 # See AAF-425 for explanation of why this is needed.
56 # This artifact is provisioned in AAF for both pks12 and jks format and apparently
57 # the cadi library is not using the jks password on the jks keystore.
58 # So, this attempts to "fix" the credential property file until this is fixed properly.
59 - name: {{ include "common.name" . }}-cred-fixer
60 image: {{ include "repositoryGenerator.image.busybox" . }}
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
62 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
64 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" ]
65 - name: {{ include "common.name" . }}-postgres-readiness
73 - {{ .Values.postgres.nameOverride }}
83 fieldPath: metadata.namespace
84 image: {{ include "repositoryGenerator.image.readiness" . }}
85 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
88 - name: {{ include "common.name" . }}
89 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
90 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
91 ports: {{ include "common.containerPorts" . | nindent 10 }}
92 {{ if eq .Values.liveness.enabled true -}}
95 port: {{ .Values.liveness.port }}
97 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
98 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.liveness.periodSeconds }}
103 port: {{ .Values.readiness.port }}
105 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
106 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
107 periodSeconds: {{ .Values.readiness.periodSeconds }}
108 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
109 - mountPath: /etc/localtime
112 # NOTE: on the following several configMaps, careful to include / at end
113 # since there may be more than one file in each mountPath
114 - name: {{ include "common.name" . }}-config
115 mountPath: /opt/app/config/conf/
116 resources: {{ include "common.resources" . | nindent 12 }}
117 {{- if .Values.nodeSelector }}
118 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
120 {{- if .Values.affinity }}
121 affinity: {{ toYaml .Values.affinity | nindent 10 }}
123 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
124 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
128 - name: {{ include "common.name" . }}-config-input
130 name: {{ include "common.fullname" . }}-config
131 - name: {{ include "common.name" . }}-config
135 - name: "{{ include "common.namespace" . }}-docker-registry-key"