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 }}
47 {{ include "common.certInitializer.initContainer" . | nindent 6 }}
49 - name: {{ include "common.name" . }}-permission-fixer
50 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
53 command: ["chown","-Rf","1000:1001", "/opt/app/"]
54 # See AAF-425 for explanation of why this is needed.
55 # This artifact is provisioned in AAF for both pks12 and jks format and apparently
56 # the cadi library is not using the jks password on the jks keystore.
57 # So, this attempts to "fix" the credential property file until this is fixed properly.
58 - name: {{ include "common.name" . }}-cred-fixer
59 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
60 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
61 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
63 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" ]
66 {{- if .Values.PG.enabled }}
67 - name: {{ include "common.name" . }}-postgres-readiness
72 - {{ .Values.postgres.nameOverride }}
78 fieldPath: metadata.namespace
79 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84 - name: {{ include "common.name" . }}
85 image: "{{ .Values.repository }}/{{ .Values.image }}"
86 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
87 ports: {{ include "common.containerPorts" . | nindent 10 }}
88 {{ if eq .Values.liveness.enabled true -}}
91 port: {{ .Values.liveness.port }}
93 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
94 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
95 periodSeconds: {{ .Values.liveness.periodSeconds }}
99 port: {{ .Values.readiness.port }}
101 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
102 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.readiness.periodSeconds }}
104 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
105 - mountPath: /etc/localtime
108 # NOTE: on the following several configMaps, careful to include / at end
109 # since there may be more than one file in each mountPath
110 - name: {{ include "common.name" . }}-config
111 mountPath: /opt/app/config/conf/
112 resources: {{ include "common.resources" . | nindent 12 }}
113 {{- if .Values.nodeSelector }}
114 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
116 {{- if .Values.affinity }}
117 affinity: {{ toYaml .Values.affinity | nindent 10 }}
119 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
123 - name: {{ include "common.name" . }}-config-input
125 name: {{ include "common.fullname" . }}-config
126 - name: {{ include "common.name" . }}-config
130 - name: "{{ include "common.namespace" . }}-docker-registry-key"